diff --git a/app/[lng]/partners/(partners)/document-list/page.tsx b/app/[lng]/partners/(partners)/document-list/page.tsx
index 721eb408..fe7cf47a 100644
--- a/app/[lng]/partners/(partners)/document-list/page.tsx
+++ b/app/[lng]/partners/(partners)/document-list/page.tsx
@@ -1,18 +1,24 @@
// app/vendor-data/page.tsx
import * as React from "react"
import { Separator } from "@/components/ui/separator"
+import { useTranslation } from "@/i18n"
-export default async function IndexPage() {
+interface Props {
+ params: { lng?: string }
+}
+
+export default async function IndexPage({ params }: Props) {
+ const { lng } = await params
+ const language = lng || 'ko'
+ const { t } = await useTranslation(language, 'engineering')
return (
+
+
+ )
+}
diff --git a/app/[lng]/partners/(partners)/vendor-data/layout.tsx b/app/[lng]/partners/(partners)/vendor-data/layout.tsx
index 9621d23f..c37a983a 100644
--- a/app/[lng]/partners/(partners)/vendor-data/layout.tsx
+++ b/app/[lng]/partners/(partners)/vendor-data/layout.tsx
@@ -11,7 +11,7 @@ import { useTranslation } from "@/i18n"
interface VendorDataLayoutProps {
children: React.ReactNode
- params?: { locale?: string }
+ params: { lng?: string }
}
// Layout 컴포넌트는 서버 컴포넌트입니다
@@ -20,8 +20,9 @@ export default async function VendorDataLayout({
params,
}: VendorDataLayoutProps) {
// 기본 언어는 'ko'로 설정, params.locale이 있으면 사용
- const lng = params?.locale || 'ko'
- const { t } = await useTranslation(lng, 'engineering')
+ const { lng } = await params;
+ const language = lng || 'en'
+ const { t } = await useTranslation(language, 'engineering')
const session = await getServerSession(authOptions)
const vendorId = session?.user.companyId
diff --git a/app/[lng]/partners/(partners)/vendor-data/page.tsx b/app/[lng]/partners/(partners)/vendor-data/page.tsx
index db032377..0fbb6f0a 100644
--- a/app/[lng]/partners/(partners)/vendor-data/page.tsx
+++ b/app/[lng]/partners/(partners)/vendor-data/page.tsx
@@ -3,13 +3,14 @@ import { Separator } from "@/components/ui/separator"
import { useTranslation } from "@/i18n"
interface Props {
- params: { locale?: string }
+ params: { lng?: string }
}
export default async function VendorDataPage({ params }: Props) {
- // 기본 언어는 'ko'로 설정, params.locale이 있으면 사용
- const lng = params?.locale || 'ko'
- const { t } = await useTranslation(lng, 'engineering')
+ // 기본 언어는 'ko'로 설정, params.lng이 있으면 사용
+ const { lng } = await params
+ const language = lng || 'en'
+ const { t } = await useTranslation(language, 'engineering')
return (
diff --git a/app/api/attachment-delete/route.ts b/app/api/attachment-delete/route.ts
new file mode 100644
index 00000000..254c579f
--- /dev/null
+++ b/app/api/attachment-delete/route.ts
@@ -0,0 +1,76 @@
+// /api/attachment-delete/route.ts
+
+import { NextRequest, NextResponse } from 'next/server'
+import db from '@/db/db'
+import { documentAttachments } from '@/db/schema' // 실제 스키마에 맞게 수정
+import { eq, and } from 'drizzle-orm'
+import fs from 'fs/promises'
+import path from 'path'
+
+export async function DELETE(request: NextRequest) {
+ try {
+ const { attachmentId, revisionId } = await request.json()
+
+ if (!attachmentId || !revisionId) {
+ return NextResponse.json(
+ { error: 'attachmentId and revisionId are required' },
+ { status: 400 }
+ )
+ }
+
+ // 1. 데이터베이스에서 첨부파일 정보 조회
+ const attachment = await db
+ .select()
+ .from(documentAttachments)
+ .where(
+ and(
+ eq(documentAttachments.id, attachmentId),
+ eq(documentAttachments.revisionId, revisionId)
+ )
+ )
+ .limit(1)
+
+ if (!attachment || attachment.length === 0) {
+ return NextResponse.json(
+ { error: 'Attachment not found' },
+ { status: 404 }
+ )
+ }
+
+ const attachmentData = attachment[0]
+
+ // 2. dolceFilePath 체크 - 있으면 삭제 불가
+ if (attachmentData.dolceFilePath && attachmentData.dolceFilePath.trim() !== '') {
+ return NextResponse.json(
+ { error: 'Cannot delete processed file' },
+ { status: 403 }
+ )
+ }
+
+ // 4. 데이터베이스에서 첨부파일 레코드 삭제
+ await db
+ .delete(documentAttachments)
+ .where(
+ and(
+ eq(documentAttachments.id, attachmentId),
+ eq(documentAttachments.revisionId, revisionId)
+ )
+ )
+
+ return NextResponse.json({
+ success: true,
+ message: 'Attachment deleted successfully',
+ deletedAttachmentId: attachmentId
+ })
+
+ } catch (error) {
+ console.error('Attachment deletion error:', error)
+ return NextResponse.json(
+ {
+ error: 'Internal server error',
+ details: error instanceof Error ? error.message : 'Unknown error'
+ },
+ { status: 500 }
+ )
+ }
+}
\ No newline at end of file
diff --git a/app/api/files/[...path]/route.ts b/app/api/files/[...path]/route.ts
index 5eab8210..9ef11bc7 100644
--- a/app/api/files/[...path]/route.ts
+++ b/app/api/files/[...path]/route.ts
@@ -36,6 +36,7 @@ const isAllowedPath = (requestedPath: string): boolean => {
'vendorFormReportSample',
'vendorFormData',
'uploads',
+ 'documents',
'tech-sales',
'techsales-rfq',
'tech-vendors',
diff --git a/app/api/revision-attachment/route.ts b/app/api/revision-attachment/route.ts
index 092eed8d..46c2e9c9 100644
--- a/app/api/revision-attachment/route.ts
+++ b/app/api/revision-attachment/route.ts
@@ -1,8 +1,4 @@
import { NextRequest, NextResponse } from "next/server"
-import { writeFile } from "fs/promises"
-import { join } from "path"
-import { v4 as uuidv4 } from "uuid"
-import path from "path"
import { revalidateTag } from "next/cache"
import db from "@/db/db"
@@ -14,6 +10,9 @@ import {
} from "@/db/schema/vendorDocu"
import { eq } from "drizzle-orm"
+/* 보안 강화된 파일 저장 유틸리티 */
+import { saveFile, SaveFileResult, saveFileStream } from "@/lib/file-stroage"
+
/* change log 유틸 */
import {
logAttachmentChange,
@@ -35,13 +34,16 @@ export async function POST(request: NextRequest) {
if (!attachmentFiles.length)
return NextResponse.json({ error: "No files provided" }, { status: 400 })
- const MAX = 50 * 1024 * 1024 // 50MB
- for (const f of attachmentFiles)
- if (f.size > MAX)
+ // 기본 파일 크기 검증 (보안 함수에서도 검증하지만 조기 체크)
+ const MAX = 1024 * 1024 * 1024 // 1GB로 증가 (첫 번째 파일과 동일)
+ for (const f of attachmentFiles) {
+ if (f.size > MAX) {
return NextResponse.json(
- { error: `${f.name} exceeds 50MB limit` },
+ { error: `${f.name} exceeds 1GB limit` },
{ status: 400 }
)
+ }
+ }
/* ------- 리비전 및 계약 정보 확보 ------- */
const [revisionInfo] = await db
@@ -52,6 +54,7 @@ export async function POST(request: NextRequest) {
usageType: revisions.usageType,
issueStageId: revisions.issueStageId,
projectId: documents.projectId,
+ vendorId: documents.vendorId,
})
.from(revisions)
.innerJoin(issueStages, eq(revisions.issueStageId, issueStages.id))
@@ -63,41 +66,60 @@ export async function POST(request: NextRequest) {
return NextResponse.json({ error: "Revision not found" }, { status: 404 })
}
+ // vendorId가 null인 경우 처리
+ if (!revisionInfo.vendorId) {
+ return NextResponse.json({
+ error: "Revision must have a valid vendor ID for synchronization"
+ }, { status: 400 })
+ }
+
/* ------- 트랜잭션 ------- */
const result = await db.transaction(async (tx) => {
- /* 첨부파일 처리 */
+ /* ------- 보안 강화된 첨부파일 처리 ------- */
const uploadedFiles: any[] = []
- const baseDir = join(process.cwd(), "public", "documents")
+ const securityFailures: string[] = []
for (const file of attachmentFiles) {
- const ext = path.extname(file.name)
- const fname = uuidv4() + ext
- const dest = join(baseDir, fname)
-
- await writeFile(dest, Buffer.from(await file.arrayBuffer()))
-
+ console.log(`🔐 보안 검증 시작: ${file.name}`)
+
+ // 보안 강화된 파일 저장
+ const saveResult = file.size > 100 * 1024 * 1024
+ ? await saveFileStream({ file, directory: "documents", userId: uploaderName || "" })
+ : await saveFile({ file, directory: "documents", userId: uploaderName || "" })
+
+ if (!saveResult.success) {
+ console.error(`❌ 파일 보안 검증 실패: ${file.name} - ${saveResult.error}`)
+ securityFailures.push(`${file.name}: ${saveResult.error}`)
+ continue // 실패한 파일은 건너뛰고 계속 진행
+ }
+
+ console.log(`✅ 파일 보안 검증 통과: ${file.name}`)
+ console.log(`📁 저장된 경로: ${saveResult.publicPath}`)
+
+ // DB에 첨부파일 정보 저장
const [att] = await tx.insert(documentAttachments)
.values({
revisionId,
- fileName: file.name,
- filePath: "/documents/" + fname,
- fileSize: file.size,
- fileType: ext.slice(1).toLowerCase() || undefined,
+ fileName: saveResult.originalName!, // 원본 파일명
+ filePath: saveResult.publicPath!, // 웹 접근 경로
+ fileSize: saveResult.fileSize!,
+ fileType: saveResult.fileName!.split('.').pop()?.toLowerCase() || undefined,
updatedAt: new Date(),
})
.returning()
uploadedFiles.push({
id: att.id,
- fileName: file.name,
- fileSize: file.size,
- filePath: att.filePath,
- fileType: ext.slice(1).toLowerCase() || null,
+ fileName: saveResult.originalName,
+ fileSize: saveResult.fileSize,
+ filePath: saveResult.publicPath,
+ fileType: saveResult.fileName!.split('.').pop()?.toLowerCase() || null,
+ securityChecks: saveResult.securityChecks, // 보안 검증 결과
})
// change_logs: attachment CREATE
await logAttachmentChange(
- revisionInfo.projectId,
+ revisionInfo.vendorId!,
att.id,
"CREATE",
att,
@@ -108,6 +130,16 @@ export async function POST(request: NextRequest) {
)
}
+ // 보안 검증 실패한 파일이 있으면 경고 반환
+ if (securityFailures.length > 0) {
+ console.warn(`⚠️ 일부 파일의 보안 검증 실패:`, securityFailures)
+
+ // 모든 파일이 실패한 경우 에러 반환
+ if (uploadedFiles.length === 0) {
+ throw new Error(`모든 파일의 보안 검증이 실패했습니다: ${securityFailures.join(', ')}`)
+ }
+ }
+
/* 리비전 updatedAt 업데이트 */
await tx.update(revisions)
.set({ updatedAt: new Date() })
@@ -119,30 +151,36 @@ export async function POST(request: NextRequest) {
usage: revisionInfo.usage,
usageType: revisionInfo.usageType,
uploadedFiles,
- projectId: revisionInfo.projectId
+ vendorId: revisionInfo.vendorId,
+ securityFailures // 보안 실패 정보 포함
}
})
// 캐시 무효화
try {
- // revalidateTag(`enhanced-documents-${result.projectId}`)
- revalidateTag(`sync-status-${result.projectId}`)
-
- console.log(`✅ Cache invalidated for contract ${result.projectId}`)
+ revalidateTag(`sync-status-${result.vendorId}`)
+ console.log(`✅ Cache invalidated for contract ${result.vendorId}`)
} catch (cacheError) {
console.warn('⚠️ Cache invalidation failed:', cacheError)
}
+ // 응답 메시지 구성
+ let message = `${result.uploadedFiles.length}개 첨부파일이 추가되었습니다`
+ if (result.securityFailures.length > 0) {
+ message += ` (일부 파일 보안 검증 실패: ${result.securityFailures.length}개)`
+ }
+
return NextResponse.json({
success: true,
- message: `${result.uploadedFiles.length}개 첨부파일이 추가되었습니다`,
+ message,
data: {
revisionId: result.revisionId,
revision: result.revision,
usage: result.usage,
usageType: result.usageType,
uploadedFiles: result.uploadedFiles,
- filesCount: result.uploadedFiles.length
+ filesCount: result.uploadedFiles.length,
+ securityFailures: result.securityFailures, // 클라이언트에 보안 실패 정보 전달
},
})
} catch (e) {
diff --git a/app/api/revision-upload-ship/route.ts b/app/api/revision-upload-ship/route.ts
index 671b8bac..b07a3d9c 100644
--- a/app/api/revision-upload-ship/route.ts
+++ b/app/api/revision-upload-ship/route.ts
@@ -56,7 +56,8 @@ export async function POST(request: NextRequest) {
const [docInfo] = await db
.select({
contractId: documents.contractId,
- projectId: documents.projectId
+ projectId: documents.projectId ,
+ vendorId: documents.vendorId ,
})
.from(documents)
.where(eq(documents.id, docId))
@@ -67,7 +68,7 @@ export async function POST(request: NextRequest) {
}
// projectId가 null인 경우 처리
- if (!docInfo.projectId) {
+ if (!docInfo.vendorId) {
return NextResponse.json({
error: "Document must have a valid project ID for synchronization"
}, { status: 400 })
@@ -158,7 +159,7 @@ export async function POST(request: NextRequest) {
revisionData = updated
await logRevisionChange(
- docInfo.projectId!, // null 체크 후이므로 non-null assertion 사용
+ docInfo.vendorId!, // null 체크 후이므로 non-null assertion 사용
revisionId,
"UPDATE",
updated,
@@ -188,7 +189,7 @@ export async function POST(request: NextRequest) {
revisionData = newRev
await logRevisionChange(
- docInfo.projectId!, // null 체크 후이므로 non-null assertion 사용
+ docInfo.vendorId!, // null 체크 후이므로 non-null assertion 사용
revisionId,
"CREATE",
newRev,
@@ -243,7 +244,7 @@ export async function POST(request: NextRequest) {
// change_logs: attachment CREATE
await logAttachmentChange(
- docInfo.projectId!,
+ docInfo.vendorId!,
att.id,
"CREATE",
att,
@@ -275,7 +276,7 @@ export async function POST(request: NextRequest) {
stage,
revision,
uploadedFiles,
- contractId: docInfo.contractId,
+ vendorId: docInfo.vendorId,
usage,
usageType,
securityFailures // 보안 실패 정보 포함
@@ -284,8 +285,8 @@ export async function POST(request: NextRequest) {
// 캐시 무효화
try {
- revalidateTag(`sync-status-${result.contractId}`)
- console.log(`✅ Cache invalidated for contract ${result.contractId}`)
+ revalidateTag(`sync-status-${result.vendorId}`)
+ console.log(`✅ Cache invalidated for contract ${result.vendorId}`)
} catch (cacheError) {
console.warn('⚠️ Cache invalidation failed:', cacheError)
}
diff --git a/app/api/sync/batches/route.ts b/app/api/sync/batches/route.ts
index 7a72530d..1f37d6e6 100644
--- a/app/api/sync/batches/route.ts
+++ b/app/api/sync/batches/route.ts
@@ -10,7 +10,7 @@ export async function GET(request: NextRequest) {
if (!projectId) {
return NextResponse.json(
- { error: 'Contract ID is required' },
+ { error: 'Vendor ID is required' },
{ status: 400 }
)
}
diff --git a/app/api/sync/config/route.ts b/app/api/sync/config/route.ts
index db5d17ca..2e9a073a 100644
--- a/app/api/sync/config/route.ts
+++ b/app/api/sync/config/route.ts
@@ -6,10 +6,10 @@ import { authOptions } from "@/app/api/auth/[...nextauth]/route"
export async function GET(request: NextRequest) {
try {
const { searchParams } = new URL(request.url)
- const projectId = searchParams.get('projectId')
+ const vendorId = searchParams.get('vendorId')
const targetSystem = searchParams.get('targetSystem') || 'SHI'
- if (!projectId) {
+ if (!vendorId) {
return NextResponse.json(
{ error: 'Contract ID is required' },
{ status: 400 }
@@ -17,7 +17,7 @@ export async function GET(request: NextRequest) {
}
const config = await syncService.getSyncConfig(
- parseInt(projectId),
+ parseInt(vendorId),
targetSystem
)
@@ -65,7 +65,7 @@ export async function POST(request: NextRequest) {
}
await syncService.upsertSyncConfig({
- projectId,
+ vendorId,
targetSystem,
endpointUrl,
authToken,
diff --git a/app/api/sync/status/route.ts b/app/api/sync/status/route.ts
index b4b18577..05101d2b 100644
--- a/app/api/sync/status/route.ts
+++ b/app/api/sync/status/route.ts
@@ -38,7 +38,7 @@ export async function GET(request: NextRequest) {
if (!projectId) {
return NextResponse.json(
- { error: 'Project ID is required' },
+ { error: 'project ID is required' },
{ status: 400 }
)
}
diff --git a/components/document-lists/vendor-doc-list-client.tsx b/components/document-lists/vendor-doc-list-client.tsx
index 0c4af106..4aa00ad7 100644
--- a/components/document-lists/vendor-doc-list-client.tsx
+++ b/components/document-lists/vendor-doc-list-client.tsx
@@ -5,6 +5,7 @@ import { useRouter, useParams } from "next/navigation"
import DocumentContainer from "@/components/documents/document-container"
import { ProjectInfo, ProjectSwitcher } from "@/components/documents/project-swicher"
import { InformationButton } from "@/components/information/information-button"
+import { useTranslation } from "@/i18n/client"
interface VendorDocumentsClientProps {
projects: ProjectInfo[]
children: React.ReactNode
@@ -16,6 +17,8 @@ export default function VendorDocumentListClient({
}: VendorDocumentsClientProps) {
const router = useRouter()
const params = useParams()
+ const lng = (params?.lng as string) || "ko"
+ const { t } = useTranslation(lng, "engineering")
// Get the contractId from route parameters
const contractIdFromUrl = React.useMemo(() => {
@@ -51,7 +54,7 @@ export default function VendorDocumentListClient({
setProjectType("plant")
// Navigate to the contract's documents page
- router.push(`/partners/document-list-only/${contractId}?projectType=plant`)
+ router.push(`/${lng}/partners/document-list-only/${contractId}?projectType=plant`)
}
return (
@@ -61,15 +64,15 @@ export default function VendorDocumentListClient({
{/* 왼쪽: 타이틀 & 설명 */}
-
협력업체 문서 리스트 관리
+ {t("vendorDocuments.title")}
- {/*
+
{projectType === "ship"
- ? "삼성중공업 문서시스템으로부터 목록을 가져오고 문서 파일을 등록하여 삼성중공업으로 전달할 수 있습니다."
- : "문서리스트와 이슈스테이지를 생성하고 관리할 수 있으며 문서 파일을 등록하여 삼성중공업으로 전달할 수 있습니다."
+ ? t("vendorDocuments.shipDescription")
+ : t("vendorDocuments.plantDescription")
}
-
*/}
+
{/* 오른쪽: ProjectSwitcher */}
diff --git a/components/documents/project-swicher.tsx b/components/documents/project-swicher.tsx
index 5c70ea88..45300b56 100644
--- a/components/documents/project-swicher.tsx
+++ b/components/documents/project-swicher.tsx
@@ -1,7 +1,9 @@
"use client"
import * as React from "react"
+import { useParams } from "next/navigation"
import { cn } from "@/lib/utils"
+import { useTranslation } from "@/i18n/client"
import {
Select,
SelectContent,
@@ -54,6 +56,10 @@ export function ProjectSwitcher({
selectedContractId,
onSelectContract,
}: ProjectSwitcherProps) {
+ const params = useParams()
+ const lng = (params?.lng as string) || "ko"
+ const { t } = useTranslation(lng, "engineering")
+
// Select value = stringified contractId
const selectValue = selectedContractId ? String(selectedContractId) : ""
@@ -69,8 +75,8 @@ export function ProjectSwitcher({
return null
}, [projects, selectedContractId])
- // Trigger Label => 계약 이름 or "Select a contract"
- const triggerLabel = selectedContract?.contractName ?? "Select a contract"
+ // Trigger Label => 계약 이름 or placeholder
+ const triggerLabel = selectedContract?.contractName ?? t("vendorDocuments.projectSwitcher.selectContractPlaceholder")
function handleValueChange(val: string) {
const contractId = Number(val)
@@ -98,9 +104,9 @@ export function ProjectSwitcher({
isCollapsed && "flex h-9 w-9 shrink-0 items-center justify-center p-0",
"max-w-[300px] whitespace-nowrap overflow-hidden text-ellipsis"
)}
- aria-label="Select Contract"
+ aria-label={t("vendorDocuments.projectSwitcher.selectContract")}
>
-
+
{/* 실제 표시부분에도 ellipsis 처리. */}
- {(isSyncingTags || isLoadingTags) && (
+ {(isSyncingTags || isLoadingTags) ? (
- )}
-
+ ):
+ }
{t("buttons.tagOperations")}
diff --git a/components/form-data/spreadJS-dialog copy 2.tsx b/components/form-data/spreadJS-dialog copy 2.tsx
new file mode 100644
index 00000000..520362ff
--- /dev/null
+++ b/components/form-data/spreadJS-dialog copy 2.tsx
@@ -0,0 +1,1002 @@
+"use client";
+
+import * as React from "react";
+import dynamic from "next/dynamic";
+import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter, DialogDescription } from "@/components/ui/dialog";
+import { Button } from "@/components/ui/button";
+import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
+import { GenericData } from "./export-excel-form";
+import * as GC from "@mescius/spread-sheets";
+import { toast } from "sonner";
+import { updateFormDataInDB } from "@/lib/forms/services";
+import { Loader, Save, AlertTriangle } from "lucide-react";
+import '@mescius/spread-sheets/styles/gc.spread.sheets.excel2016colorful.css';
+import { DataTableColumnJSON, ColumnType } from "./form-data-table-columns";
+
+// SpreadSheets를 동적으로 import (SSR 비활성화)
+const SpreadSheets = dynamic(
+ () => import("@mescius/spread-sheets-react").then(mod => mod.SpreadSheets),
+ {
+ ssr: false,
+ loading: () => (
+
+
+ Loading SpreadSheets...
+
+ )
+ }
+);
+
+// 라이센스 키 설정을 클라이언트에서만 실행
+if (typeof window !== 'undefined' && process.env.NEXT_PUBLIC_SPREAD_LICENSE) {
+ GC.Spread.Sheets.LicenseKey = process.env.NEXT_PUBLIC_SPREAD_LICENSE;
+}
+
+interface TemplateItem {
+ TMPL_ID: string;
+ NAME: string;
+ TMPL_TYPE: string;
+ SPR_LST_SETUP: {
+ ACT_SHEET: string;
+ HIDN_SHEETS: Array;
+ CONTENT?: string;
+ DATA_SHEETS: Array<{
+ SHEET_NAME: string;
+ REG_TYPE_ID: string;
+ MAP_CELL_ATT: Array<{
+ ATT_ID: string;
+ IN: string;
+ }>;
+ }>;
+ };
+ GRD_LST_SETUP: {
+ REG_TYPE_ID: string;
+ SPR_ITM_IDS: Array;
+ ATTS: Array<{}>;
+ };
+ SPR_ITM_LST_SETUP: {
+ ACT_SHEET: string;
+ HIDN_SHEETS: Array;
+ CONTENT?: string;
+ DATA_SHEETS: Array<{
+ SHEET_NAME: string;
+ REG_TYPE_ID: string;
+ MAP_CELL_ATT: Array<{
+ ATT_ID: string;
+ IN: string;
+ }>;
+ }>;
+ };
+}
+
+interface ValidationError {
+ cellAddress: string;
+ attId: string;
+ value: any;
+ expectedType: ColumnType;
+ message: string;
+}
+
+interface CellMapping {
+ attId: string;
+ cellAddress: string;
+ isEditable: boolean;
+ dataRowIndex?: number;
+}
+
+interface TemplateViewDialogProps {
+ isOpen: boolean;
+ onClose: () => void;
+ templateData: TemplateItem[] | any;
+ selectedRow?: GenericData; // SPREAD_ITEM용
+ tableData?: GenericData[]; // SPREAD_LIST용
+ formCode: string;
+ columnsJSON: DataTableColumnJSON[]
+ contractItemId: number;
+ editableFieldsMap?: Map;
+ onUpdateSuccess?: (updatedValues: Record | GenericData[]) => void;
+}
+
+export function TemplateViewDialog({
+ isOpen,
+ onClose,
+ templateData,
+ selectedRow,
+ tableData = [],
+ formCode,
+ contractItemId,
+ columnsJSON,
+ editableFieldsMap = new Map(),
+ onUpdateSuccess
+}: TemplateViewDialogProps) {
+ const [hostStyle, setHostStyle] = React.useState({
+ width: '100%',
+ height: '100%'
+ });
+
+ const [isPending, setIsPending] = React.useState(false);
+ const [hasChanges, setHasChanges] = React.useState(false);
+ const [currentSpread, setCurrentSpread] = React.useState(null);
+ const [cellMappings, setCellMappings] = React.useState([]);
+ const [isClient, setIsClient] = React.useState(false);
+ const [templateType, setTemplateType] = React.useState<'SPREAD_LIST' | 'SPREAD_ITEM' | null>(null);
+ const [validationErrors, setValidationErrors] = React.useState([]);
+ const [selectedTemplateId, setSelectedTemplateId] = React.useState("");
+ const [availableTemplates, setAvailableTemplates] = React.useState([]);
+
+ // 클라이언트 사이드에서만 렌더링되도록 보장
+ React.useEffect(() => {
+ setIsClient(true);
+ }, []);
+
+ // 사용 가능한 템플릿들을 필터링하고 설정
+ React.useEffect(() => {
+ if (!templateData) return;
+
+ let templates: TemplateItem[];
+ if (Array.isArray(templateData)) {
+ templates = templateData as TemplateItem[];
+ } else {
+ templates = [templateData as TemplateItem];
+ }
+
+ // CONTENT가 있는 템플릿들 필터링
+ const validTemplates = templates.filter(template => {
+ const hasSpreadListContent = template.SPR_LST_SETUP?.CONTENT;
+ const hasSpreadItemContent = template.SPR_ITM_LST_SETUP?.CONTENT;
+ const isValidType = template.TMPL_TYPE === "SPREAD_LIST" || template.TMPL_TYPE === "SPREAD_ITEM";
+
+ return isValidType && (hasSpreadListContent || hasSpreadItemContent);
+ });
+
+ setAvailableTemplates(validTemplates);
+
+ // 첫 번째 유효한 템플릿을 기본으로 선택
+ if (validTemplates.length > 0 && !selectedTemplateId) {
+ setSelectedTemplateId(validTemplates[0].TMPL_ID);
+ setTemplateType(validTemplates[0].TMPL_TYPE as 'SPREAD_LIST' | 'SPREAD_ITEM');
+ }
+ }, [templateData, selectedTemplateId]);
+
+ // 선택된 템플릿 변경 처리
+ const handleTemplateChange = (templateId: string) => {
+ const template = availableTemplates.find(t => t.TMPL_ID === templateId);
+ if (template) {
+ setSelectedTemplateId(templateId);
+ setTemplateType(template.TMPL_TYPE as 'SPREAD_LIST' | 'SPREAD_ITEM');
+ setHasChanges(false);
+ setValidationErrors([]);
+
+ // SpreadSheets 재초기화
+ if (currentSpread) {
+ const template = availableTemplates.find(t => t.TMPL_ID === templateId);
+ if (template) {
+ initSpread(currentSpread, template);
+ }
+ }
+ }
+ };
+
+ // 현재 선택된 템플릿 가져오기
+ const selectedTemplate = React.useMemo(() => {
+ return availableTemplates.find(t => t.TMPL_ID === selectedTemplateId);
+ }, [availableTemplates, selectedTemplateId]);
+
+ // 편집 가능한 필드 목록 계산
+ const editableFields = React.useMemo(() => {
+ // SPREAD_ITEM인 경우: selectedRow의 TAG_NO로 확인
+ if (templateType === 'SPREAD_ITEM' && selectedRow?.TAG_NO) {
+ if (!editableFieldsMap.has(selectedRow.TAG_NO)) {
+ return [];
+ }
+ return editableFieldsMap.get(selectedRow.TAG_NO) || [];
+ }
+
+ // SPREAD_LIST인 경우: 첫 번째 행의 TAG_NO를 기준으로 처리
+ if (templateType === 'SPREAD_LIST' && tableData.length > 0) {
+ const firstRowTagNo = tableData[0]?.TAG_NO;
+ if (firstRowTagNo && editableFieldsMap.has(firstRowTagNo)) {
+ return editableFieldsMap.get(firstRowTagNo) || [];
+ }
+ }
+
+ return [];
+ }, [templateType, selectedRow?.TAG_NO, tableData, editableFieldsMap]);
+
+ // 필드가 편집 가능한지 판별하는 함수
+ const isFieldEditable = React.useCallback((attId: string, rowData?: GenericData) => {
+ // columnsJSON에서 해당 attId의 shi 값 확인
+ const columnConfig = columnsJSON.find(col => col.key === attId);
+ if (columnConfig?.shi === true) {
+ return false; // columnsJSON에서 shi가 true이면 편집 불가
+ }
+
+ // TAG_NO와 TAG_DESC는 기본적으로 편집 가능 (columnsJSON의 shi가 false인 경우)
+ if (attId === "TAG_NO" || attId === "TAG_DESC") {
+ return true;
+ }
+
+ // SPREAD_ITEM인 경우: editableFields 체크
+ if (templateType === 'SPREAD_ITEM') {
+ return editableFields.includes(attId);
+ }
+
+ // SPREAD_LIST인 경우: 개별 행의 편집 가능성도 고려
+ if (templateType === 'SPREAD_LIST') {
+ // 기본적으로 editableFields에 포함되어야 함
+ if (!editableFields.includes(attId)) {
+ return false;
+ }
+
+ // rowData가 제공된 경우 해당 행의 shi 상태도 확인
+ if (rowData && rowData.shi === true) {
+ return false;
+ }
+
+ return true;
+ }
+
+ // 기본적으로는 editableFields 체크
+ // return editableFields.includes(attId);
+ return true;
+ }, [templateType, columnsJSON, editableFields]);
+
+ // 편집 가능한 필드 개수 계산
+ const editableFieldsCount = React.useMemo(() => {
+ return cellMappings.filter(m => m.isEditable).length;
+ }, [cellMappings]);
+
+ // 셀 주소를 행과 열로 변환하는 함수
+ const parseCellAddress = (address: string): { row: number, col: number } | null => {
+ if (!address || address.trim() === "") return null;
+
+ const match = address.match(/^([A-Z]+)(\d+)$/);
+ if (!match) return null;
+
+ const [, colStr, rowStr] = match;
+
+ let col = 0;
+ for (let i = 0; i < colStr.length; i++) {
+ col = col * 26 + (colStr.charCodeAt(i) - 65 + 1);
+ }
+ col -= 1;
+
+ const row = parseInt(rowStr) - 1;
+
+ return { row, col };
+ };
+
+ // 데이터 타입 검증 함수
+ const validateCellValue = (value: any, columnType: ColumnType, options?: string[]): string | null => {
+ if (value === undefined || value === null || value === "") {
+ return null; // 빈 값은 별도 required 검증에서 처리
+ }
+
+ switch (columnType) {
+ case "NUMBER":
+ if (isNaN(Number(value))) {
+ return "Value must be a valid number";
+ }
+ break;
+ case "LIST":
+ if (options && !options.includes(String(value))) {
+ return `Value must be one of: ${options.join(", ")}`;
+ }
+ break;
+ case "STRING":
+ // STRING 타입은 대부분의 값을 허용
+ break;
+ default:
+ // 커스텀 타입의 경우 추가 검증 로직이 필요할 수 있음
+ break;
+ }
+
+ return null;
+ };
+
+ // 전체 데이터 검증 함수
+ const validateAllData = React.useCallback(() => {
+ if (!currentSpread || !selectedTemplate) return [];
+
+ const activeSheet = currentSpread.getActiveSheet();
+ const errors: ValidationError[] = [];
+
+ cellMappings.forEach(mapping => {
+ const columnConfig = columnsJSON.find(col => col.key === mapping.attId);
+ if (!columnConfig) return;
+
+ const cellPos = parseCellAddress(mapping.cellAddress);
+ if (!cellPos) return;
+
+ if (templateType === 'SPREAD_ITEM') {
+ // 단일 행 검증
+ const cellValue = activeSheet.getValue(cellPos.row, cellPos.col);
+ const errorMessage = validateCellValue(cellValue, columnConfig.type, columnConfig.options);
+
+ if (errorMessage) {
+ errors.push({
+ cellAddress: mapping.cellAddress,
+ attId: mapping.attId,
+ value: cellValue,
+ expectedType: columnConfig.type,
+ message: errorMessage
+ });
+ }
+ } else if (templateType === 'SPREAD_LIST') {
+ // 복수 행 검증 - 각 매핑은 이미 개별 행을 가리킴
+ const cellValue = activeSheet.getValue(cellPos.row, cellPos.col);
+ const errorMessage = validateCellValue(cellValue, columnConfig.type, columnConfig.options);
+
+ if (errorMessage) {
+ errors.push({
+ cellAddress: mapping.cellAddress,
+ attId: mapping.attId,
+ value: cellValue,
+ expectedType: columnConfig.type,
+ message: errorMessage
+ });
+ }
+ }
+ });
+
+ setValidationErrors(errors);
+ return errors;
+ }, [currentSpread, selectedTemplate, cellMappings, columnsJSON, templateType]);
+
+ // ═══════════════════════════════════════════════════════════════════════════════
+ // 🛠️ 헬퍼 함수들
+ // ═══════════════════════════════════════════════════════════════════════════════
+
+ // 🎨 셀 스타일 생성
+ const createCellStyle = React.useCallback((isEditable: boolean) => {
+ const style = new GC.Spread.Sheets.Style();
+ if (isEditable) {
+ style.backColor = "#f0fdf4"; // 연한 초록 (편집 가능)
+ } else {
+ style.backColor = "#f9fafb"; // 연한 회색 (읽기 전용)
+ style.foreColor = "#6b7280";
+ }
+ return style;
+ }, []);
+
+
+// 🎯 간소화된 드롭다운 설정 - setupSimpleValidation 완전 제거
+
+const setupOptimizedListValidation = React.useCallback((activeSheet: any, cellPos: { row: number, col: number }, options: string[], rowCount: number) => {
+ try {
+ console.log(`🎯 Setting up dropdown for ${rowCount} rows with options:`, options);
+
+ // ✅ options 정규화
+ const safeOptions = options
+ .filter(opt => opt !== null && opt !== undefined && opt !== '')
+ .map(opt => String(opt).trim())
+ .filter(opt => opt.length > 0)
+ .filter((opt, index, arr) => arr.indexOf(opt) === index)
+ .slice(0, 20);
+
+ if (safeOptions.length === 0) {
+ console.warn(`⚠️ No valid options found, skipping`);
+ return;
+ }
+
+ console.log(`📋 Safe options:`, safeOptions);
+
+ // ✅ DataValidation용 문자열 준비
+ const optionsString = safeOptions.join(',');
+
+ // 🔑 핵심 수정: 각 셀마다 개별 ComboBox 인스턴스 생성!
+ for (let i = 0; i < rowCount; i++) {
+ try {
+ const targetRow = cellPos.row + i;
+
+ // ✅ 각 셀마다 새로운 ComboBox 인스턴스 생성
+ const comboBoxCellType = new GC.Spread.Sheets.CellTypes.ComboBox();
+ comboBoxCellType.items(safeOptions); // 배열로 전달
+ comboBoxCellType.editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.text);
+
+ // ✅ 각 셀마다 새로운 DataValidation 인스턴스 생성
+ const cellValidator = GC.Spread.Sheets.DataValidation.createListValidator(optionsString);
+
+ // ComboBox + DataValidation 둘 다 적용
+ activeSheet.setCellType(targetRow, cellPos.col, comboBoxCellType);
+ activeSheet.setDataValidator(targetRow, cellPos.col, cellValidator);
+
+ // 셀 잠금 해제
+ const cell = activeSheet.getCell(targetRow, cellPos.col);
+ cell.locked(false);
+
+ console.log(`✅ Individual dropdown applied to [${targetRow}, ${cellPos.col}]`);
+
+ } catch (cellError) {
+ console.warn(`⚠️ Failed to apply to row ${cellPos.row + i}:`, cellError);
+ }
+ }
+
+ console.log(`✅ Safe dropdown setup completed for ${rowCount} cells`);
+
+ } catch (error) {
+ console.error('❌ Dropdown setup failed:', error);
+ }
+}, []);
+ // 🚀 행 용량 확보
+ const ensureRowCapacity = React.useCallback((activeSheet: any, requiredRowCount: number) => {
+ const currentRowCount = activeSheet.getRowCount();
+ if (requiredRowCount > currentRowCount) {
+ activeSheet.setRowCount(requiredRowCount + 10); // 여유분 추가
+ console.log(`📈 Expanded sheet to ${requiredRowCount + 10} rows`);
+ }
+ }, []);
+
+ // 🛡️ 시트 보호 및 이벤트 설정
+ const setupSheetProtectionAndEvents = React.useCallback((activeSheet: any, mappings: CellMapping[]) => {
+ console.log(`🛡️ Setting up protection and events for ${mappings.length} mappings`);
+
+ // 시트 보호 설정
+ activeSheet.options.isProtected = true;
+ activeSheet.options.protectionOptions = {
+ allowSelectLockedCells: true,
+ allowSelectUnlockedCells: true,
+ allowSort: false,
+ allowFilter: false,
+ allowEditObjects: false,
+ allowResizeRows: false,
+ allowResizeColumns: false
+ };
+
+ // 🎯 변경 감지 이벤트
+ const changeEvents = [
+ GC.Spread.Sheets.Events.CellChanged,
+ GC.Spread.Sheets.Events.ValueChanged,
+ GC.Spread.Sheets.Events.ClipboardPasted
+ ];
+
+ changeEvents.forEach(eventType => {
+ activeSheet.bind(eventType, () => {
+ console.log(`📝 ${eventType} detected`);
+ setHasChanges(true);
+ });
+ });
+
+ // 🚫 편집 시작 권한 확인 (수정됨)
+ activeSheet.bind(GC.Spread.Sheets.Events.EditStarting, (event: any, info: any) => {
+ console.log(`🎯 EditStarting: Row ${info.row}, Col ${info.col}`);
+
+ // ✅ 정확한 매핑 찾기 (행/열 정확히 일치)
+ const exactMapping = mappings.find(m => {
+ const cellPos = parseCellAddress(m.cellAddress);
+ return cellPos && cellPos.row === info.row && cellPos.col === info.col;
+ });
+
+ if (!exactMapping) {
+ console.log(`ℹ️ No mapping found for [${info.row}, ${info.col}] - allowing edit`);
+ return; // 매핑이 없으면 허용 (템플릿 영역 밖)
+ }
+
+ console.log(`📋 Found mapping: ${exactMapping.attId} at ${exactMapping.cellAddress}`);
+
+ // 기본 편집 권한 확인
+ if (!exactMapping.isEditable) {
+ console.log(`🚫 Field ${exactMapping.attId} is not editable`);
+ toast.warning(`${exactMapping.attId} field is read-only`);
+ info.cancel = true;
+ return;
+ }
+
+ // SPREAD_LIST 개별 행 SHI 확인
+ if (templateType === 'SPREAD_LIST' && exactMapping.dataRowIndex !== undefined) {
+ const dataRowIndex = exactMapping.dataRowIndex;
+
+ console.log(`🔍 Checking SHI for data row ${dataRowIndex}`);
+
+ if (dataRowIndex >= 0 && dataRowIndex < tableData.length) {
+ const rowData = tableData[dataRowIndex];
+ if (rowData?.shi === true) {
+ console.log(`🚫 Row ${dataRowIndex} is in SHI mode`);
+ toast.warning(`Row ${dataRowIndex + 1}: ${exactMapping.attId} field is read-only (SHI mode)`);
+ info.cancel = true;
+ return;
+ }
+ } else {
+ console.warn(`⚠️ Invalid dataRowIndex: ${dataRowIndex} (tableData.length: ${tableData.length})`);
+ }
+ }
+
+ console.log(`✅ Edit allowed for ${exactMapping.attId}`);
+ });
+
+ // ✅ 편집 완료 검증 (수정됨)
+ activeSheet.bind(GC.Spread.Sheets.Events.EditEnded, (event: any, info: any) => {
+ console.log(`🏁 EditEnded: Row ${info.row}, Col ${info.col}`);
+
+ // ✅ 정확한 매핑 찾기
+ const exactMapping = mappings.find(m => {
+ const cellPos = parseCellAddress(m.cellAddress);
+ return cellPos && cellPos.row === info.row && cellPos.col === info.col;
+ });
+
+ if (!exactMapping) {
+ console.log(`ℹ️ No mapping found for [${info.row}, ${info.col}] - skipping validation`);
+ return;
+ }
+
+ const columnConfig = columnsJSON.find(col => col.key === exactMapping.attId);
+ if (columnConfig) {
+ const cellValue = activeSheet.getValue(info.row, info.col);
+ console.log(`🔍 Validating ${exactMapping.attId}: "${cellValue}"`);
+
+ const errorMessage = validateCellValue(cellValue, columnConfig.type, columnConfig.options);
+ const cell = activeSheet.getCell(info.row, info.col);
+
+ if (errorMessage) {
+ console.log(`❌ Validation failed: ${errorMessage}`);
+
+ // 🚨 에러 스타일 적용 (편집 가능 상태 유지)
+ const errorStyle = new GC.Spread.Sheets.Style();
+ errorStyle.backColor = "#fef2f2";
+ errorStyle.foreColor = "#dc2626";
+ errorStyle.borderLeft = new GC.Spread.Sheets.LineBorder("#dc2626", GC.Spread.Sheets.LineStyle.thick);
+ errorStyle.borderRight = new GC.Spread.Sheets.LineBorder("#dc2626", GC.Spread.Sheets.LineStyle.thick);
+ errorStyle.borderTop = new GC.Spread.Sheets.LineBorder("#dc2626", GC.Spread.Sheets.LineStyle.thick);
+ errorStyle.borderBottom = new GC.Spread.Sheets.LineBorder("#dc2626", GC.Spread.Sheets.LineStyle.thick);
+
+ activeSheet.setStyle(info.row, info.col, errorStyle);
+ cell.locked(!exactMapping.isEditable);
+
+ toast.warning(`Invalid value in ${exactMapping.attId}: ${errorMessage}. Please correct the value.`, { duration: 5000 });
+ } else {
+ console.log(`✅ Validation passed`);
+
+ // ✅ 정상 스타일 복원
+ const normalStyle = createCellStyle(exactMapping.isEditable);
+ activeSheet.setStyle(info.row, info.col, normalStyle);
+ cell.locked(!exactMapping.isEditable);
+ }
+ }
+ });
+
+ console.log(`🛡️ Protection and events configured for ${mappings.length} mappings`);
+ }, [templateType, tableData, createCellStyle, validateCellValue, columnsJSON]);
+
+ // ═══════════════════════════════════════════════════════════════════════════════
+ // 🏗️ 메인 SpreadSheets 초기화 함수
+ // ═══════════════════════════════════════════════════════════════════════════════
+
+ const initSpread = React.useCallback((spread: any, template?: TemplateItem) => {
+ const workingTemplate = template || selectedTemplate;
+ if (!spread || !workingTemplate) return;
+
+ try {
+ // 🔄 초기 설정
+ setCurrentSpread(spread);
+ setHasChanges(false);
+ setValidationErrors([]);
+
+ // 📋 템플릿 콘텐츠 및 데이터 시트 추출
+ let contentJson = null;
+ let dataSheets = null;
+
+ // SPR_LST_SETUP.CONTENT 우선 사용
+ if (workingTemplate.SPR_LST_SETUP?.CONTENT) {
+ contentJson = workingTemplate.SPR_LST_SETUP.CONTENT;
+ dataSheets = workingTemplate.SPR_LST_SETUP.DATA_SHEETS;
+ console.log('✅ Using SPR_LST_SETUP.CONTENT for template:', workingTemplate.NAME);
+ }
+ // SPR_ITM_LST_SETUP.CONTENT 대안 사용
+ else if (workingTemplate.SPR_ITM_LST_SETUP?.CONTENT) {
+ contentJson = workingTemplate.SPR_ITM_LST_SETUP.CONTENT;
+ dataSheets = workingTemplate.SPR_ITM_LST_SETUP.DATA_SHEETS;
+ console.log('✅ Using SPR_ITM_LST_SETUP.CONTENT for template:', workingTemplate.NAME);
+ }
+
+ if (!contentJson) {
+ console.warn('❌ No CONTENT found in template:', workingTemplate.NAME);
+ return;
+ }
+
+ // 🏗️ SpreadSheets 초기화
+ const jsonData = typeof contentJson === 'string' ? JSON.parse(contentJson) : contentJson;
+
+ // 성능을 위한 렌더링 일시 중단
+ spread.suspendPaint();
+
+ try {
+ // 템플릿 구조 로드
+ spread.fromJSON(jsonData);
+ const activeSheet = spread.getActiveSheet();
+
+ // 시트 보호 해제 (편집을 위해)
+ activeSheet.options.isProtected = false;
+
+ // 📊 셀 매핑 및 데이터 처리
+ if (dataSheets && dataSheets.length > 0) {
+ const mappings: CellMapping[] = [];
+
+ // 🔄 각 데이터 시트의 매핑 정보 처리
+ dataSheets.forEach(dataSheet => {
+ if (dataSheet.MAP_CELL_ATT) {
+ dataSheet.MAP_CELL_ATT.forEach(mapping => {
+ const { ATT_ID, IN } = mapping;
+
+ if (IN && IN.trim() !== "") {
+ const cellPos = parseCellAddress(IN);
+ if (cellPos) {
+ const columnConfig = columnsJSON.find(col => col.key === ATT_ID);
+
+ // 🎯 템플릿 타입별 데이터 처리
+ if (templateType === 'SPREAD_ITEM' && selectedRow) {
+ // 📝 단일 행 처리 (SPREAD_ITEM)
+ const isEditable = isFieldEditable(ATT_ID);
+
+ // 매핑 정보 저장
+ mappings.push({
+ attId: ATT_ID,
+ cellAddress: IN,
+ isEditable: isEditable,
+ dataRowIndex: 0
+ });
+
+ const cell = activeSheet.getCell(cellPos.row, cellPos.col);
+ const value = selectedRow[ATT_ID];
+
+ // 값 설정
+ cell.value(value ?? null);
+
+ // 🎨 스타일 및 편집 권한 설정
+ cell.locked(!isEditable);
+ const style = createCellStyle(isEditable);
+ activeSheet.setStyle(cellPos.row, cellPos.col, style);
+
+ // 📋 LIST 타입 드롭다운 설정
+ if (columnConfig?.type === "LIST" && columnConfig.options && isEditable) {
+ setupOptimizedListValidation(activeSheet, cellPos, columnConfig.options, 1);
+ }
+
+ } else if (templateType === 'SPREAD_LIST' && tableData.length > 0) {
+ // 📊 복수 행 처리 (SPREAD_LIST) - 성능 최적화됨
+ console.log(`🔄 Processing SPREAD_LIST for ${ATT_ID} with ${tableData.length} rows`);
+
+ // 🚀 행 확장 (필요시)
+ ensureRowCapacity(activeSheet, cellPos.row + tableData.length);
+
+ // 📋 각 행마다 개별 매핑 생성
+ tableData.forEach((rowData, index) => {
+ const targetRow = cellPos.row + index;
+ const targetCellAddress = `${String.fromCharCode(65 + cellPos.col)}${targetRow + 1}`;
+ const cellEditable = isFieldEditable(ATT_ID, rowData);
+
+ // 개별 매핑 추가
+ mappings.push({
+ attId: ATT_ID,
+ cellAddress: targetCellAddress, // 각 행마다 다른 주소
+ isEditable: cellEditable,
+ dataRowIndex: index // 원본 데이터 인덱스
+ });
+
+ console.log(`📝 Mapping ${ATT_ID} Row ${index}: ${targetCellAddress} (${cellEditable ? 'Editable' : 'ReadOnly'})`);
+ });
+
+ // 📋 LIST 타입 드롭다운 설정 (조건부)
+ if (columnConfig?.type === "LIST" && columnConfig.options) {
+ // 편집 가능한 행이 하나라도 있으면 드롭다운 설정
+ const hasEditableRows = tableData.some((rowData) => isFieldEditable(ATT_ID, rowData));
+ if (hasEditableRows) {
+ setupOptimizedListValidation(activeSheet, cellPos, columnConfig.options, tableData.length);
+ }
+ }
+
+ // 🎨 개별 셀 데이터 및 스타일 설정
+ tableData.forEach((rowData, index) => {
+ const targetRow = cellPos.row + index;
+ const cell = activeSheet.getCell(targetRow, cellPos.col);
+ const value = rowData[ATT_ID];
+
+ // 값 설정
+ cell.value(value ?? null);
+ console.log(`📝 Row ${targetRow}: ${ATT_ID} = "${value}"`);
+
+ // 편집 권한 및 스타일 설정
+ const cellEditable = isFieldEditable(ATT_ID, rowData);
+ cell.locked(!cellEditable);
+ const style = createCellStyle(cellEditable);
+ activeSheet.setStyle(targetRow, cellPos.col, style);
+ });
+ }
+
+ console.log(`📌 Mapped ${ATT_ID} → ${IN} (${templateType})`);
+ }
+ }
+ });
+ }
+ });
+
+ // 💾 매핑 정보 저장 및 이벤트 설정
+ setCellMappings(mappings);
+ setupSheetProtectionAndEvents(activeSheet, mappings);
+ }
+
+ } finally {
+ // 렌더링 재개
+ spread.resumePaint();
+ }
+
+ } catch (error) {
+ console.error('❌ Error initializing spread:', error);
+ toast.error('Failed to load template');
+ if (spread?.resumePaint) {
+ spread.resumePaint();
+ }
+ }
+ }, [selectedTemplate, templateType, selectedRow, tableData, isFieldEditable, columnsJSON, createCellStyle, setupOptimizedListValidation, ensureRowCapacity, setupSheetProtectionAndEvents]);
+
+ // 변경사항 저장 함수
+ const handleSaveChanges = React.useCallback(async () => {
+ if (!currentSpread || !hasChanges) {
+ toast.info("No changes to save");
+ return;
+ }
+
+ // 저장 전 데이터 검증
+ const errors = validateAllData();
+ if (errors.length > 0) {
+ toast.error(`Cannot save: ${errors.length} validation errors found. Please fix them first.`);
+ return;
+ }
+
+ try {
+ setIsPending(true);
+
+ const activeSheet = currentSpread.getActiveSheet();
+
+ if (templateType === 'SPREAD_ITEM' && selectedRow) {
+ // 단일 행 저장
+ const dataToSave = { ...selectedRow };
+
+ cellMappings.forEach(mapping => {
+ if (mapping.isEditable) {
+ const cellPos = parseCellAddress(mapping.cellAddress);
+ if (cellPos) {
+ const cellValue = activeSheet.getValue(cellPos.row, cellPos.col);
+ dataToSave[mapping.attId] = cellValue;
+ }
+ }
+ });
+
+ dataToSave.TAG_NO = selectedRow.TAG_NO;
+
+ const { success, message } = await updateFormDataInDB(
+ formCode,
+ contractItemId,
+ dataToSave
+ );
+
+ if (!success) {
+ toast.error(message);
+ return;
+ }
+
+ toast.success("Changes saved successfully!");
+ onUpdateSuccess?.(dataToSave);
+
+ } else if (templateType === 'SPREAD_LIST' && tableData.length > 0) {
+ // 복수 행 저장
+ const updatedRows: GenericData[] = [];
+ let saveCount = 0;
+
+ for (let i = 0; i < tableData.length; i++) {
+ const originalRow = tableData[i];
+ const dataToSave = { ...originalRow };
+ let hasRowChanges = false;
+
+ // 각 매핑에 대해 해당 행의 값 확인
+ cellMappings.forEach(mapping => {
+ if (mapping.dataRowIndex === i && mapping.isEditable) {
+ const columnConfig = columnsJSON.find(col => col.key === mapping.attId);
+ const isColumnEditable = columnConfig?.shi !== true;
+ const isRowEditable = originalRow.shi !== true;
+
+ if (isColumnEditable && isRowEditable) {
+ const cellPos = parseCellAddress(mapping.cellAddress);
+ if (cellPos) {
+ const cellValue = activeSheet.getValue(cellPos.row, cellPos.col);
+
+ // 값이 변경되었는지 확인
+ if (cellValue !== originalRow[mapping.attId]) {
+ dataToSave[mapping.attId] = cellValue;
+ hasRowChanges = true;
+ }
+ }
+ }
+ }
+ });
+
+ // 변경사항이 있는 행만 저장
+ if (hasRowChanges) {
+ dataToSave.TAG_NO = originalRow.TAG_NO; // TAG_NO는 절대 변경되지 않도록
+
+ const { success } = await updateFormDataInDB(
+ formCode,
+ contractItemId,
+ dataToSave
+ );
+
+ if (success) {
+ updatedRows.push(dataToSave);
+ saveCount++;
+ }
+ } else {
+ updatedRows.push(originalRow); // 변경사항이 없으면 원본 유지
+ }
+ }
+
+ if (saveCount > 0) {
+ toast.success(`${saveCount} rows saved successfully!`);
+ onUpdateSuccess?.(updatedRows);
+ } else {
+ toast.info("No changes to save");
+ }
+ }
+
+ setHasChanges(false);
+ setValidationErrors([]);
+
+ } catch (error) {
+ console.error("Error saving changes:", error);
+ toast.error("An unexpected error occurred while saving");
+ } finally {
+ setIsPending(false);
+ }
+ }, [currentSpread, hasChanges, templateType, selectedRow, tableData, formCode, contractItemId, onUpdateSuccess, cellMappings, columnsJSON, validateAllData]);
+
+ if (!isOpen) return null;
+
+ // 데이터 유효성 검사
+ const isDataValid = templateType === 'SPREAD_ITEM' ? !!selectedRow : tableData.length > 0;
+ const dataCount = templateType === 'SPREAD_ITEM' ? 1 : tableData.length;
+
+ return (
+
+
+
+ SEDP Template - {formCode}
+
+
+ {/* 템플릿 선택 */}
+ {availableTemplates.length > 1 && (
+
+ Template:
+
+
+
+
+
+ {availableTemplates.map(template => (
+
+ {template.NAME} ({template.TMPL_TYPE})
+
+ ))}
+
+
+
+ )}
+
+ {/* 템플릿 정보 */}
+ {selectedTemplate && (
+
+
+ Template Type: {selectedTemplate.TMPL_TYPE === 'SPREAD_LIST' ? 'List View (SPREAD_LIST)' : 'Item View (SPREAD_ITEM)'}
+
+ {templateType === 'SPREAD_ITEM' && selectedRow && (
+
• Selected TAG_NO: {selectedRow.TAG_NO || 'N/A'}
+ )}
+ {templateType === 'SPREAD_LIST' && (
+
• {dataCount} rows
+ )}
+ {hasChanges && (
+
+ • Unsaved changes
+
+ )}
+ {validationErrors.length > 0 && (
+
+
+ {validationErrors.length} validation errors
+
+ )}
+
+ )}
+
+ {/* 범례 */}
+
+
+
+ Editable fields
+
+
+
+ Read-only fields
+
+
+
+ Validation errors
+
+ {cellMappings.length > 0 && (
+
+ {editableFieldsCount} of {cellMappings.length} fields editable
+
+ )}
+
+
+
+
+
+ {/* SpreadSheets 컴포넌트 영역 */}
+
+ {selectedTemplate && isClient && isDataValid ? (
+
+ ) : (
+
+ {!isClient ? (
+ <>
+
+ Loading...
+ >
+ ) : !selectedTemplate ? (
+ "No template available"
+ ) : !isDataValid ? (
+ `No ${templateType === 'SPREAD_ITEM' ? 'selected row' : 'data'} available`
+ ) : (
+ "Template not ready"
+ )}
+
+ )}
+
+
+
+
+
+ Close
+
+
+ {hasChanges && (
+
0}
+ >
+ {isPending ? (
+ <>
+
+ Saving...
+ >
+ ) : (
+ <>
+
+ Save Changes
+ >
+ )}
+
+ )}
+
+ {validationErrors.length > 0 && (
+
+
+ Check Errors ({validationErrors.length})
+
+ )}
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/components/form-data/spreadJS-dialog copy 3.tsx b/components/form-data/spreadJS-dialog copy 3.tsx
new file mode 100644
index 00000000..1ea8232b
--- /dev/null
+++ b/components/form-data/spreadJS-dialog copy 3.tsx
@@ -0,0 +1,1916 @@
+"use client";
+
+import * as React from "react";
+import dynamic from "next/dynamic";
+import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter, DialogDescription } from "@/components/ui/dialog";
+import { Button } from "@/components/ui/button";
+import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
+import { GenericData } from "./export-excel-form";
+import * as GC from "@mescius/spread-sheets";
+import { toast } from "sonner";
+import { updateFormDataInDB } from "@/lib/forms/services";
+import { Loader, Save, AlertTriangle } from "lucide-react";
+import '@mescius/spread-sheets/styles/gc.spread.sheets.excel2016colorful.css';
+import { DataTableColumnJSON, ColumnType } from "./form-data-table-columns";
+
+
+// SpreadSheets를 동적으로 import (SSR 비활성화)
+const SpreadSheets = dynamic(
+ () => import("@mescius/spread-sheets-react").then(mod => mod.SpreadSheets),
+ {
+ ssr: false,
+ loading: () => (
+
+
+ Loading SpreadSheets...
+
+ )
+ }
+);
+
+// 라이센스 키 설정을 클라이언트에서만 실행
+if (typeof window !== 'undefined' && process.env.NEXT_PUBLIC_SPREAD_LICENSE) {
+ GC.Spread.Sheets.LicenseKey = process.env.NEXT_PUBLIC_SPREAD_LICENSE;
+}
+
+interface TemplateItem {
+ TMPL_ID: string;
+ NAME: string;
+ TMPL_TYPE: string;
+ SPR_LST_SETUP: {
+ ACT_SHEET: string;
+ HIDN_SHEETS: Array;
+ CONTENT?: string;
+ DATA_SHEETS: Array<{
+ SHEET_NAME: string;
+ REG_TYPE_ID: string;
+ MAP_CELL_ATT: Array<{
+ ATT_ID: string;
+ IN: string;
+ }>;
+ }>;
+ };
+ GRD_LST_SETUP: {
+ REG_TYPE_ID: string;
+ SPR_ITM_IDS: Array;
+ ATTS: Array<{}>;
+ };
+ SPR_ITM_LST_SETUP: {
+ ACT_SHEET: string;
+ HIDN_SHEETS: Array;
+ CONTENT?: string;
+ DATA_SHEETS: Array<{
+ SHEET_NAME: string;
+ REG_TYPE_ID: string;
+ MAP_CELL_ATT: Array<{
+ ATT_ID: string;
+ IN: string;
+ }>;
+ }>;
+ };
+}
+
+interface ValidationError {
+ cellAddress: string;
+ attId: string;
+ value: any;
+ expectedType: ColumnType;
+ message: string;
+}
+
+interface CellMapping {
+ attId: string;
+ cellAddress: string;
+ isEditable: boolean;
+ dataRowIndex?: number;
+}
+
+interface TemplateViewDialogProps {
+ isOpen: boolean;
+ onClose: () => void;
+ templateData: TemplateItem[] | any;
+ selectedRow?: GenericData; // SPREAD_ITEM용
+ tableData?: GenericData[]; // SPREAD_LIST용
+ formCode: string;
+ columnsJSON: DataTableColumnJSON[]
+ contractItemId: number;
+ editableFieldsMap?: Map;
+ onUpdateSuccess?: (updatedValues: Record | GenericData[]) => void;
+}
+
+export function TemplateViewDialog({
+ isOpen,
+ onClose,
+ templateData,
+ selectedRow,
+ tableData = [],
+ formCode,
+ contractItemId,
+ columnsJSON,
+ editableFieldsMap = new Map(),
+ onUpdateSuccess
+}: TemplateViewDialogProps) {
+ const [hostStyle, setHostStyle] = React.useState({
+ width: '100%',
+ height: '100%'
+ });
+
+ const [isPending, setIsPending] = React.useState(false);
+ const [hasChanges, setHasChanges] = React.useState(false);
+ const [currentSpread, setCurrentSpread] = React.useState(null);
+ const [cellMappings, setCellMappings] = React.useState([]);
+ const [isClient, setIsClient] = React.useState(false);
+ const [templateType, setTemplateType] = React.useState<'SPREAD_LIST' | 'SPREAD_ITEM' | 'GRD_LIST' | null>(null);
+ const [validationErrors, setValidationErrors] = React.useState([]);
+ const [selectedTemplateId, setSelectedTemplateId] = React.useState("");
+ const [availableTemplates, setAvailableTemplates] = React.useState([]);
+
+ const determineTemplateType = React.useCallback((template: TemplateItem): 'SPREAD_LIST' | 'SPREAD_ITEM' | 'GRD_LIST' | null => {
+ // 1. SPREAD_LIST: TMPL_TYPE이 SPREAD_LIST이고 SPR_LST_SETUP.CONTENT가 있음
+ if (template.TMPL_TYPE === "SPREAD_LIST" && (template.SPR_LST_SETUP?.CONTENT || template.SPR_ITM_LST_SETUP?.CONTENT)) {
+ return 'SPREAD_LIST';
+ }
+
+ // 2. SPREAD_ITEM: TMPL_TYPE이 SPREAD_ITEM이고 SPR_ITM_LST_SETUP.CONTENT가 있음
+ if (template.TMPL_TYPE === "SPREAD_ITEM" && (template.SPR_LST_SETUP?.CONTENT || template.SPR_ITM_LST_SETUP?.CONTENT)) {
+ return 'SPREAD_ITEM';
+ }
+
+ // 3. GRD_LIST: GRD_LST_SETUP이 있고 columnsJSON이 있음 (동적 테이블)
+ if (template.GRD_LST_SETUP && columnsJSON.length > 0) {
+ return 'GRD_LIST';
+ }
+
+ return null; // 유효하지 않은 템플릿
+ }, [columnsJSON]);
+
+ const isValidTemplate = React.useCallback((template: TemplateItem): boolean => {
+ return determineTemplateType(template) !== null;
+ }, [determineTemplateType]);
+
+
+ // 클라이언트 사이드에서만 렌더링되도록 보장
+ React.useEffect(() => {
+ setIsClient(true);
+ }, []);
+
+ // 사용 가능한 템플릿들을 필터링하고 설정
+ React.useEffect(() => {
+ if (!templateData) return;
+
+ let templates: TemplateItem[];
+ if (Array.isArray(templateData)) {
+ templates = templateData as TemplateItem[];
+ } else {
+ templates = [templateData as TemplateItem];
+ }
+
+ // 유효한 템플릿들만 필터링
+ const validTemplates = templates.filter(isValidTemplate);
+
+ setAvailableTemplates(validTemplates);
+
+ // 첫 번째 유효한 템플릿을 기본으로 선택
+ if (validTemplates.length > 0 && !selectedTemplateId) {
+ const firstTemplate = validTemplates[0];
+ const templateTypeToSet = determineTemplateType(firstTemplate);
+
+ setSelectedTemplateId(firstTemplate.TMPL_ID);
+ setTemplateType(templateTypeToSet);
+ }
+ }, [templateData, selectedTemplateId, isValidTemplate, determineTemplateType]);
+
+
+ // 선택된 템플릿 변경 처리
+ const handleTemplateChange = (templateId: string) => {
+ const template = availableTemplates.find(t => t.TMPL_ID === templateId);
+ if (template) {
+ const templateTypeToSet = determineTemplateType(template);
+
+ setSelectedTemplateId(templateId);
+ setTemplateType(templateTypeToSet);
+ setHasChanges(false);
+ setValidationErrors([]);
+
+ // SpreadSheets 재초기화
+ if (currentSpread && template) {
+ initSpread(currentSpread, template);
+ }
+ }
+ };
+ // 현재 선택된 템플릿 가져오기
+ const selectedTemplate = React.useMemo(() => {
+ return availableTemplates.find(t => t.TMPL_ID === selectedTemplateId);
+ }, [availableTemplates, selectedTemplateId]);
+
+
+ // 편집 가능한 필드 목록 계산
+ const editableFields = React.useMemo(() => {
+ // SPREAD_ITEM인 경우: selectedRow의 TAG_NO로 확인
+ if (templateType === 'SPREAD_ITEM' && selectedRow?.TAG_NO) {
+ if (!editableFieldsMap.has(selectedRow.TAG_NO)) {
+ return [];
+ }
+ return editableFieldsMap.get(selectedRow.TAG_NO) || [];
+ }
+
+ // SPREAD_LIST 또는 GRD_LIST인 경우: 첫 번째 행의 TAG_NO를 기준으로 처리
+ if ((templateType === 'SPREAD_LIST' || templateType === 'GRD_LIST') && tableData.length > 0) {
+ const firstRowTagNo = tableData[0]?.TAG_NO;
+ if (firstRowTagNo && editableFieldsMap.has(firstRowTagNo)) {
+ return editableFieldsMap.get(firstRowTagNo) || [];
+ }
+ }
+
+ return [];
+ }, [templateType, selectedRow?.TAG_NO, tableData, editableFieldsMap]);
+
+ // 필드가 편집 가능한지 판별하는 함수
+ const isFieldEditable = React.useCallback((attId: string, rowData?: GenericData) => {
+ // columnsJSON에서 해당 attId의 shi 값 확인
+ const columnConfig = columnsJSON.find(col => col.key === attId);
+ if (columnConfig?.shi === true) {
+ return false; // columnsJSON에서 shi가 true이면 편집 불가
+ }
+
+ // TAG_NO와 TAG_DESC는 기본적으로 편집 가능 (columnsJSON의 shi가 false인 경우)
+ if (attId === "TAG_NO" || attId === "TAG_DESC") {
+ return false;
+ }
+
+ if (attId === "status") {
+ return false;
+ }
+
+ // SPREAD_ITEM인 경우: editableFields 체크
+ // if (templateType === 'SPREAD_ITEM') {
+ // return editableFields.includes(attId);
+ // }
+
+ // SPREAD_LIST 또는 GRD_LIST인 경우: 개별 행의 편집 가능성도 고려
+ if (templateType === 'SPREAD_LIST' || templateType === 'GRD_LIST') {
+ // 기본적으로 editableFields에 포함되어야 함
+ // if (!editableFields.includes(attId)) {
+ // return false;
+ // }
+
+ // rowData가 제공된 경우 해당 행의 shi 상태도 확인
+ if (rowData && rowData.shi === true) {
+ return false;
+ }
+
+ return true;
+ }
+
+ return true;
+ }, [templateType, columnsJSON, editableFields]);
+
+ // 편집 가능한 필드 개수 계산
+ const editableFieldsCount = React.useMemo(() => {
+ return cellMappings.filter(m => m.isEditable).length;
+ }, [cellMappings]);
+
+ // 셀 주소를 행과 열로 변환하는 함수
+ const parseCellAddress = (address: string): { row: number, col: number } | null => {
+ if (!address || address.trim() === "") return null;
+
+ const match = address.match(/^([A-Z]+)(\d+)$/);
+ if (!match) return null;
+
+ const [, colStr, rowStr] = match;
+
+ let col = 0;
+ for (let i = 0; i < colStr.length; i++) {
+ col = col * 26 + (colStr.charCodeAt(i) - 65 + 1);
+ }
+ col -= 1;
+
+ const row = parseInt(rowStr) - 1;
+
+ return { row, col };
+ };
+
+ // 행과 열을 셀 주소로 변환하는 함수 (GRD_LIST용)
+ const getCellAddress = (row: number, col: number): string => {
+ let colStr = '';
+ let colNum = col;
+ while (colNum >= 0) {
+ colStr = String.fromCharCode((colNum % 26) + 65) + colStr;
+ colNum = Math.floor(colNum / 26) - 1;
+ }
+ return colStr + (row + 1);
+ };
+
+ // 데이터 타입 검증 함수
+ const validateCellValue = (value: any, columnType: ColumnType, options?: string[]): string | null => {
+ if (value === undefined || value === null || value === "") {
+ return null; // 빈 값은 별도 required 검증에서 처리
+ }
+
+ switch (columnType) {
+ case "NUMBER":
+ if (isNaN(Number(value))) {
+ return "Value must be a valid number";
+ }
+ break;
+ case "LIST":
+ if (options && !options.includes(String(value))) {
+ return `Value must be one of: ${options.join(", ")}`;
+ }
+ break;
+ case "STRING":
+ // STRING 타입은 대부분의 값을 허용
+ break;
+ default:
+ // 커스텀 타입의 경우 추가 검증 로직이 필요할 수 있음
+ break;
+ }
+
+ return null;
+ };
+
+ // 전체 데이터 검증 함수
+ const validateAllData = React.useCallback(() => {
+ if (!currentSpread || !selectedTemplate) return [];
+
+ const activeSheet = currentSpread.getActiveSheet();
+ const errors: ValidationError[] = [];
+
+ cellMappings.forEach(mapping => {
+ const columnConfig = columnsJSON.find(col => col.key === mapping.attId);
+ if (!columnConfig) return;
+
+ const cellPos = parseCellAddress(mapping.cellAddress);
+ if (!cellPos) return;
+
+ if (templateType === 'SPREAD_ITEM') {
+ // 단일 행 검증
+ const cellValue = activeSheet.getValue(cellPos.row, cellPos.col);
+ const errorMessage = validateCellValue(cellValue, columnConfig.type, columnConfig.options);
+
+ if (errorMessage) {
+ errors.push({
+ cellAddress: mapping.cellAddress,
+ attId: mapping.attId,
+ value: cellValue,
+ expectedType: columnConfig.type,
+ message: errorMessage
+ });
+ }
+ } else if (templateType === 'SPREAD_LIST' || templateType === 'GRD_LIST') {
+ // 복수 행 검증 - 각 매핑은 이미 개별 행을 가리킴
+ const cellValue = activeSheet.getValue(cellPos.row, cellPos.col);
+ const errorMessage = validateCellValue(cellValue, columnConfig.type, columnConfig.options);
+
+ if (errorMessage) {
+ errors.push({
+ cellAddress: mapping.cellAddress,
+ attId: mapping.attId,
+ value: cellValue,
+ expectedType: columnConfig.type,
+ message: errorMessage
+ });
+ }
+ }
+ });
+
+ setValidationErrors(errors);
+ return errors;
+ }, [currentSpread, selectedTemplate, cellMappings, columnsJSON, templateType]);
+
+ // ═══════════════════════════════════════════════════════════════════════════════
+ // 🛠️ 헬퍼 함수들
+ // ═══════════════════════════════════════════════════════════════════════════════
+
+ // 🎨 셀 스타일 생성
+ const createCellStyle = React.useCallback((isEditable: boolean) => {
+ const style = new GC.Spread.Sheets.Style();
+ if (isEditable) {
+ style.backColor = "#f0fdf4"; // 연한 초록 (편집 가능)
+ } else {
+ style.backColor = "#f9fafb"; // 연한 회색 (읽기 전용)
+ style.foreColor = "#6b7280";
+ }
+ return style;
+ }, []);
+
+ // 🎯 드롭다운 설정
+ const setupOptimizedListValidation = React.useCallback((activeSheet: any, cellPos: { row: number, col: number }, options: string[], rowCount: number) => {
+ try {
+ console.log(`🎯 Setting up dropdown for ${rowCount} rows with options:`, options);
+
+ // ✅ options 정규화
+ const safeOptions = options
+ .filter(opt => opt !== null && opt !== undefined && opt !== '')
+ .map(opt => String(opt).trim())
+ .filter(opt => opt.length > 0)
+ .filter((opt, index, arr) => arr.indexOf(opt) === index)
+ .slice(0, 20);
+
+ if (safeOptions.length === 0) {
+ console.warn(`⚠️ No valid options found, skipping`);
+ return;
+ }
+
+ console.log(`📋 Safe options:`, safeOptions);
+
+ // ✅ DataValidation용 문자열 준비
+ const optionsString = safeOptions.join(',');
+
+ // 🔑 핵심 수정: 각 셀마다 개별 ComboBox 인스턴스 생성!
+ for (let i = 0; i < rowCount; i++) {
+ try {
+ const targetRow = cellPos.row + i;
+
+ // ✅ 각 셀마다 새로운 ComboBox 인스턴스 생성
+ const comboBoxCellType = new GC.Spread.Sheets.CellTypes.ComboBox();
+ comboBoxCellType.items(safeOptions); // 배열로 전달
+ comboBoxCellType.editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.text);
+
+ // ✅ 각 셀마다 새로운 DataValidation 인스턴스 생성
+ const cellValidator = GC.Spread.Sheets.DataValidation.createListValidator(optionsString);
+
+ // ComboBox + DataValidation 둘 다 적용
+ activeSheet.setCellType(targetRow, cellPos.col, comboBoxCellType);
+ activeSheet.setDataValidator(targetRow, cellPos.col, cellValidator);
+
+ // 셀 잠금 해제
+ const cell = activeSheet.getCell(targetRow, cellPos.col);
+ cell.locked(false);
+
+ console.log(`✅ Individual dropdown applied to [${targetRow}, ${cellPos.col}]`);
+
+ } catch (cellError) {
+ console.warn(`⚠️ Failed to apply to row ${cellPos.row + i}:`, cellError);
+ }
+ }
+
+ console.log(`✅ Safe dropdown setup completed for ${rowCount} cells`);
+
+ } catch (error) {
+ console.error('❌ Dropdown setup failed:', error);
+ }
+ }, []);
+
+ // 🛡️ 안전한 시트 검증 함수 추가
+const validateActiveSheet = React.useCallback((activeSheet: any, functionName: string = 'unknown') => {
+ console.log(`🔍 Validating activeSheet for ${functionName}:`);
+
+ if (!activeSheet) {
+ console.error(`❌ activeSheet is null/undefined in ${functionName}`);
+ return false;
+ }
+
+ console.log(`✅ activeSheet exists (type: ${typeof activeSheet})`);
+ console.log(`✅ constructor: ${activeSheet.constructor?.name}`);
+
+ // 핵심 메서드들 존재 여부 확인
+ const requiredMethods = ['getRowCount', 'getColumnCount', 'setRowCount', 'setColumnCount', 'getCell', 'getValue', 'setStyle'];
+ const missingMethods = requiredMethods.filter(method => typeof activeSheet[method] !== 'function');
+
+ if (missingMethods.length > 0) {
+ console.error(`❌ Missing methods in ${functionName}:`, missingMethods);
+ console.log(`📋 Available methods:`, Object.getOwnPropertyNames(activeSheet).filter(prop => typeof activeSheet[prop] === 'function').slice(0, 20));
+ return false;
+ }
+
+ console.log(`✅ All required methods available for ${functionName}`);
+ return true;
+}, []);
+// 🛡️ 안전한 ActiveSheet 가져오기 함수
+const getSafeActiveSheet = React.useCallback((spread: any, functionName: string = 'unknown') => {
+ console.log(`🔍 Getting safe activeSheet for ${functionName}`);
+
+ if (!spread) {
+ console.error(`❌ Spread is null/undefined in ${functionName}`);
+ return null;
+ }
+
+ try {
+ // 현재 활성 시트 가져오기
+ let activeSheet = spread.getActiveSheet();
+
+ if (!activeSheet) {
+ console.warn(`⚠️ ActiveSheet is null, attempting to get first sheet in ${functionName}`);
+
+ // 첫 번째 시트 시도
+ const sheetCount = spread.getSheetCount();
+ console.log(`📊 Total sheets: ${sheetCount}`);
+
+ if (sheetCount > 0) {
+ activeSheet = spread.getSheet(0);
+ if (activeSheet) {
+ spread.setActiveSheetIndex(0);
+ console.log(`✅ Successfully got first sheet in ${functionName}`);
+ }
+ }
+ }
+
+ if (!activeSheet) {
+ console.error(`❌ Failed to get any valid sheet in ${functionName}`);
+ return null;
+ }
+
+ // 시트 유효성 검증
+ const validation = validateActiveSheet(activeSheet, functionName);
+ if (!validation) {
+ console.error(`❌ Sheet validation failed in ${functionName}`);
+ return null;
+ }
+
+ console.log(`✅ Got valid activeSheet for ${functionName}: ${activeSheet.name?.() || 'unnamed'}`);
+ return activeSheet;
+
+ } catch (error) {
+ console.error(`❌ Error getting activeSheet in ${functionName}:`, error);
+ return null;
+ }
+}, [validateActiveSheet]);
+
+// 🛡️ 수정된 ensureRowCapacity 함수
+const ensureRowCapacity = React.useCallback((activeSheet: any, requiredRowCount: number) => {
+ try {
+ // 🔍 상세한 null/undefined 체크
+ if (!activeSheet) {
+ console.error('❌ activeSheet is null/undefined in ensureRowCapacity');
+ return false;
+ }
+
+ console.log('🔍 ActiveSheet validation in ensureRowCapacity:');
+ console.log(' - Type:', typeof activeSheet);
+ console.log(' - Constructor:', activeSheet.constructor?.name);
+ console.log(' - Is null:', activeSheet === null);
+ console.log(' - Is undefined:', activeSheet === undefined);
+
+ // 🔍 메서드 존재 여부 확인
+ if (typeof activeSheet.getRowCount !== 'function') {
+ console.error('❌ getRowCount method does not exist on activeSheet');
+ console.log('📋 Available properties:', Object.getOwnPropertyNames(activeSheet).slice(0, 20));
+ return false;
+ }
+
+ // 🔍 시트 상태 확인
+ const currentRowCount = activeSheet.getRowCount();
+ console.log(`📊 Current row count: ${currentRowCount} (type: ${typeof currentRowCount})`);
+
+ if (typeof currentRowCount !== 'number' || isNaN(currentRowCount)) {
+ console.error('❌ getRowCount returned invalid value:', currentRowCount);
+ return false;
+ }
+
+ if (requiredRowCount > currentRowCount) {
+ // 🔍 setRowCount 메서드 확인
+ if (typeof activeSheet.setRowCount !== 'function') {
+ console.error('❌ setRowCount method does not exist on activeSheet');
+ return false;
+ }
+
+ const newRowCount = requiredRowCount + 10;
+ activeSheet.setRowCount(newRowCount);
+ console.log(`📈 Expanded sheet: ${currentRowCount} → ${newRowCount} rows`);
+
+ // 🔍 설정 후 검증
+ const verifyRowCount = activeSheet.getRowCount();
+ console.log(`✅ Verified new row count: ${verifyRowCount}`);
+
+ return true;
+ } else {
+ console.log(`✅ Sheet already has sufficient rows: ${currentRowCount} >= ${requiredRowCount}`);
+ return true;
+ }
+
+ } catch (error) {
+ console.error('❌ Error in ensureRowCapacity:', error);
+ console.error('❌ Error stack:', error.stack);
+ return false;
+ }
+}, []);
+
+// 🛡️ 안전한 컬럼 용량 확보 함수
+const ensureColumnCapacity = React.useCallback((activeSheet: any, requiredColumnCount: number) => {
+ try {
+ // 🔍 상세한 null/undefined 체크
+ if (!activeSheet) {
+ console.error('❌ activeSheet is null/undefined in ensureColumnCapacity');
+ return false;
+ }
+
+ console.log('🔍 ActiveSheet validation in ensureColumnCapacity:');
+ console.log(' - Type:', typeof activeSheet);
+ console.log(' - Constructor:', activeSheet.constructor?.name);
+ console.log(' - Is null:', activeSheet === null);
+ console.log(' - Is undefined:', activeSheet === undefined);
+
+ // 🔍 메서드 존재 여부 확인
+ if (typeof activeSheet.getColumnCount !== 'function') {
+ console.error('❌ getColumnCount method does not exist on activeSheet');
+ console.log('📋 Available properties:', Object.getOwnPropertyNames(activeSheet).slice(0, 20));
+ return false;
+ }
+
+ const currentColumnCount = activeSheet.getColumnCount();
+ console.log(`📊 Current column count: ${currentColumnCount} (type: ${typeof currentColumnCount})`);
+
+ if (typeof currentColumnCount !== 'number' || isNaN(currentColumnCount)) {
+ console.error('❌ getColumnCount returned invalid value:', currentColumnCount);
+ return false;
+ }
+
+ if (requiredColumnCount > currentColumnCount) {
+ if (typeof activeSheet.setColumnCount !== 'function') {
+ console.error('❌ setColumnCount method does not exist on activeSheet');
+ return false;
+ }
+
+ const newColumnCount = requiredColumnCount + 10;
+ activeSheet.setColumnCount(newColumnCount);
+ console.log(`📈 Expanded columns: ${currentColumnCount} → ${newColumnCount}`);
+
+ // 🔍 설정 후 검증
+ const verifyColumnCount = activeSheet.getColumnCount();
+ console.log(`✅ Verified new column count: ${verifyColumnCount}`);
+
+ return true;
+ } else {
+ console.log(`✅ Sheet already has sufficient columns: ${currentColumnCount} >= ${requiredColumnCount}`);
+ return true;
+ }
+
+ } catch (error) {
+ console.error('❌ Error in ensureColumnCapacity:', error);
+ console.error('❌ Error stack:', error.stack);
+ return false;
+ }
+}, []);
+
+
+// 🎯 텍스트 너비 계산 함수들 (createGrdListTable 함수 위에 추가)
+const measureTextWidth = React.useCallback((text: string, fontSize: number = 12, fontFamily: string = 'Arial'): number => {
+ // Canvas를 사용한 정확한 텍스트 너비 측정
+ const canvas = document.createElement('canvas');
+ const context = canvas.getContext('2d');
+ if (!context) return text.length * 8; // fallback
+
+ context.font = `${fontSize}px ${fontFamily}`;
+ const metrics = context.measureText(text || '');
+ return Math.ceil(metrics.width);
+}, []);
+
+const calculateColumnWidth = React.useCallback((
+ headerText: string,
+ dataValues: any[] = [],
+ minWidth: number = 80,
+ maxWidth: number = 300,
+ padding: number = 20
+): number => {
+ // 헤더 텍스트 너비 계산
+ const headerWidth = measureTextWidth(headerText, 12, 'Arial');
+
+ // 데이터 값들의 최대 너비 계산
+ let maxDataWidth = 0;
+ if (dataValues.length > 0) {
+ maxDataWidth = Math.max(
+ ...dataValues
+ .slice(0, 10) // 성능을 위해 처음 10개만 샘플링
+ .map(value => measureTextWidth(String(value || ''), 11, 'Arial'))
+ );
+ }
+
+ // 헤더와 데이터 중 더 큰 너비 + 패딩 적용
+ const calculatedWidth = Math.max(headerWidth, maxDataWidth) + padding;
+
+ // 최소/최대 너비 제한 적용
+ return Math.min(Math.max(calculatedWidth, minWidth), maxWidth);
+}, [measureTextWidth]);
+
+const setOptimalColumnWidths = React.useCallback((activeSheet: any, columns: any[], startCol: number, tableData: any[]) => {
+ console.log('🎨 Setting optimal column widths...');
+
+ columns.forEach((column, colIndex) => {
+ const targetCol = startCol + colIndex;
+
+ // 해당 컬럼의 데이터 값들 추출
+ const dataValues = tableData.map(row => row[column.key]).filter(val => val != null);
+
+ // 최적 너비 계산
+ const optimalWidth = calculateColumnWidth(
+ column.label || column.key,
+ dataValues,
+ column.type === 'NUMBER' ? 100 : 80, // 숫자는 좀 더 넓게
+ column.type === 'STRING' ? 250 : 200, // 문자열은 더 넓게
+ column.type === 'LIST' ? 30 : 20 // 드롭다운은 여유 패딩
+ );
+
+ // 컬럼 너비 설정
+ activeSheet.setColumnWidth(targetCol, optimalWidth);
+
+ console.log(`📏 Column ${targetCol} (${column.key}): width set to ${optimalWidth}px`);
+ });
+}, [calculateColumnWidth]);
+
+ // 🔍 컬럼 그룹 분석 함수
+ const analyzeColumnGroups = React.useCallback((columns: DataTableColumnJSON[]) => {
+ const groups: Array<{
+ head: string;
+ isGroup: boolean;
+ columns: DataTableColumnJSON[];
+ }> = [];
+
+ let i = 0;
+ while (i < columns.length) {
+ const currentCol = columns[i];
+
+ // head가 없거나 빈 문자열인 경우 단일 컬럼으로 처리
+ if (!currentCol.head || !currentCol.head.trim()) {
+ groups.push({
+ head: '',
+ isGroup: false,
+ columns: [currentCol]
+ });
+ i++;
+ continue;
+ }
+
+ // 같은 head를 가진 연속된 컬럼들을 찾기
+ const groupHead = currentCol.head.trim();
+ const groupColumns: DataTableColumnJSON[] = [currentCol];
+ let j = i + 1;
+
+ while (j < columns.length && columns[j].head && columns[j].head.trim() === groupHead) {
+ groupColumns.push(columns[j]);
+ j++;
+ }
+
+ // 그룹 추가
+ groups.push({
+ head: groupHead,
+ isGroup: groupColumns.length > 1,
+ columns: groupColumns
+ });
+
+ i = j; // 다음 그룹으로 이동
+ }
+
+ return { groups };
+ }, []);
+
+
+// 🆕 수정된 createGrdListTable 함수
+// 🆕 개선된 GRD_LIST용 동적 테이블 생성 함수
+const createGrdListTable = React.useCallback((activeSheet: any, template: TemplateItem) => {
+ console.log('🏗️ Creating GRD_LIST table');
+
+ // columnsJSON의 visible 컬럼들을 seq 순서로 정렬하여 사용
+ const visibleColumns = columnsJSON
+ .filter(col => col.hidden !== true)
+ .sort((a, b) => {
+ const seqA = a.seq !== undefined ? a.seq : 999999;
+ const seqB = b.seq !== undefined ? b.seq : 999999;
+ return seqA - seqB;
+ });
+
+ console.log('📊 Using columns:', visibleColumns.map(c => `${c.key}(seq:${c.seq})`));
+ console.log(`📊 Total visible columns: ${visibleColumns.length}`);
+
+ if (visibleColumns.length === 0) {
+ console.warn('❌ No visible columns found in columnsJSON');
+ return [];
+ }
+
+ // ⭐ 컬럼 용량 확보
+ const startCol = 1;
+ const requiredColumnCount = startCol + visibleColumns.length;
+ ensureColumnCapacity(activeSheet, requiredColumnCount);
+
+ // 테이블 생성 시작
+ const mappings: CellMapping[] = [];
+
+ // 🔍 그룹 헤더 분석
+ const groupInfo = analyzeColumnGroups(visibleColumns);
+ const hasGroups = groupInfo.groups.length > 0;
+
+ // 헤더 행 계산: 그룹이 있으면 2행, 없으면 1행
+ const groupHeaderRow = 0;
+ const columnHeaderRow = hasGroups ? 1 : 0;
+ const dataStartRow = hasGroups ? 2 : 1;
+
+ // 🎨 헤더 스타일 생성
+ const groupHeaderStyle = new GC.Spread.Sheets.Style();
+ groupHeaderStyle.backColor = "#1e40af";
+ groupHeaderStyle.foreColor = "#ffffff";
+ groupHeaderStyle.font = "bold 13px Arial";
+ groupHeaderStyle.hAlign = GC.Spread.Sheets.HorizontalAlign.center;
+ groupHeaderStyle.vAlign = GC.Spread.Sheets.VerticalAlign.center;
+
+ const columnHeaderStyle = new GC.Spread.Sheets.Style();
+ columnHeaderStyle.backColor = "#3b82f6";
+ columnHeaderStyle.foreColor = "#ffffff";
+ columnHeaderStyle.font = "bold 12px Arial";
+ columnHeaderStyle.hAlign = GC.Spread.Sheets.HorizontalAlign.center;
+ columnHeaderStyle.vAlign = GC.Spread.Sheets.VerticalAlign.center;
+
+ let currentCol = startCol;
+
+ // 🏗️ 그룹 헤더 및 컬럼 헤더 생성
+ if (hasGroups) {
+ // 그룹 헤더가 있는 경우
+ groupInfo.groups.forEach(group => {
+ if (group.isGroup) {
+ // 그룹 헤더 생성 및 병합
+ const groupStartCol = currentCol;
+ const groupEndCol = currentCol + group.columns.length - 1;
+
+ // 그룹 헤더 셀 설정
+ const groupHeaderCell = activeSheet.getCell(groupHeaderRow, groupStartCol);
+ groupHeaderCell.value(group.head);
+
+ // 그룹 헤더 병합
+ if (group.columns.length > 1) {
+ activeSheet.addSpan(groupHeaderRow, groupStartCol, 1, group.columns.length);
+ }
+
+ // 그룹 헤더 스타일 적용
+ for (let col = groupStartCol; col <= groupEndCol; col++) {
+ activeSheet.setStyle(groupHeaderRow, col, groupHeaderStyle);
+ activeSheet.getCell(groupHeaderRow, col).locked(true);
+ }
+
+ console.log(`📝 Group Header [${groupHeaderRow}, ${groupStartCol}-${groupEndCol}]: ${group.head}`);
+
+ // 그룹 내 개별 컬럼 헤더 생성
+ group.columns.forEach((column, index) => {
+ const colIndex = groupStartCol + index;
+ const columnHeaderCell = activeSheet.getCell(columnHeaderRow, colIndex);
+ columnHeaderCell.value(column.label);
+ activeSheet.setStyle(columnHeaderRow, colIndex, columnHeaderStyle);
+ columnHeaderCell.locked(true);
+
+ console.log(`📝 Column Header [${columnHeaderRow}, ${colIndex}]: ${column.label}`);
+ });
+
+ currentCol += group.columns.length;
+ } else {
+ // 그룹이 아닌 단일 컬럼
+ const column = group.columns[0];
+
+ // 그룹 헤더 행에는 빈 셀
+ const groupHeaderCell = activeSheet.getCell(groupHeaderRow, currentCol);
+ groupHeaderCell.value("");
+ activeSheet.setStyle(groupHeaderRow, currentCol, groupHeaderStyle);
+ groupHeaderCell.locked(true);
+
+ // 컬럼 헤더 생성
+ const columnHeaderCell = activeSheet.getCell(columnHeaderRow, currentCol);
+ columnHeaderCell.value(column.label);
+ activeSheet.setStyle(columnHeaderRow, currentCol, columnHeaderStyle);
+ columnHeaderCell.locked(true);
+
+ console.log(`📝 Single Column [${columnHeaderRow}, ${currentCol}]: ${column.label}`);
+ currentCol++;
+ }
+ });
+ } else {
+ // 그룹이 없는 경우
+ visibleColumns.forEach((column, colIndex) => {
+ const targetCol = startCol + colIndex;
+ const columnConfig = columnsJSON.find(col => col.key === column.key);
+
+ // 📋 각 행마다 개별 셀 설정
+ tableData.forEach((rowData, rowIndex) => {
+ const targetRow = dataStartRow + rowIndex;
+ const cell = activeSheet.getCell(targetRow, targetCol);
+ const value = rowData[column.key];
+ const cellEditable = isFieldEditable(column.key, rowData);
+
+ // 🔧 새로 추가: 셀 타입 및 편집기 설정
+ if (columnConfig) {
+ setupCellTypeAndEditor(activeSheet, { row: targetRow, col: targetCol }, columnConfig, cellEditable, 1);
+ }
+
+ // 값 설정
+ cell.value(value ?? null);
+
+ // 스타일 설정
+ const style = createCellStyle(cellEditable);
+ activeSheet.setStyle(targetRow, targetCol, style);
+
+ // 개별 매핑 추가
+ mappings.push({
+ attId: column.key,
+ cellAddress: getCellAddress(targetRow, targetCol),
+ isEditable: cellEditable,
+ dataRowIndex: rowIndex
+ });
+ });
+ });
+ }
+
+ // 🔄 데이터 행 및 매핑 생성 (SPREAD_LIST 방식과 동일한 로직)
+ const dataRowCount = tableData.length;
+ ensureRowCapacity(activeSheet, dataStartRow + dataRowCount);
+
+ // 📋 각 컬럼별로 매핑 생성 (SPREAD_LIST와 동일한 방식)
+ visibleColumns.forEach((column, colIndex) => {
+ const targetCol = startCol + colIndex;
+
+ console.log(`🔄 Processing column ${column.key} with ${dataRowCount} rows`);
+
+ // 📋 각 행마다 개별 매핑 생성 (SPREAD_LIST와 동일)
+ tableData.forEach((rowData, rowIndex) => {
+ const targetRow = dataStartRow + rowIndex;
+ const cellAddress = getCellAddress(targetRow, targetCol);
+
+ // 🛡️ readonly 체크 (SPREAD_LIST와 동일한 로직)
+ const cellEditable = isFieldEditable(column.key, rowData);
+
+ // 개별 매핑 추가
+ mappings.push({
+ attId: column.key,
+ cellAddress: cellAddress,
+ isEditable: cellEditable,
+ dataRowIndex: rowIndex
+ });
+
+ console.log(`📝 Mapping ${column.key} Row ${rowIndex}: ${cellAddress} (${cellEditable ? 'Editable' : 'ReadOnly'})`);
+ });
+
+ // 📋 LIST 타입 드롭다운 설정 (편집 가능한 행이 있는 경우만)
+ if (column.type === "LIST" && column.options) {
+ const hasEditableRows = tableData.some((rowData) => isFieldEditable(column.key, rowData));
+ if (hasEditableRows) {
+ const cellPos = { row: dataStartRow, col: targetCol };
+ setupOptimizedListValidation(activeSheet, cellPos, column.options, dataRowCount);
+ console.log(`📋 Dropdown set for ${column.key}: ${hasEditableRows ? 'Has editable rows' : 'All readonly'}`);
+ }
+ }
+ });
+
+ // 🎨 개별 셀 데이터 및 스타일 설정 (SPREAD_LIST와 동일한 방식)
+ tableData.forEach((rowData, rowIndex) => {
+ const targetRow = dataStartRow + rowIndex;
+
+ visibleColumns.forEach((column, colIndex) => {
+ const targetCol = startCol + colIndex;
+ const cell = activeSheet.getCell(targetRow, targetCol);
+ const value = rowData[column.key];
+
+ // 값 설정
+ cell.value(value ?? null);
+
+ // 🛡️ 편집 권한 및 스타일 재확인 (SPREAD_LIST와 동일)
+ const cellEditable = isFieldEditable(column.key, rowData);
+ cell.locked(!cellEditable);
+ const style = createCellStyle(cellEditable);
+ activeSheet.setStyle(targetRow, targetCol, style);
+
+ // 🔍 디버깅: readonly 상태 로깅
+ if (!cellEditable) {
+ const columnConfig = columnsJSON.find(col => col.key === column.key);
+ const reasons = [];
+
+ if (columnConfig?.shi === true) {
+ reasons.push('column.shi=true');
+ }
+ if (rowData.shi === true) {
+ reasons.push('row.shi=true');
+ }
+ if (!editableFields.includes(column.key) && column.key !== "TAG_NO" && column.key !== "TAG_DESC") {
+ reasons.push('not in editableFields');
+ }
+
+ console.log(`🔒 ReadOnly [${targetRow}, ${targetCol}] ${column.key}: ${reasons.join(', ')}`);
+ }
+ });
+ });
+
+ // 🎨 컬럼 너비 자동 설정
+ setOptimalColumnWidths(activeSheet, visibleColumns, startCol, tableData);
+
+ console.log(`🏗️ GRD_LIST table created with ${mappings.length} mappings, hasGroups: ${hasGroups}`);
+ console.log(`📊 Readonly analysis:`);
+ console.log(` Total cells: ${mappings.length}`);
+ console.log(` Editable cells: ${mappings.filter(m => m.isEditable).length}`);
+ console.log(` Readonly cells: ${mappings.filter(m => !m.isEditable).length}`);
+
+ return mappings;
+}, [tableData, columnsJSON, isFieldEditable, createCellStyle, ensureRowCapacity, ensureColumnCapacity, setupOptimizedListValidation, setOptimalColumnWidths, editableFields, getCellAddress, analyzeColumnGroups]);
+
+// 🛡️ 추가: readonly 상태 확인 헬퍼 함수
+const analyzeReadonlyStatus = React.useCallback((column: DataTableColumnJSON, rowData: GenericData) => {
+ const reasons: string[] = [];
+
+ // 1. 컬럼 자체가 readonly인지 확인
+ if (column.shi === true) {
+ reasons.push('Column marked as readonly (shi=true)');
+ }
+
+ // 2. 행 자체가 readonly인지 확인
+ if (rowData.shi === true) {
+ reasons.push('Row marked as readonly (shi=true)');
+ }
+
+ // 3. editableFields에 포함되지 않은 경우
+ if (!editableFields.includes(column.key) && column.key !== "TAG_NO" && column.key !== "TAG_DESC") {
+ reasons.push('Not in editable fields list');
+ }
+
+ // 4. 특수 필드 체크
+ if (column.key === "TAG_NO" || column.key === "TAG_DESC") {
+ // TAG_NO와 TAG_DESC는 기본 편집 가능하지만 다른 조건들은 적용됨
+ if (column.shi === true || rowData.shi === true) {
+ // 다른 readonly 조건이 있으면 적용
+ } else {
+ return { isEditable: true, reasons: ['Default editable field'] };
+ }
+ }
+
+ const isEditable = reasons.length === 0;
+
+ return {
+ isEditable,
+ reasons: isEditable ? ['Editable'] : reasons
+ };
+}, [editableFields]);
+
+
+
+// 🛡️ 수정된 시트 보호 및 이벤트 설정 함수
+const setupSheetProtectionAndEvents = React.useCallback((activeSheet: any, mappings: CellMapping[]) => {
+ console.log(`🛡️ Setting up protection and events for ${mappings.length} mappings`);
+
+ // 🔧 1단계: 먼저 시트 보호를 완전히 해제하고 강력한 잠금 해제 실행
+ console.log('🔓 Step 1: Forcing unlock all editable cells...');
+ activeSheet.options.isProtected = false;
+
+ // 🔧 2단계: 모든 편집 가능한 셀에 대해 강제 잠금 해제 및 CellType 설정
+ mappings.forEach((mapping, index) => {
+ if (!mapping.isEditable) return;
+
+ const cellPos = parseCellAddress(mapping.cellAddress);
+ if (!cellPos) return;
+
+ try {
+ const cell = activeSheet.getCell(cellPos.row, cellPos.col);
+ const columnConfig = columnsJSON.find(col => col.key === mapping.attId);
+
+ // 강제 잠금 해제
+ cell.locked(false);
+
+ // CellType 명시적 설정
+ if (columnConfig?.type === "LIST" && columnConfig.options) {
+ // LIST 타입: ComboBox 설정
+ const comboBox = new GC.Spread.Sheets.CellTypes.ComboBox();
+ comboBox.items(columnConfig.options);
+ comboBox.editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.text);
+ activeSheet.setCellType(cellPos.row, cellPos.col, comboBox);
+ console.log(`📋 ComboBox set for ${mapping.attId} at ${mapping.cellAddress}`);
+ } else {
+ // 다른 모든 타입: 기본 텍스트 편집기 설정
+ const textCellType = new GC.Spread.Sheets.CellTypes.Text();
+ activeSheet.setCellType(cellPos.row, cellPos.col, textCellType);
+ console.log(`📝 Text editor set for ${mapping.attId} at ${mapping.cellAddress}`);
+
+ // NUMBER 타입인 경우에만 validation 추가 (편집은 가능하게)
+ if (columnConfig?.type === "NUMBER") {
+ const numberValidator = GC.Spread.Sheets.DataValidation.createNumberValidator(
+ GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between,
+ -999999999, 999999999, true
+ );
+ numberValidator.showInputMessage(false);
+ numberValidator.showErrorMessage(false);
+ activeSheet.setDataValidator(cellPos.row, cellPos.col, numberValidator);
+ }
+ }
+
+ // 편집 가능 스타일 명확히 표시
+ const editableStyle = createCellStyle(true);
+ activeSheet.setStyle(cellPos.row, cellPos.col, editableStyle);
+
+ console.log(`🔓 Forced unlock: ${mapping.attId} at ${mapping.cellAddress}`);
+
+ } catch (error) {
+ console.error(`❌ Error processing cell ${mapping.cellAddress}:`, error);
+ }
+ });
+
+ // 🔧 3단계: 시트 보호 재설정 (편집 허용하는 설정으로)
+ activeSheet.options.isProtected = true;
+ activeSheet.options.protectionOptions = {
+ allowSelectLockedCells: true,
+ allowSelectUnlockedCells: true,
+ allowSort: false,
+ allowFilter: false,
+ allowEditObjects: true, // ✅ 편집 객체 허용
+ allowResizeRows: false,
+ allowResizeColumns: false,
+ allowFormatCells: false,
+ allowInsertRows: false,
+ allowInsertColumns: false,
+ allowDeleteRows: false,
+ allowDeleteColumns: false
+ };
+
+ // 🔧 4단계: 편집 테스트 실행
+ console.log('🧪 Testing cell editability...');
+ const editableMapping = mappings.find(m => m.isEditable);
+ if (editableMapping) {
+ const cellPos = parseCellAddress(editableMapping.cellAddress);
+ if (cellPos) {
+ try {
+ const cell = activeSheet.getCell(cellPos.row, cellPos.col);
+ const testValue = 'TEST_' + Math.random().toString(36).substr(2, 5);
+ const originalValue = cell.value();
+
+ console.log(`🧪 Testing ${editableMapping.attId} at ${editableMapping.cellAddress}`);
+ console.log(`🧪 Locked status: ${cell.locked()}`);
+
+ // 직접 값 설정 테스트
+ cell.value(testValue);
+ const newValue = cell.value();
+
+ if (newValue === testValue) {
+ console.log('✅ Cell edit test PASSED');
+ cell.value(originalValue); // 원래 값 복원
+ } else {
+ console.log(`❌ Cell edit test FAILED: ${newValue} !== ${testValue}`);
+ }
+ } catch (testError) {
+ console.error('❌ Edit test error:', testError);
+ }
+ }
+ }
+
+ // 🎯 변경 감지 이벤트
+ const changeEvents = [
+ GC.Spread.Sheets.Events.CellChanged,
+ GC.Spread.Sheets.Events.ValueChanged,
+ GC.Spread.Sheets.Events.ClipboardPasted
+ ];
+
+ changeEvents.forEach(eventType => {
+ activeSheet.bind(eventType, () => {
+ console.log(`📝 ${eventType} detected`);
+ setHasChanges(true);
+ });
+ });
+
+ // 🚫 편집 시작 권한 확인 (수정됨)
+ activeSheet.bind(GC.Spread.Sheets.Events.EditStarting, (event: any, info: any) => {
+ console.log(`🎯 EditStarting: Row ${info.row}, Col ${info.col}`);
+
+ // ✅ 정확한 매핑 찾기 (행/열 정확히 일치)
+ const exactMapping = mappings.find(m => {
+ const cellPos = parseCellAddress(m.cellAddress);
+ return cellPos && cellPos.row === info.row && cellPos.col === info.col;
+ });
+
+ if (!exactMapping) {
+ console.log(`ℹ️ No mapping found for [${info.row}, ${info.col}] - allowing edit`);
+ return; // 매핑이 없으면 허용 (템플릿 영역 밖)
+ }
+
+ console.log(`📋 Found mapping: ${exactMapping.attId} at ${exactMapping.cellAddress}, isEditable: ${exactMapping.isEditable}`);
+
+ // 🔍 추가 디버깅: 셀의 실제 상태 확인
+ const cell = activeSheet.getCell(info.row, info.col);
+ const isLocked = cell.locked();
+ const cellValue = cell.value();
+
+ console.log(`🔍 Cell state check:`, {
+ attId: exactMapping.attId,
+ isEditable: exactMapping.isEditable,
+ isLocked: isLocked,
+ currentValue: cellValue
+ });
+
+ // 🔧 추가: EditStarting 시점에서도 강제 잠금 해제 재시도
+ if (exactMapping.isEditable && isLocked) {
+ console.log(`🔓 Re-unlocking cell during EditStarting...`);
+ cell.locked(false);
+
+ // CellType도 재설정
+ const columnConfig = columnsJSON.find(col => col.key === exactMapping.attId);
+ if (columnConfig?.type !== "LIST") {
+ const textCellType = new GC.Spread.Sheets.CellTypes.Text();
+ activeSheet.setCellType(info.row, info.col, textCellType);
+ }
+ }
+
+ // 기본 편집 권한 확인
+ if (!exactMapping.isEditable) {
+ console.log(`🚫 Field ${exactMapping.attId} is not editable`);
+ toast.warning(`${exactMapping.attId} field is read-only`);
+ info.cancel = true;
+ return;
+ }
+
+ // SPREAD_LIST 또는 GRD_LIST 개별 행 SHI 확인
+ if ((templateType === 'SPREAD_LIST' || templateType === 'GRD_LIST') && exactMapping.dataRowIndex !== undefined) {
+ const dataRowIndex = exactMapping.dataRowIndex;
+
+ console.log(`🔍 Checking SHI for data row ${dataRowIndex}`);
+
+ if (dataRowIndex >= 0 && dataRowIndex < tableData.length) {
+ const rowData = tableData[dataRowIndex];
+ if (rowData?.shi === true) {
+ console.log(`🚫 Row ${dataRowIndex} is in SHI mode`);
+ toast.warning(`Row ${dataRowIndex + 1}: ${exactMapping.attId} field is read-only (SHI mode)`);
+ info.cancel = true;
+ return;
+ }
+ } else {
+ console.warn(`⚠️ Invalid dataRowIndex: ${dataRowIndex} (tableData.length: ${tableData.length})`);
+ }
+ }
+
+ console.log(`✅ Edit allowed for ${exactMapping.attId}`);
+ });
+
+ // ✅ 편집 완료 검증 (기존 로직 유지)
+ activeSheet.bind(GC.Spread.Sheets.Events.EditEnded, (event: any, info: any) => {
+ console.log(`🏁 EditEnded: Row ${info.row}, Col ${info.col}, New value: ${activeSheet.getValue(info.row, info.col)}`);
+
+ // ✅ 정확한 매핑 찾기
+ const exactMapping = mappings.find(m => {
+ const cellPos = parseCellAddress(m.cellAddress);
+ return cellPos && cellPos.row === info.row && cellPos.col === info.col;
+ });
+
+ if (!exactMapping) {
+ console.log(`ℹ️ No mapping found for [${info.row}, ${info.col}] - skipping validation`);
+ return;
+ }
+
+ const columnConfig = columnsJSON.find(col => col.key === exactMapping.attId);
+ if (columnConfig) {
+ const cellValue = activeSheet.getValue(info.row, info.col);
+ console.log(`🔍 Validating ${exactMapping.attId}: "${cellValue}"`);
+
+ const errorMessage = validateCellValue(cellValue, columnConfig.type, columnConfig.options);
+ const cell = activeSheet.getCell(info.row, info.col);
+
+ if (errorMessage) {
+ console.log(`❌ Validation failed: ${errorMessage}`);
+
+ // 🚨 에러 스타일 적용 (편집 가능 상태 유지)
+ const errorStyle = new GC.Spread.Sheets.Style();
+ errorStyle.backColor = "#fef2f2";
+ errorStyle.foreColor = "#dc2626";
+ errorStyle.borderLeft = new GC.Spread.Sheets.LineBorder("#dc2626", GC.Spread.Sheets.LineStyle.thick);
+ errorStyle.borderRight = new GC.Spread.Sheets.LineBorder("#dc2626", GC.Spread.Sheets.LineStyle.thick);
+ errorStyle.borderTop = new GC.Spread.Sheets.LineBorder("#dc2626", GC.Spread.Sheets.LineStyle.thick);
+ errorStyle.borderBottom = new GC.Spread.Sheets.LineBorder("#dc2626", GC.Spread.Sheets.LineStyle.thick);
+
+ activeSheet.setStyle(info.row, info.col, errorStyle);
+ cell.locked(!exactMapping.isEditable); // 편집 가능 상태 유지
+
+ toast.warning(`Invalid value in ${exactMapping.attId}: ${errorMessage}. Please correct the value.`, { duration: 5000 });
+ } else {
+ console.log(`✅ Validation passed`);
+
+ // ✅ 정상 스타일 복원
+ const normalStyle = createCellStyle(exactMapping.isEditable);
+ activeSheet.setStyle(info.row, info.col, normalStyle);
+ cell.locked(!exactMapping.isEditable);
+ }
+ }
+
+ // 🔄 변경 상태 업데이트
+ setHasChanges(true);
+ });
+
+ // 🔧 5단계: 설정 완료 후 1초 뒤에 추가 잠금 해제 실행 (안전장치)
+ setTimeout(() => {
+ console.log('🔄 Running safety unlock after 1 second...');
+ mappings.forEach(mapping => {
+ if (!mapping.isEditable) return;
+
+ const cellPos = parseCellAddress(mapping.cellAddress);
+ if (!cellPos) return;
+
+ try {
+ const cell = activeSheet.getCell(cellPos.row, cellPos.col);
+ if (cell.locked()) {
+ console.log(`🔓 Safety unlock: ${mapping.attId}`);
+ cell.locked(false);
+ }
+ } catch (error) {
+ console.error(`❌ Safety unlock error for ${mapping.cellAddress}:`, error);
+ }
+ });
+ }, 1000);
+
+ console.log(`🛡️ Protection and events configured for ${mappings.length} mappings`);
+ console.log(`🔓 Editable cells: ${mappings.filter(m => m.isEditable).length}`);
+ console.log(`🔒 Readonly cells: ${mappings.filter(m => !m.isEditable).length}`);
+}, [templateType, tableData, createCellStyle, validateCellValue, columnsJSON]);
+
+// 🔧 셀 타입 및 편집기 설정 함수 (initSpread 함수 내부에 추가)
+const setupCellTypeAndEditor = React.useCallback((activeSheet: any, cellPos: { row: number, col: number }, columnConfig: DataTableColumnJSON, isEditable: boolean, rowCount: number = 1) => {
+ console.log(`🔧 Setting up cell type for ${columnConfig.key} (${columnConfig.type}) at [${cellPos.row}, ${cellPos.col}]`);
+
+ try {
+ // 편집 가능한 셀에만 적절한 셀 타입 설정
+ if (isEditable) {
+ for (let i = 0; i < rowCount; i++) {
+ const targetRow = cellPos.row + i;
+ const cell = activeSheet.getCell(targetRow, cellPos.col);
+
+ // 셀 잠금 해제
+ cell.locked(false);
+
+ switch (columnConfig.type) {
+ case "LIST":
+ // 드롭다운은 기존 setupOptimizedListValidation 함수에서 처리
+ break;
+
+ case "NUMBER":
+ // 숫자 입력용 셀 타입 설정
+ const numberCellType = new GC.Spread.Sheets.CellTypes.Text();
+ activeSheet.setCellType(targetRow, cellPos.col, numberCellType);
+
+ // 숫자 validation 설정 (선택사항)
+ const numberValidator = GC.Spread.Sheets.DataValidation.createNumberValidator(
+ GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between,
+ -999999999, 999999999, true
+ );
+ numberValidator.showInputMessage(true);
+ numberValidator.inputTitle("Number Input");
+ numberValidator.inputMessage("Please enter a valid number");
+ activeSheet.setDataValidator(targetRow, cellPos.col, numberValidator);
+ break;
+
+ case "STRING":
+ default:
+ // 기본 텍스트 입력용 셀 타입 설정
+ const textCellType = new GC.Spread.Sheets.CellTypes.Text();
+ activeSheet.setCellType(targetRow, cellPos.col, textCellType);
+ break;
+ }
+
+ console.log(`✅ Cell type set for [${targetRow}, ${cellPos.col}]: ${columnConfig.type}`);
+ }
+ } else {
+ // 읽기 전용 셀 설정
+ for (let i = 0; i < rowCount; i++) {
+ const targetRow = cellPos.row + i;
+ const cell = activeSheet.getCell(targetRow, cellPos.col);
+ cell.locked(true);
+ }
+ }
+
+ } catch (error) {
+ console.error(`❌ Error setting cell type for ${columnConfig.key}:`, error);
+ }
+}, []);
+
+ // ═══════════════════════════════════════════════════════════════════════════════
+ // 🏗️ 메인 SpreadSheets 초기화 함수
+ // ═══════════════════════════════════════════════════════════════════════════════
+
+// 🛡️ 수정된 initSpread 함수 - activeSheet 참조 문제 해결
+const initSpread = React.useCallback((spread: any, template?: TemplateItem) => {
+ const workingTemplate = template || selectedTemplate;
+ if (!spread || !workingTemplate) {
+ console.error('❌ Invalid spread or template in initSpread');
+ return;
+ }
+
+ try {
+ // 🔄 초기 설정
+ setCurrentSpread(spread);
+ setHasChanges(false);
+ setValidationErrors([]);
+
+ // 성능을 위한 렌더링 일시 중단
+ spread.suspendPaint();
+
+ try {
+ // ⚠️ 초기 activeSheet 가져오기
+ let activeSheet = getSafeActiveSheet(spread, 'initSpread-initial');
+ if (!activeSheet) {
+ throw new Error('Failed to get initial activeSheet');
+ }
+
+ // 시트 보호 해제 (편집을 위해)
+ activeSheet.options.isProtected = false;
+
+ let mappings: CellMapping[] = [];
+
+ // 🆕 GRD_LIST 처리
+ if (templateType === 'GRD_LIST' && workingTemplate.GRD_LST_SETUP) {
+ console.log('🏗️ Processing GRD_LIST template');
+
+ // 기본 워크북 설정
+ spread.clearSheets();
+ spread.addSheet(0);
+ const sheet = spread.getSheet(0);
+ sheet.name('Data');
+ spread.setActiveSheet('Data');
+
+ // 동적 테이블 생성
+ mappings = createGrdListTable(sheet, workingTemplate);
+
+ } else {
+ // 🔍 SPREAD_LIST 및 SPREAD_ITEM 처리
+ let contentJson = null;
+ let dataSheets = null;
+
+ // SPR_LST_SETUP.CONTENT 우선 사용
+ if (workingTemplate.SPR_LST_SETUP?.CONTENT) {
+ contentJson = workingTemplate.SPR_LST_SETUP.CONTENT;
+ dataSheets = workingTemplate.SPR_LST_SETUP.DATA_SHEETS;
+ console.log('✅ Using SPR_LST_SETUP for template:', workingTemplate.NAME);
+ }
+ // SPR_ITM_LST_SETUP.CONTENT 대안 사용
+ else if (workingTemplate.SPR_ITM_LST_SETUP?.CONTENT) {
+ contentJson = workingTemplate.SPR_ITM_LST_SETUP.CONTENT;
+ dataSheets = workingTemplate.SPR_ITM_LST_SETUP.DATA_SHEETS;
+ console.log('✅ Using SPR_ITM_LST_SETUP for template:', workingTemplate.NAME);
+ }
+
+ if (!contentJson) {
+ throw new Error(`No template content found for ${workingTemplate.NAME}`);
+ }
+
+ if (!dataSheets || dataSheets.length === 0) {
+ throw new Error(`No data sheets configuration found for ${workingTemplate.NAME}`);
+ }
+
+ console.log('🔍 Template info:', {
+ templateName: workingTemplate.NAME,
+ templateType: templateType,
+ dataSheetsCount: dataSheets.length,
+ hasSelectedRow: !!selectedRow,
+ tableDataLength: tableData.length
+ });
+
+ // 🏗️ SpreadSheets 템플릿 로드
+ const jsonData = typeof contentJson === 'string' ? JSON.parse(contentJson) : contentJson;
+
+ console.log('📥 Loading template JSON...');
+ spread.fromJSON(jsonData);
+ console.log('✅ Template JSON loaded');
+
+ // ⚠️ 중요: 템플릿 로드 후 activeSheet 다시 가져오기
+ activeSheet = getSafeActiveSheet(spread, 'initSpread-after-fromJSON');
+ if (!activeSheet) {
+ throw new Error('ActiveSheet became null after loading template');
+ }
+
+ console.log('🔍 Active sheet after template load:', {
+ name: activeSheet.name?.() || 'unnamed',
+ rowCount: activeSheet.getRowCount(),
+ colCount: activeSheet.getColumnCount()
+ });
+
+ // 시트 보호 다시 해제 (템플릿 로드 후 다시 설정될 수 있음)
+ activeSheet.options.isProtected = false;
+
+ // 📊 데이터 매핑 및 로딩 처리
+ console.log(`🔄 Processing ${dataSheets.length} data sheets`);
+
+ dataSheets.forEach((dataSheet, sheetIndex) => {
+ console.log(`📋 Processing data sheet ${sheetIndex}:`, {
+ sheetName: dataSheet.SHEET_NAME,
+ mappingCount: dataSheet.MAP_CELL_ATT?.length || 0
+ });
+
+ if (dataSheet.MAP_CELL_ATT && dataSheet.MAP_CELL_ATT.length > 0) {
+ dataSheet.MAP_CELL_ATT.forEach((mapping, mappingIndex) => {
+ const { ATT_ID, IN } = mapping;
+
+ if (!ATT_ID || !IN || IN.trim() === "") {
+ console.warn(`⚠️ Invalid mapping: ATT_ID=${ATT_ID}, IN=${IN}`);
+ return;
+ }
+
+ const cellPos = parseCellAddress(IN);
+ if (!cellPos) {
+ console.warn(`⚠️ Invalid cell address: ${IN}`);
+ return;
+ }
+
+ const columnConfig = columnsJSON.find(col => col.key === ATT_ID);
+
+ // 🎯 템플릿 타입별 데이터 처리
+ if (templateType === 'SPREAD_ITEM' && selectedRow) {
+ console.log(`📝 Processing SPREAD_ITEM for ${ATT_ID}`);
+
+ const isEditable = isFieldEditable(ATT_ID);
+ const value = selectedRow[ATT_ID];
+
+ // 매핑 정보 저장
+ mappings.push({
+ attId: ATT_ID,
+ cellAddress: IN,
+ isEditable: isEditable,
+ dataRowIndex: 0
+ });
+
+ // ⚠️ 안전한 셀 참조 및 값 설정
+ try {
+ const cell = activeSheet.getCell(cellPos.row, cellPos.col);
+ console.log(`🔄 Setting SPREAD_ITEM cell [${cellPos.row}, ${cellPos.col}] ${ATT_ID}: "${value}"`);
+
+ // 🔧 새로 추가: 셀 타입 및 편집기 설정
+ setupCellTypeAndEditor(activeSheet, cellPos, columnConfig, isEditable, 1);
+
+ // 값 설정
+ cell.value(value ?? null);
+
+ // 스타일 설정
+ const style = createCellStyle(isEditable);
+ activeSheet.setStyle(cellPos.row, cellPos.col, style);
+
+ // LIST 타입 드롭다운 설정 (기존 코드 유지)
+ if (columnConfig?.type === "LIST" && columnConfig.options && isEditable) {
+ setupOptimizedListValidation(activeSheet, cellPos, columnConfig.options, 1);
+ }
+
+ console.log(`✅ SPREAD_ITEM cell set successfully`);
+ } catch (cellError) {
+ console.error(`❌ Error setting SPREAD_ITEM cell:`, cellError);
+ }
+ } else if (templateType === 'SPREAD_LIST' && tableData.length > 0) {
+ console.log(`📊 Processing SPREAD_LIST for ${ATT_ID} with ${tableData.length} rows`);
+
+ // 🚀 행 확장 - 안전한 방법으로
+ const requiredRows = cellPos.row + tableData.length;
+ console.log(`🚀 Ensuring ${requiredRows} rows for SPREAD_LIST`);
+
+ // ⚠️ activeSheet 유효성 재검증
+ const currentActiveSheet = getSafeActiveSheet(spread, 'ensureRowCapacity');
+ if (!currentActiveSheet) {
+ console.error(`❌ ActiveSheet is null before ensureRowCapacity`);
+ return;
+ }
+
+ if (!ensureRowCapacity(currentActiveSheet, requiredRows)) {
+ console.error(`❌ Failed to ensure row capacity for ${requiredRows} rows`);
+ return;
+ }
+
+ // activeSheet 참조 업데이트
+ activeSheet = currentActiveSheet;
+
+ // 매핑 생성
+ tableData.forEach((rowData, index) => {
+ const targetRow = cellPos.row + index;
+ const targetCellAddress = getCellAddress(targetRow, cellPos.col);
+ const cellEditable = isFieldEditable(ATT_ID, rowData);
+
+ mappings.push({
+ attId: ATT_ID,
+ cellAddress: targetCellAddress,
+ isEditable: cellEditable,
+ dataRowIndex: index
+ });
+ });
+
+ // LIST 타입 드롭다운 설정
+ if (columnConfig?.type === "LIST" && columnConfig.options) {
+ const hasEditableRows = tableData.some((rowData) => isFieldEditable(ATT_ID, rowData));
+ if (hasEditableRows) {
+ setupOptimizedListValidation(activeSheet, cellPos, columnConfig.options, tableData.length);
+ }
+ }
+// 개별 셀 데이터 및 스타일 설정
+tableData.forEach((rowData, index) => {
+ const targetRow = cellPos.row + index;
+
+ try {
+ const cell = activeSheet.getCell(targetRow, cellPos.col);
+ const value = rowData[ATT_ID];
+ const cellEditable = isFieldEditable(ATT_ID, rowData);
+
+ console.log(`🔄 Setting SPREAD_LIST Row ${index} ${ATT_ID}: "${value}"`);
+
+ // 🔧 새로 추가: 각 셀에 대한 타입 및 편집기 설정
+ setupCellTypeAndEditor(activeSheet, { row: targetRow, col: cellPos.col }, columnConfig, cellEditable, 1);
+
+ // 값 설정
+ cell.value(value ?? null);
+
+ // 스타일 설정
+ const style = createCellStyle(cellEditable);
+ activeSheet.setStyle(targetRow, cellPos.col, style);
+
+ } catch (cellError) {
+ console.error(`❌ Error setting SPREAD_LIST cell Row ${index}:`, cellError);
+ }
+});
+
+
+ console.log(`✅ SPREAD_LIST processing completed for ${ATT_ID}`);
+ }
+ });
+ }
+ });
+ }
+
+ // 💾 매핑 정보 저장 및 이벤트 설정
+ setCellMappings(mappings);
+
+ // ⚠️ 최종 activeSheet 재확인 후 이벤트 설정
+ const finalActiveSheet = getSafeActiveSheet(spread, 'setupSheetProtectionAndEvents');
+ if (finalActiveSheet) {
+ setupSheetProtectionAndEvents(finalActiveSheet, mappings);
+ } else {
+ console.error('❌ Failed to get activeSheet for events setup');
+ }
+
+ console.log(`✅ Template initialization completed with ${mappings.length} mappings`);
+
+ } finally {
+ // 렌더링 재개
+ spread.resumePaint();
+ }
+
+ } catch (error) {
+ console.error('❌ Error initializing spread:', error);
+ // toast.error(`Failed to load template: ${error.message}`);
+ if (spread?.resumePaint) {
+ spread.resumePaint();
+ }
+ }
+}, [selectedTemplate, templateType, selectedRow, tableData, isFieldEditable, columnsJSON, createCellStyle, setupOptimizedListValidation, ensureRowCapacity, setupSheetProtectionAndEvents, createGrdListTable, getCellAddress, getSafeActiveSheet, validateActiveSheet]);
+ // 변경사항 저장 함수
+ const handleSaveChanges = React.useCallback(async () => {
+ if (!currentSpread || !hasChanges) {
+ toast.info("No changes to save");
+ return;
+ }
+
+ // 저장 전 데이터 검증
+ const errors = validateAllData();
+ if (errors.length > 0) {
+ toast.error(`Cannot save: ${errors.length} validation errors found. Please fix them first.`);
+ return;
+ }
+
+ try {
+ setIsPending(true);
+
+ const activeSheet = currentSpread.getActiveSheet();
+
+ if (templateType === 'SPREAD_ITEM' && selectedRow) {
+ // 단일 행 저장
+ const dataToSave = { ...selectedRow };
+
+ cellMappings.forEach(mapping => {
+ if (mapping.isEditable) {
+ const cellPos = parseCellAddress(mapping.cellAddress);
+ if (cellPos) {
+ const cellValue = activeSheet.getValue(cellPos.row, cellPos.col);
+ dataToSave[mapping.attId] = cellValue;
+ }
+ }
+ });
+
+ dataToSave.TAG_NO = selectedRow.TAG_NO;
+
+ const { success, message } = await updateFormDataInDB(
+ formCode,
+ contractItemId,
+ dataToSave
+ );
+
+ if (!success) {
+ toast.error(message);
+ return;
+ }
+
+ toast.success("Changes saved successfully!");
+ onUpdateSuccess?.(dataToSave);
+
+ } else if ((templateType === 'SPREAD_LIST' || templateType === 'GRD_LIST') && tableData.length > 0) {
+ // 복수 행 저장 (SPREAD_LIST와 GRD_LIST 동일 처리)
+ const updatedRows: GenericData[] = [];
+ let saveCount = 0;
+
+ for (let i = 0; i < tableData.length; i++) {
+ const originalRow = tableData[i];
+ const dataToSave = { ...originalRow };
+ let hasRowChanges = false;
+
+ // 각 매핑에 대해 해당 행의 값 확인
+ cellMappings.forEach(mapping => {
+ if (mapping.dataRowIndex === i && mapping.isEditable) {
+ const columnConfig = columnsJSON.find(col => col.key === mapping.attId);
+ const isColumnEditable = columnConfig?.shi !== true;
+ const isRowEditable = originalRow.shi !== true;
+
+ if (isColumnEditable && isRowEditable) {
+ const cellPos = parseCellAddress(mapping.cellAddress);
+ if (cellPos) {
+ const cellValue = activeSheet.getValue(cellPos.row, cellPos.col);
+
+ // 값이 변경되었는지 확인
+ if (cellValue !== originalRow[mapping.attId]) {
+ dataToSave[mapping.attId] = cellValue;
+ hasRowChanges = true;
+ }
+ }
+ }
+ }
+ });
+
+ // 변경사항이 있는 행만 저장
+ if (hasRowChanges) {
+ dataToSave.TAG_NO = originalRow.TAG_NO; // TAG_NO는 절대 변경되지 않도록
+
+ const { success } = await updateFormDataInDB(
+ formCode,
+ contractItemId,
+ dataToSave
+ );
+
+ if (success) {
+ updatedRows.push(dataToSave);
+ saveCount++;
+ }
+ } else {
+ updatedRows.push(originalRow); // 변경사항이 없으면 원본 유지
+ }
+ }
+
+ if (saveCount > 0) {
+ toast.success(`${saveCount} rows saved successfully!`);
+ onUpdateSuccess?.(updatedRows);
+ } else {
+ toast.info("No changes to save");
+ }
+ }
+
+ setHasChanges(false);
+ setValidationErrors([]);
+
+ } catch (error) {
+ console.error("Error saving changes:", error);
+ toast.error("An unexpected error occurred while saving");
+ } finally {
+ setIsPending(false);
+ }
+ }, [currentSpread, hasChanges, templateType, selectedRow, tableData, formCode, contractItemId, onUpdateSuccess, cellMappings, columnsJSON, validateAllData]);
+
+ if (!isOpen) return null;
+
+ // 데이터 유효성 검사
+ const isDataValid = templateType === 'SPREAD_ITEM' ? !!selectedRow : tableData.length > 0;
+ const dataCount = templateType === 'SPREAD_ITEM' ? 1 : tableData.length;
+
+
+ return (
+
+
+
+ SEDP Template - {formCode}
+
+
+ {/* 템플릿 선택 */}
+ {availableTemplates.length > 1 && (
+
+ Template:
+
+
+
+
+
+ {availableTemplates.map(template => (
+
+ {template.NAME} ({
+ template.TMPL_TYPE
+ })
+
+ ))}
+
+
+
+ )}
+
+ {/* 템플릿 정보 */}
+ {selectedTemplate && (
+
+
+ Template Type: {
+ templateType === 'SPREAD_LIST' ? 'List View (SPREAD_LIST)' :
+ templateType === 'SPREAD_ITEM' ? 'Item View (SPREAD_ITEM)' :
+ 'Grid List View (GRD_LIST)'
+ }
+
+ {templateType === 'SPREAD_ITEM' && selectedRow && (
+
• Selected TAG_NO: {selectedRow.TAG_NO || 'N/A'}
+ )}
+ {(templateType === 'SPREAD_LIST' || templateType === 'GRD_LIST') && (
+
• {dataCount} rows
+ )}
+ {hasChanges && (
+
+ • Unsaved changes
+
+ )}
+ {validationErrors.length > 0 && (
+
+
+ {validationErrors.length} validation errors
+
+ )}
+
+ )}
+
+ {/* 범례 */}
+
+
+
+ Editable fields
+
+
+
+ Read-only fields
+
+
+
+ Validation errors
+
+ {cellMappings.length > 0 && (
+
+ {editableFieldsCount} of {cellMappings.length} fields editable
+
+ )}
+
+
+
+
+
+ {/* SpreadSheets 컴포넌트 영역 */}
+
+ {selectedTemplate && isClient && isDataValid ? (
+
+ ) : (
+
+ {!isClient ? (
+ <>
+
+ Loading...
+ >
+ ) : !selectedTemplate ? (
+ "No template available"
+ ) : !isDataValid ? (
+ `No ${templateType === 'SPREAD_ITEM' ? 'selected row' : 'data'} available`
+ ) : (
+ "Template not ready"
+ )}
+
+ )}
+
+
+
+
+
+ Close
+
+
+ {hasChanges && (
+
0}
+ >
+ {isPending ? (
+ <>
+
+ Saving...
+ >
+ ) : (
+ <>
+
+ Save Changes
+ >
+ )}
+
+ )}
+
+ {validationErrors.length > 0 && (
+
+
+ Check Errors ({validationErrors.length})
+
+ )}
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/components/form-data/spreadJS-dialog.tsx b/components/form-data/spreadJS-dialog.tsx
index 54a70d9d..a223a849 100644
--- a/components/form-data/spreadJS-dialog.tsx
+++ b/components/form-data/spreadJS-dialog.tsx
@@ -327,6 +327,17 @@ export function TemplateViewDialog({
});
}, []);
+ const createCellStyle = React.useCallback((isEditable: boolean) => {
+ const style = new GC.Spread.Sheets.Style();
+ if (isEditable) {
+ style.backColor = "#f0fdf4";
+ } else {
+ style.backColor = "#f9fafb";
+ style.foreColor = "#6b7280";
+ }
+ return style;
+ }, []);
+
const setBatchStyles = React.useCallback((
activeSheet: any,
stylesToSet: Array<{row: number, col: number, isEditable: boolean}>
@@ -440,16 +451,7 @@ export function TemplateViewDialog({
return errors;
}, [currentSpread, selectedTemplate, cellMappings, columnsJSON]);
- const createCellStyle = React.useCallback((isEditable: boolean) => {
- const style = new GC.Spread.Sheets.Style();
- if (isEditable) {
- style.backColor = "#f0fdf4";
- } else {
- style.backColor = "#f9fafb";
- style.foreColor = "#6b7280";
- }
- return style;
- }, []);
+
const setupOptimizedListValidation = React.useCallback((activeSheet: any, cellPos: { row: number, col: number }, options: string[], rowCount: number) => {
try {
@@ -780,7 +782,7 @@ export function TemplateViewDialog({
});
// 🛡️ 시트 보호 재설정 (편집 허용 모드로)
- activeSheet.options.isProtected = true;
+ activeSheet.options.isProtected = false;
activeSheet.options.protectionOptions = {
allowSelectLockedCells: true,
allowSelectUnlockedCells: true,
diff --git a/components/information/information-button.tsx b/components/information/information-button.tsx
index 5a9dc4d4..52079767 100644
--- a/components/information/information-button.tsx
+++ b/components/information/information-button.tsx
@@ -111,7 +111,14 @@ export function InformationButton({
// 파일 다운로드 핸들러
const handleDownload = () => {
if (information?.attachmentFilePath) {
- window.open(information.attachmentFilePath, '_blank')
+ // window.open 대신 link 요소 사용
+ const link = document.createElement('a')
+ link.href = information.attachmentFilePath
+ link.target = '_blank'
+ link.rel = 'noopener noreferrer'
+ document.body.appendChild(link)
+ link.click()
+ document.body.removeChild(link)
}
}
diff --git a/components/information/information-client.tsx b/components/information/information-client.tsx
index 69835599..d863175f 100644
--- a/components/information/information-client.tsx
+++ b/components/information/information-client.tsx
@@ -1,6 +1,7 @@
"use client"
import { useState, useEffect, useTransition } from "react"
+import { useRouter } from "next/navigation"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import {
@@ -34,6 +35,7 @@ type SortField = "pageName" | "pagePath" | "createdAt"
type SortDirection = "asc" | "desc"
export function InformationClient({ initialData = [] }: InformationClientProps) {
+ const router = useRouter()
const [informations, setInformations] = useState(initialData)
const [loading, setLoading] = useState(false)
const [searchQuery, setSearchQuery] = useState("")
@@ -185,7 +187,7 @@ export function InformationClient({ initialData = [] }: InformationClientProps)
window.location.reload()}
+ onClick={() => router.refresh()}
>
새로고침
diff --git a/components/ship-vendor-document/edit-revision-dialog.tsx b/components/ship-vendor-document/edit-revision-dialog.tsx
new file mode 100644
index 00000000..313a27bc
--- /dev/null
+++ b/components/ship-vendor-document/edit-revision-dialog.tsx
@@ -0,0 +1,726 @@
+"use client"
+
+import React from "react"
+import { useForm } from "react-hook-form"
+import { zodResolver } from "@hookform/resolvers/zod"
+import { z } from "zod"
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from "@/components/ui/dialog"
+import {
+ Form,
+ FormControl,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+} from "@/components/ui/form"
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select"
+import { Input } from "@/components/ui/input"
+import { Textarea } from "@/components/ui/textarea"
+import { Button } from "@/components/ui/button"
+import { Badge } from "@/components/ui/badge"
+import {
+ Edit,
+ FileText,
+ Loader2,
+ AlertTriangle,
+ Trash2,
+ CheckCircle,
+ Clock
+} from "lucide-react"
+import { toast } from "sonner"
+import { updateRevisionAction, deleteRevisionAction } from "@/lib/vendor-document-list/enhanced-document-service" // ✅ 서버 액션 import
+
+/* -------------------------------------------------------------------------------------------------
+ * Schema & Types
+ * -----------------------------------------------------------------------------------------------*/
+
+interface RevisionInfo {
+ id: number
+ issueStageId: number
+ revision: string
+ uploaderType: string
+ uploaderId: number | null
+ uploaderName: string | null
+ comment: string | null
+ usage: string | null
+ usageType: string | null
+ revisionStatus: string
+ submittedDate: string | null
+ approvedDate: string | null
+ uploadedAt: string | null
+ reviewStartDate: string | null
+ rejectedDate: string | null
+ reviewerId: number | null
+ reviewerName: string | null
+ reviewComments: string | null
+ createdAt: Date
+ updatedAt: Date
+ stageName?: string
+ attachments: AttachmentInfo[]
+}
+
+interface AttachmentInfo {
+ id: number
+ revisionId: number
+ fileName: string
+ filePath: string
+ dolceFilePath: string | null
+ fileSize: number | null
+ fileType: string | null
+ createdAt: Date
+ updatedAt: Date
+}
+
+// drawingKind에 따른 동적 스키마 생성 (수정용)
+const createEditRevisionSchema = (drawingKind: string) => {
+ const baseSchema = {
+ usage: z.string().min(1, "Please select a usage"),
+ revision: z.string().min(1, "Please enter a revision").max(50, "Revision must be 50 characters or less"), // ✅ revision 필드 추가
+ comment: z.string().optional(),
+ }
+
+ // B3인 경우에만 usageType 필드 추가
+ if (drawingKind === 'B3') {
+ return z.object({
+ ...baseSchema,
+ usageType: z.string().min(1, "Please select a usage type"),
+ })
+ } else {
+ return z.object({
+ ...baseSchema,
+ usageType: z.string().optional(),
+ })
+ }
+}
+
+// drawingKind에 따른 용도 옵션
+const getUsageOptions = (drawingKind: string) => {
+ switch (drawingKind) {
+ case 'B3':
+ return [
+ { value: "Approval", label: "Approval" },
+ { value: "Working", label: "Working" },
+ { value: "Comments", label: "Comments" },
+ ]
+ case 'B4':
+ return [
+ { value: "Pre", label: "Pre" },
+ { value: "Working", label: "Working" },
+ ]
+ case 'B5':
+ return [
+ { value: "Pre", label: "Pre" },
+ { value: "Working", label: "Working" },
+ ]
+ default:
+ return [
+ { value: "Pre", label: "Pre" },
+ { value: "Working", label: "Working" },
+ ]
+ }
+}
+
+// B3 전용 용도 타입 옵션
+const getUsageTypeOptions = (usage: string) => {
+ switch (usage) {
+ case 'Approval':
+ return [
+ { value: "Full", label: "Full" },
+ { value: "Partial", label: "Partial" },
+ ]
+ case 'Working':
+ return [
+ { value: "Full", label: "Full" },
+ { value: "Partial", label: "Partial" },
+ ]
+ case 'Comments':
+ return [
+ { value: "Comments", label: "Comments" },
+ ]
+ default:
+ return []
+ }
+}
+
+// ✅ 리비전 가이드 생성 (NewRevisionDialog와 동일)
+const getRevisionGuide = () => {
+ return "Enter in R01, R02, R03... format"
+}
+
+interface EditRevisionDialogProps {
+ open: boolean
+ onOpenChange: (open: boolean) => void
+ revision: RevisionInfo | null
+ drawingKind?: string
+ onSuccess: (action: 'update' | 'delete', result?: any) => void
+}
+
+/* -------------------------------------------------------------------------------------------------
+ * Revision Info Display Component
+ * -----------------------------------------------------------------------------------------------*/
+function RevisionInfoDisplay({ revision }: { revision: RevisionInfo }) {
+ const canEdit = React.useMemo(() => {
+ if (!revision.attachments || revision.attachments.length === 0) {
+ return true
+ }
+ return revision.attachments.every(attachment =>
+ !attachment.dolceFilePath || attachment.dolceFilePath.trim() === ''
+ )
+ }, [revision.attachments])
+
+ const processedCount = revision.attachments?.filter(attachment =>
+ attachment.dolceFilePath && attachment.dolceFilePath.trim() !== ''
+ ).length || 0
+
+ const getStatusColor = (status: string) => {
+ switch (status) {
+ case 'APPROVED': return 'bg-green-100 text-green-800'
+ case 'UPLOADED': return 'bg-blue-100 text-blue-800'
+ case 'REJECTED': return 'bg-red-100 text-red-800'
+ default: return 'bg-gray-100 text-gray-800'
+ }
+ }
+
+ return (
+
+
+
+
+ {revision.revision}
+
+
+ {revision.revisionStatus}
+
+ {!canEdit && (
+
+ Partially Processed
+
+ )}
+
+
+
+
+ {revision.attachments?.length || 0} file(s)
+ {processedCount > 0 && (
+
+ ({processedCount} processed)
+
+ )}
+
+
+
+
+
+ Uploader:
+ {revision.uploaderName || '-'}
+
+
+ Upload Date:
+
+ {revision.uploadedAt
+ ? new Date(revision.uploadedAt).toLocaleDateString()
+ : '-'
+ }
+
+
+
+
+ {revision.comment && (
+
+
Current Comment:
+
+ {revision.comment}
+
+
+ )}
+
+ {!canEdit && (
+
+
+
+ Some files have been processed. Editing is limited.
+
+
+ )}
+
+ )
+}
+
+/* -------------------------------------------------------------------------------------------------
+ * Main Dialog Component
+ * -----------------------------------------------------------------------------------------------*/
+export function EditRevisionDialog({
+ open,
+ onOpenChange,
+ revision,
+ drawingKind = 'B4',
+ onSuccess
+}: EditRevisionDialogProps) {
+ const [isLoading, setIsLoading] = React.useState(false)
+ const [isDeleting, setIsDeleting] = React.useState(false)
+ const [showDeleteConfirm, setShowDeleteConfirm] = React.useState(false)
+
+ // drawingKind에 따른 동적 스키마 및 옵션 생성
+ const editRevisionSchema = React.useMemo(() => createEditRevisionSchema(drawingKind), [drawingKind])
+ const usageOptions = React.useMemo(() => getUsageOptions(drawingKind), [drawingKind])
+ const showUsageType = drawingKind === 'B3'
+
+ type EditRevisionSchema = z.infer
+
+ const form = useForm({
+ resolver: zodResolver(editRevisionSchema),
+ defaultValues: {
+ usage: "",
+ revision: "", // ✅ revision 기본값 추가
+ comment: "",
+ usageType: showUsageType ? "" : undefined,
+ },
+ })
+
+ const watchedUsage = form.watch("usage")
+
+ // 용도 선택에 따른 용도 타입 옵션 업데이트
+ const usageTypeOptions = React.useMemo(() => {
+ if (drawingKind === 'B3' && watchedUsage) {
+ return getUsageTypeOptions(watchedUsage)
+ }
+ return []
+ }, [drawingKind, watchedUsage])
+
+ // ✅ 리비전 가이드 텍스트
+ const revisionGuide = React.useMemo(() => {
+ return getRevisionGuide()
+ }, [])
+
+ // revision이 변경될 때 폼 데이터 초기화
+ React.useEffect(() => {
+ if (revision) {
+ form.reset({
+ usage: revision.usage || "",
+ revision: revision.revision || "", // ✅ revision 값 설정
+ comment: revision.comment || "",
+ usageType: showUsageType ? (revision.usageType || "") : undefined,
+ })
+ }
+ }, [revision, showUsageType, form])
+
+ // 용도 변경 시 용도 타입 초기화 또는 자동 설정 (NewRevisionDialog와 동일한 로직)
+ React.useEffect(() => {
+ if (showUsageType && watchedUsage) {
+ if (watchedUsage === "Comments") {
+ form.setValue("usageType", "Comments")
+ } else {
+ // Comments가 아닌 경우, 초기 로드가 아니라면 초기화
+ const currentValue = form.getValues("usageType")
+ if (revision && watchedUsage !== revision.usage) {
+ form.setValue("usageType", "")
+ }
+ }
+ }
+ }, [watchedUsage, showUsageType, form, revision])
+
+ // 수정 가능 여부 확인
+ const canEdit = React.useMemo(() => {
+ if (!revision?.attachments || revision.attachments.length === 0) {
+ return true
+ }
+ return revision.attachments.every(attachment =>
+ !attachment.dolceFilePath || attachment.dolceFilePath.trim() === ''
+ )
+ }, [revision?.attachments])
+
+ // 폼 변경 체크
+ const hasChanges = React.useMemo(() => {
+ if (!revision) return false
+ const currentValues = form.getValues()
+ return (
+ currentValues.comment !== (revision.comment || '') ||
+ currentValues.usage !== (revision.usage || '') ||
+ currentValues.revision !== (revision.revision || '') || // ✅ revision 변경 체크 추가
+ (showUsageType && currentValues.usageType !== (revision.usageType || ''))
+ )
+ }, [revision, form, showUsageType])
+
+ const handleDialogClose = () => {
+ if (!isLoading && !isDeleting) {
+ setShowDeleteConfirm(false)
+ form.reset()
+ onOpenChange(false)
+ }
+ }
+
+ const onSubmit = async (data: EditRevisionSchema) => {
+ if (!revision || !canEdit) {
+ toast.error("Cannot edit this revision")
+ return
+ }
+
+ setIsLoading(true)
+
+ try {
+ // ✅ 서버 액션 호출 - revision 필드 추가
+ const result = await updateRevisionAction({
+ revisionId: revision.id,
+ revision: data.revision.trim(), // ✅ revision 추가
+ comment: data.comment?.trim() || null,
+ usage: data.usage.trim(),
+ usageType: showUsageType && 'usageType' in data ? data.usageType?.trim() || null : null,
+ })
+
+ if (!result.success) {
+ throw new Error(result.error || 'Failed to update revision')
+ }
+
+ toast.success(
+ result.message ||
+ `Revision ${data.revision} updated successfully` // ✅ 새 revision 값 사용
+ )
+
+ setTimeout(() => {
+ handleDialogClose()
+ onSuccess('update', result)
+ }, 1000)
+
+ } catch (error) {
+ console.error('❌ Update error:', error)
+ toast.error(error instanceof Error ? error.message : "An error occurred during update")
+ } finally {
+ setIsLoading(false)
+ }
+ }
+
+ const handleDelete = async () => {
+ if (!revision || !canEdit) {
+ toast.error("Cannot delete this revision")
+ return
+ }
+
+ setIsDeleting(true)
+
+ try {
+ // ✅ 서버 액션 호출
+ const result = await deleteRevisionAction({
+ revisionId: revision.id,
+ })
+
+ if (!result.success) {
+ throw new Error(result.error || 'Failed to delete revision')
+ }
+
+ toast.success(
+ result.message ||
+ `Revision ${revision.revision} deleted successfully`
+ )
+
+ setTimeout(() => {
+ handleDialogClose()
+ onSuccess('delete', result)
+ }, 1000)
+
+ } catch (error) {
+ console.error('❌ Delete error:', error)
+ toast.error(error instanceof Error ? error.message : "An error occurred during deletion")
+ } finally {
+ setIsDeleting(false)
+ }
+ }
+
+ if (!revision) return null
+
+ return (
+
+
+ {/* 고정 헤더 */}
+
+
+
+ Edit Revision
+
+
+ Modify revision details and metadata
+
+
+
+ {!showDeleteConfirm ? (
+
+
+ ) : (
+ // 삭제 확인 화면
+
+
+
+
+
+
+
Delete Revision
+
+ Are you sure you want to delete revision {revision.revision} ?
+
+
+
+
+
+
This action will permanently delete:
+
+ Revision metadata and settings
+ All {revision.attachments?.length || 0} attached file(s)
+ Upload history and comments
+
+
+ This action cannot be undone.
+
+
+
+ {/* 성공/로딩 상태 */}
+ {isDeleting && (
+
+
+ Deleting revision...
+
+ )}
+
+
+
+
+
+ setShowDeleteConfirm(false)}
+ disabled={isDeleting}
+ >
+ Cancel
+
+
+ {isDeleting ? (
+ <>
+
+ Deleting...
+ >
+ ) : (
+ <>
+
+ Delete Revision
+ >
+ )}
+
+
+
+
+ )}
+
+
+ )
+}
\ No newline at end of file
diff --git a/components/ship-vendor-document/user-vendor-document-table-container.tsx b/components/ship-vendor-document/user-vendor-document-table-container.tsx
index 4e133696..61d52c28 100644
--- a/components/ship-vendor-document/user-vendor-document-table-container.tsx
+++ b/components/ship-vendor-document/user-vendor-document-table-container.tsx
@@ -27,7 +27,7 @@ import {
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog"
-import { Building, FileText, AlertCircle, Eye, Download, Loader2, Plus } from "lucide-react"
+import { Building, FileText, AlertCircle, Eye, Download, Loader2, Plus, Trash2, Edit } from "lucide-react"
import { SimplifiedDocumentsTable } from "@/lib/vendor-document-list/ship/enhanced-documents-table"
import {
getUserVendorDocuments,
@@ -38,6 +38,7 @@ import { WebViewerInstance } from "@pdftron/webviewer"
import { NewRevisionDialog } from "./new-revision-dialog"
import { useRouter } from 'next/navigation'
import { AddAttachmentDialog } from "./add-attachment-dialog" // ✅ import 추가
+import { EditRevisionDialog } from "./edit-revision-dialog" // ✅ 추가
/* -------------------------------------------------------------------------------------------------
* Types & Constants
@@ -91,6 +92,7 @@ interface AttachmentInfo {
revisionId: number
fileName: string
filePath: string
+ dolceFilePath: string | null
fileSize: number | null
fileType: string | null
createdAt: Date
@@ -129,7 +131,7 @@ export const DocumentSelectionContext = React.createContext = {
'Approval Submission Full': 'AS-F',
@@ -143,18 +145,20 @@ function getUsageTypeDisplay(usageType: string | null): string {
'Reference Series Full': 'RS-F',
'Reference Series Partial': 'RS-P',
}
-
+
return abbreviations[usageType] || usageType
}
-function RevisionTable({
- revisions,
+function RevisionTable({
+ revisions,
onViewRevision,
- onNewRevision
-}: {
+ onNewRevision,
+ onEditRevision, // ✅ 수정 함수 prop 추가
+}: {
revisions: RevisionInfo[]
onViewRevision: (revision: RevisionInfo) => void
onNewRevision: () => void
+ onEditRevision: (revision: RevisionInfo) => void // ✅ 수정 함수 타입 추가
}) {
const { selectedRevisionId, setSelectedRevisionId } =
React.useContext(DocumentSelectionContext)
@@ -163,6 +167,38 @@ function RevisionTable({
setSelectedRevisionId(revisionId === selectedRevisionId ? null : revisionId)
}
+ // ✅ 리비전 수정 가능 여부 확인 함수
+ const canEditRevision = React.useCallback((revision: RevisionInfo) => {
+ // 첨부파일이 없으면 수정 가능
+ if ((!revision.attachments || revision.attachments.length === 0)&&revision.uploaderType ==="vendor") {
+ return true
+ }
+
+ // 모든 첨부파일의 dolceFilePath가 null이거나 빈값이어야 수정 가능
+ return revision.attachments.every(attachment =>
+ !attachment.dolceFilePath || attachment.dolceFilePath.trim() === ''
+ )
+ }, [])
+
+ // ✅ 리비전 상태 표시 함수 (처리된 파일이 있는지 확인)
+ const getRevisionProcessStatus = React.useCallback((revision: RevisionInfo) => {
+ if (!revision.attachments || revision.attachments.length === 0) {
+ return 'no-files'
+ }
+
+ const processedCount = revision.attachments.filter(attachment =>
+ attachment.dolceFilePath && attachment.dolceFilePath.trim() !== ''
+ ).length
+
+ if (processedCount === 0) {
+ return 'not-processed'
+ } else if (processedCount === revision.attachments.length) {
+ return 'fully-processed'
+ } else {
+ return 'partially-processed'
+ }
+ }, [])
+
return (
@@ -182,14 +218,14 @@ function RevisionTable({
-
+
Select
Revision
Category
Usage
- Type {/* ✅ usageType 컬럼 */}
+ Type
Status
Uploader
Comment
@@ -199,94 +235,144 @@ function RevisionTable({
- {revisions.map((revision) => (
-
-
- toggleSelect(revision.id)}
- className="h-4 w-4 cursor-pointer"
- />
-
-
- {revision.revision}
-
-
- {revision.uploaderType === "vendor" ? "To SHI" : "From SHI"}
-
-
-
- {revision.usage || '-'}
-
-
- {/* ✅ usageType 표시 */}
-
-
- {revision.usageType ?
-
+ {revisions.map((revision) => {
+ const canEdit = canEditRevision(revision)
+ const processStatus = getRevisionProcessStatus(revision)
+
+ return (
+
+
+ toggleSelect(revision.id)}
+ className="h-4 w-4 cursor-pointer"
+ />
+
+
+
+ {revision.revision}
+ {/* ✅ 처리 상태 인디케이터 */}
+ {processStatus === 'fully-processed' && (
+
+ )}
+ {processStatus === 'partially-processed' && (
+
+ )}
+
+
+
+ {revision.uploaderType === "vendor" ? "To SHI" : "From SHI"}
+
+
+
+ {revision.usage || '-'}
+
+
+
+
+ {revision.usageType ? (
revision.usageType
-
- : (
+ ) : (
+ -
+ )}
+
+
+
+
+ {revision.revisionStatus}
+
+
+
+ {revision.uploaderName || '-'}
+
+
+ {revision.comment ? (
+
+
+ {revision.comment}
+
+
+ ) : (
-
)}
-
-
-
-
- {revision.revisionStatus}
-
-
-
- {revision.uploaderName || '-'}
-
-
- {revision.comment ? (
-
-
- {revision.comment}
-
+
+
+
+ {revision.uploadedAt
+ ? new Date(revision.uploadedAt).toLocaleDateString()
+ : '-'}
+
+
+
+
+ {revision.attachments.length}
+ {/* ✅ 처리된 파일 수 표시 */}
+ {processStatus === 'partially-processed' && (
+
+ ({revision.attachments.filter(att =>
+ att.dolceFilePath && att.dolceFilePath.trim() !== ''
+ ).length} processed)
+
+ )}
- ) : (
- -
- )}
-
-
-
- {revision.uploadedAt
- ? new Date(revision.uploadedAt).toLocaleDateString()
- : '-'}
-
-
-
- {revision.attachments.length}
-
-
- {revision.attachments.length > 0 && (
- onViewRevision(revision)}
- className="h-8 px-2"
- >
-
-
- )}
-
-
- ))}
+
+
+
+ {/* 보기 버튼 */}
+ {revision.attachments.length > 0 && (
+ onViewRevision(revision)}
+ className="h-8 px-2"
+ title="View attachments"
+ >
+
+
+ )}
+
+ {/* ✅ 수정 버튼 */}
+ onEditRevision(revision)}
+ className={`h-8 px-2 ${
+ canEdit
+ ? 'text-blue-600 hover:text-blue-700 hover:bg-blue-50'
+ : 'text-gray-400 cursor-not-allowed'
+ }`}
+ disabled={!canEdit}
+ title={
+ canEdit
+ ? 'Edit revision'
+ : 'Cannot edit - some files have been processed'
+ }
+ >
+
+
+
+
+
+ )
+ })}
@@ -295,21 +381,24 @@ function RevisionTable({
)
}
-function AttachmentTable({
- attachments,
- onDownloadFile
-}: {
+function AttachmentTable({
+ attachments,
+ onDownloadFile,
+ onDeleteFile, // ✅ 삭제 함수 prop 추가
+}: {
attachments: AttachmentInfo[]
onDownloadFile: (attachment: AttachmentInfo) => void
+ onDeleteFile: (attachment: AttachmentInfo) => Promise // ✅ 삭제 함수 추가
}) {
const { selectedRevisionId, allData, setAllData } = React.useContext(DocumentSelectionContext)
- const [addAttachmentDialogOpen, setAddAttachmentDialogOpen] = React.useState(false) // ✅ 추가
- const router = useRouter() // ✅ 추가
+ const [addAttachmentDialogOpen, setAddAttachmentDialogOpen] = React.useState(false)
+ const [deletingFileId, setDeletingFileId] = React.useState(null) // ✅ 삭제 중인 파일 ID
+ const router = useRouter()
- // ✅ 선택된 리비전 정보 가져오기
+ // 선택된 리비전 정보 가져오기
const selectedRevisionInfo = React.useMemo(() => {
if (!selectedRevisionId || !allData) return null
-
+
for (const doc of allData) {
if (doc.allStages) {
for (const stage of doc.allStages as StageInfo[]) {
@@ -321,14 +410,43 @@ function AttachmentTable({
return null
}, [selectedRevisionId, allData])
- // ✅ 첨부파일 추가 핸들러
+ // 첨부파일 추가 핸들러
const handleAddAttachment = React.useCallback(() => {
if (selectedRevisionInfo) {
setAddAttachmentDialogOpen(true)
}
}, [selectedRevisionInfo])
- // ✅ 첨부파일 업로드 성공 핸들러
+ // ✅ 삭제 가능 여부 확인 함수
+ const canDeleteFile = React.useCallback((attachment: AttachmentInfo) => {
+ return !attachment.dolceFilePath || attachment.dolceFilePath.trim() === ''
+ }, [])
+
+ // ✅ 파일 삭제 핸들러
+ const handleDeleteFile = React.useCallback(async (attachment: AttachmentInfo) => {
+ if (!canDeleteFile(attachment)) {
+ alert('This file cannot be deleted because it has been processed by the system.')
+ return
+ }
+
+ const confirmDelete = window.confirm(
+ `Are you sure you want to delete "${attachment.fileName}"?\nThis action cannot be undone.`
+ )
+
+ if (!confirmDelete) return
+
+ try {
+ setDeletingFileId(attachment.id)
+ await onDeleteFile(attachment)
+ } catch (error) {
+ console.error('Delete file error:', error)
+ alert(`Failed to delete file: ${error instanceof Error ? error.message : 'Unknown error'}`)
+ } finally {
+ setDeletingFileId(null)
+ }
+ }, [canDeleteFile, onDeleteFile])
+
+ // 첨부파일 업로드 성공 핸들러
const handleAttachmentUploadSuccess = React.useCallback((uploadResult?: any) => {
if (!selectedRevisionId || !allData || !uploadResult?.data) {
console.log('🔄 Full refresh')
@@ -343,6 +461,7 @@ function AttachmentTable({
revisionId: selectedRevisionId,
fileName: file.fileName,
filePath: file.filePath,
+ dolceFilePath: null, // ✅ 새 파일은 dolceFilePath가 없음
fileSize: file.fileSize,
fileType: file.fileType || null,
createdAt: new Date(),
@@ -352,10 +471,10 @@ function AttachmentTable({
// allData에서 해당 리비전을 찾아서 첨부파일 추가
const updatedData = allData.map(doc => {
const updatedDoc = { ...doc }
-
+
if (updatedDoc.allStages) {
const stages = [...updatedDoc.allStages as StageInfo[]]
-
+
for (const stage of stages) {
const revisionIndex = stage.revisions.findIndex(r => r.id === selectedRevisionId)
if (revisionIndex !== -1) {
@@ -369,7 +488,7 @@ function AttachmentTable({
}
}
}
-
+
return updatedDoc
})
@@ -393,7 +512,7 @@ function AttachmentTable({
Attachments
- {/* ✅ + 버튼 추가 */}
+ {/* + 버튼 */}
{selectedRevisionId && selectedRevisionInfo && (
-
+
File Name
@@ -426,7 +545,7 @@ function AttachmentTable({
? 'Please select a revision'
: 'No attached files'}
- {/* ✅ 리비전이 선택된 경우 추가 버튼 표시 */}
+ {/* 리비전이 선택된 경우 추가 버튼 표시 */}
{selectedRevisionId && selectedRevisionInfo && (
+ {/* ✅ dolceFilePath 상태 표시 */}
+ {file.dolceFilePath && file.dolceFilePath.trim() !== '' && (
+
+ Processed
+
+ )}
- onDownloadFile(file)}
- className="h-8 px-2"
- >
-
-
+
+ {/* 다운로드 버튼 */}
+ onDownloadFile(file)}
+ className="h-8 px-2"
+ title="Download file"
+ >
+
+
+
+ {/* ✅ 삭제 버튼 */}
+ handleDeleteFile(file)}
+ className={`h-8 px-2 ${
+ canDeleteFile(file)
+ ? 'text-red-600 hover:text-red-700 hover:bg-red-50'
+ : 'text-gray-400 cursor-not-allowed'
+ }`}
+ disabled={!canDeleteFile(file) || deletingFileId === file.id}
+ title={
+ canDeleteFile(file)
+ ? 'Delete file'
+ : 'Cannot delete processed file'
+ }
+ >
+ {deletingFileId === file.id ? (
+
+ ) : (
+
+ )}
+
+
))
@@ -476,7 +629,7 @@ function AttachmentTable({
- {/* ✅ AddAttachmentDialog 추가 */}
+ {/* AddAttachmentDialog */}
{selectedRevisionInfo && (
(null)
const handleNewRevision = React.useCallback(() => {
setNewRevisionDialogOpen(true)
}, [])
+ // ✅ 리비전 수정 핸들러
+ const handleEditRevision = React.useCallback((revision: RevisionInfo) => {
+ setEditingRevision(revision)
+ setEditRevisionDialogOpen(true)
+ }, [])
+
+ // ✅ 리비전 수정 성공 핸들러
+ const handleRevisionEditSuccess = React.useCallback((action: 'update' | 'delete', result?: any) => {
+ if (!allData || !editingRevision) {
+ // fallback: 전체 새로고침
+ setTimeout(() => router.refresh(), 500)
+ return
+ }
+
+ try {
+ if (action === 'delete') {
+ // 리비전 삭제: allData에서 해당 리비전 제거
+ const updatedData = allData.map(doc => {
+ const updatedDoc = { ...doc }
+
+ if (updatedDoc.allStages) {
+ const stages = [...updatedDoc.allStages as StageInfo[]]
+
+ for (const stage of stages) {
+ const revisionIndex = stage.revisions.findIndex(r => r.id === editingRevision.id)
+ if (revisionIndex !== -1) {
+ // 해당 리비전 제거
+ stage.revisions.splice(revisionIndex, 1)
+ updatedDoc.allStages = stages
+ break
+ }
+ }
+ }
+
+ return updatedDoc
+ })
+
+ setAllData(updatedData)
+
+ // 삭제된 리비전이 선택되어 있었으면 선택 해제
+ if (selectedRevisionId === editingRevision.id) {
+ setSelectedRevisionId(null)
+ }
+
+ console.log('✅ Revision deleted and state updated')
+
+ } else if (action === 'update') {
+ // 리비전 업데이트: allData에서 해당 리비전 정보 수정
+ const updatedData = allData.map(doc => {
+ const updatedDoc = { ...doc }
+
+ if (updatedDoc.allStages) {
+ const stages = [...updatedDoc.allStages as StageInfo[]]
+
+ for (const stage of stages) {
+ const revisionIndex = stage.revisions.findIndex(r => r.id === editingRevision.id)
+ if (revisionIndex !== -1) {
+ // 해당 리비전 업데이트
+ stage.revisions[revisionIndex] = {
+ ...stage.revisions[revisionIndex],
+ comment: result?.updatedRevision?.comment || stage.revisions[revisionIndex].comment,
+ usage: result?.updatedRevision?.usage || stage.revisions[revisionIndex].usage,
+ usageType: result?.updatedRevision?.usageType || stage.revisions[revisionIndex].usageType,
+ updatedAt: new Date(),
+ }
+ updatedDoc.allStages = stages
+ break
+ }
+ }
+ }
+
+ return updatedDoc
+ })
+
+ setAllData(updatedData)
+ console.log('✅ Revision updated and state updated')
+ }
+
+ // 약간의 지연 후 서버 데이터 새로고침
+ setTimeout(() => {
+ router.refresh()
+ }, 1000)
+
+ } catch (error) {
+ console.error('❌ Revision edit state update failed:', error)
+ // 실패 시 전체 새로고침
+ setTimeout(() => router.refresh(), 500)
+ }
+ }, [allData, editingRevision, setAllData, selectedRevisionId, setSelectedRevisionId, router])
+
+ // 파일 삭제 함수
+ const handleDeleteFile = React.useCallback(async (attachment: AttachmentInfo) => {
+ try {
+ const response = await fetch(`/api/attachment-delete`, {
+ method: 'DELETE',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({
+ attachmentId: attachment.id,
+ revisionId: attachment.revisionId,
+ }),
+ })
+
+ if (!response.ok) {
+ const errorData = await response.json()
+ throw new Error(errorData.error || 'Failed to delete file.')
+ }
+
+ // 성공시 로컬 상태 업데이트
+ if (allData && selectedRevisionId) {
+ const updatedData = allData.map(doc => {
+ const updatedDoc = { ...doc }
+
+ if (updatedDoc.allStages) {
+ const stages = [...updatedDoc.allStages as StageInfo[]]
+
+ for (const stage of stages) {
+ const revisionIndex = stage.revisions.findIndex(r => r.id === selectedRevisionId)
+ if (revisionIndex !== -1) {
+ // 해당 리비전에서 첨부파일 제거
+ stage.revisions[revisionIndex] = {
+ ...stage.revisions[revisionIndex],
+ attachments: stage.revisions[revisionIndex].attachments.filter(
+ att => att.id !== attachment.id
+ )
+ }
+ updatedDoc.allStages = stages
+ break
+ }
+ }
+ }
+
+ return updatedDoc
+ })
+
+ setAllData(updatedData)
+ console.log('✅ File deleted and state updated')
+ }
+
+ // 약간의 지연 후 서버 데이터 새로고침
+ setTimeout(() => {
+ router.refresh()
+ }, 1000)
+
+ } catch (error) {
+ console.error('Delete file error:', error)
+ throw error // AttachmentTable에서 에러 핸들링
+ }
+ }, [allData, selectedRevisionId, setAllData, router])
+
const handleRevisionUploadSuccess = React.useCallback(async (uploadResult?: any) => {
if (!selectedDocumentId || !allData || !uploadResult?.data) {
// fallback: 전체 새로고침
@@ -530,7 +836,7 @@ function SubTables() {
uploaderType: "vendor",
uploaderId: null,
uploaderName: uploadResult.data.uploaderName || null,
- comment: uploadResult.data.comment || null, // ✅ comment도 포함
+ comment: uploadResult.data.comment || null,
usage: uploadResult.data.usage,
usageType: uploadResult.data.usageType || null,
revisionStatus: "UPLOADED",
@@ -550,6 +856,7 @@ function SubTables() {
revisionId: uploadResult.data.revisionId,
fileName: file.fileName,
filePath: file.filePath,
+ dolceFilePath: null,
fileSize: file.fileSize,
fileType: file.fileType || null,
createdAt: new Date(),
@@ -561,26 +868,26 @@ function SubTables() {
const updatedData = allData.map(doc => {
if (doc.documentId === selectedDocumentId) {
const updatedDoc = { ...doc }
-
+
// allStages가 있으면 해당 stage에 새 revision 추가
if (updatedDoc.allStages) {
- const stages = [...updatedDoc.allStages as StageInfo[]] // ✅ 배열 복사
- const targetStage = stages.find(stage =>
- stage.stageName === uploadResult.data.stage ||
+ const stages = [...updatedDoc.allStages as StageInfo[]]
+ const targetStage = stages.find(stage =>
+ stage.stageName === uploadResult.data.stage ||
stage.stageName === uploadResult.data.usage
)
-
+
if (targetStage) {
// 기존 revision과 중복 체크 (같은 revision, usage, usageType)
- const isDuplicate = targetStage.revisions.some(rev =>
+ const isDuplicate = targetStage.revisions.some(rev =>
rev.revision === newRevision.revision &&
rev.usage === newRevision.usage &&
rev.usageType === newRevision.usageType
)
-
+
if (!isDuplicate) {
targetStage.revisions = [newRevision, ...targetStage.revisions]
- updatedDoc.allStages = stages // ✅ 업데이트된 stages 할당
+ updatedDoc.allStages = stages
}
} else {
// 첫 번째 stage에 추가 (fallback)
@@ -590,7 +897,7 @@ function SubTables() {
}
}
}
-
+
return updatedDoc
}
return doc
@@ -598,9 +905,9 @@ function SubTables() {
// State 업데이트
setAllData(updatedData)
-
+
console.log('✅ RevisionTable data update complete')
-
+
} catch (error) {
console.error('❌ RevisionTable update failed:', error)
// 실패 시 전체 새로고침
@@ -611,7 +918,7 @@ function SubTables() {
router.refresh() // 서버 컴포넌트 재렌더링으로 최신 데이터 가져오기
}, 1500) // 1.5초 후 새로고침 (사용자가 업데이트를 확인할 시간)
- }, [selectedDocumentId, allData, setAllData])
+ }, [selectedDocumentId, allData, setAllData, router])
const selectedDocument = React.useMemo(() => {
if (!selectedDocumentId || !allData) return null
@@ -738,7 +1045,7 @@ function SubTables() {
}
setTimeout(() => cleanupHtmlStyle(), 500)
}
- }, [viewerOpen, cleanupHtmlStyle])
+ }, [viewerOpen, cleanupHtmlStyle, instance])
// 문서 로드
React.useEffect(() => {
@@ -803,14 +1110,16 @@ function SubTables() {
return (
<>
@@ -847,6 +1156,14 @@ function SubTables() {
drawingKind={selectedDocument.drawingKind || 'B4'}
onSuccess={handleRevisionUploadSuccess}
/>
+
+ {/* ✅ 리비전 수정 다이얼로그 */}
+
>
)
}
@@ -970,15 +1287,15 @@ export function UserVendorDocumentDisplay({
return (
-
-
-
-
-
+
+
+
+
+
diff --git a/components/signup/join-form.tsx b/components/signup/join-form.tsx
index c94d435e..2dcde518 100644
--- a/components/signup/join-form.tsx
+++ b/components/signup/join-form.tsx
@@ -386,7 +386,7 @@ export default function JoinForm() {
address: "",
email: "",
phone: "",
- country: "KR", // 기본값을 한국으로 설정
+ country: "", // 기본값을 빈 문자열로 설정하여 계정 데이터에서 가져오도록 함
website: "",
representativeName: "",
representativeBirth: "",
@@ -545,7 +545,11 @@ export default function JoinForm() {
{currentStep === 3 && (
setCurrentStep(2)}
onComplete={() => {
@@ -897,7 +901,7 @@ function CompleteVendorForm({
if (data.country !== "KR") {
bankAccountFiles.forEach(file => {
- formData.append('bankAccount', file);
+ formData.append('bankAccountCopy', file);
});
}
@@ -1009,7 +1013,7 @@ function CompleteVendorForm({
disabled={isSubmitting}
/>
- {data.country === "KR"
+ {(data.country || accountData.country) === "KR"
? "사업자 등록증에 표기된 정확한 회사명을 입력하세요."
: "해외 업체의 경우 영문 회사명을 입력하세요."}
diff --git a/components/vendor-data/vendor-data-container copy.tsx b/components/vendor-data/vendor-data-container copy.tsx
new file mode 100644
index 00000000..5b4967b5
--- /dev/null
+++ b/components/vendor-data/vendor-data-container copy.tsx
@@ -0,0 +1,464 @@
+"use client"
+
+import * as React from "react"
+import { TooltipProvider } from "@/components/ui/tooltip"
+import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable"
+import { cn } from "@/lib/utils"
+import { ProjectSwitcher } from "./project-swicher"
+import { Sidebar } from "./sidebar"
+import { usePathname, useRouter, useSearchParams, useParams } from "next/navigation"
+import { getFormsByContractItemId, type FormInfo } from "@/lib/forms/services"
+import { Separator } from "@/components/ui/separator"
+import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs"
+import { ScrollArea } from "@/components/ui/scroll-area"
+import { Button } from "@/components/ui/button"
+import { FormInput } from "lucide-react"
+import { Skeleton } from "@/components/ui/skeleton"
+import { selectedModeAtom } from '@/atoms'
+import { useAtom } from 'jotai'
+
+interface PackageData {
+ itemId: number
+ itemName: string
+}
+
+interface ContractData {
+ contractId: number
+ contractName: string
+ packages: PackageData[]
+}
+
+interface ProjectData {
+ projectId: number
+ projectCode: string
+ projectName: string
+ projectType: string
+ contracts: ContractData[]
+}
+
+interface VendorDataContainerProps {
+ projects: ProjectData[]
+ defaultLayout?: number[]
+ defaultCollapsed?: boolean
+ navCollapsedSize: number
+ children: React.ReactNode
+}
+
+function getTagIdFromPathname(path: string | null): number | null {
+ if (!path) return null;
+
+ // 태그 패턴 검사 (/tag/123)
+ const tagMatch = path.match(/\/tag\/(\d+)/)
+ if (tagMatch) return parseInt(tagMatch[1], 10)
+
+ // 폼 패턴 검사 (/form/123/...)
+ const formMatch = path.match(/\/form\/(\d+)/)
+ if (formMatch) return parseInt(formMatch[1], 10)
+
+ return null
+}
+
+export function VendorDataContainer({
+ projects,
+ defaultLayout = [20, 80],
+ defaultCollapsed = false,
+ navCollapsedSize,
+ children
+}: VendorDataContainerProps) {
+ const pathname = usePathname()
+ const router = useRouter()
+ const searchParams = useSearchParams()
+ const params = useParams()
+ const currentLng = params?.lng as string || 'en'
+
+ const tagIdNumber = getTagIdFromPathname(pathname)
+
+ // 기본 상태
+ const [selectedProjectId, setSelectedProjectId] = React.useState(projects[0]?.projectId || 0)
+ const [isCollapsed, setIsCollapsed] = React.useState(defaultCollapsed)
+ const [selectedContractId, setSelectedContractId] = React.useState(
+ projects[0]?.contracts[0]?.contractId || 0
+ )
+ const [selectedPackageId, setSelectedPackageId] = React.useState(null)
+ const [formList, setFormList] = React.useState([])
+ const [selectedFormCode, setSelectedFormCode] = React.useState(null)
+ const [isLoadingForms, setIsLoadingForms] = React.useState(false)
+
+ // 현재 선택된 프로젝트/계약/패키지
+ const currentProject = projects.find((p) => p.projectId === selectedProjectId) ?? projects[0]
+ const currentContract = currentProject?.contracts.find((c) => c.contractId === selectedContractId)
+ ?? currentProject?.contracts[0]
+
+ // 프로젝트 타입 확인 - ship인 경우 항상 ENG 모드
+ const isShipProject = currentProject?.projectType === "ship"
+
+ const [selectedMode, setSelectedMode] = useAtom(selectedModeAtom)
+
+ // URL에서 모드 추출 (ship 프로젝트면 무조건 ENG로, 아니면 URL 또는 기본값)
+ const modeFromUrl = searchParams?.get('mode')
+ const initialMode = isShipProject
+ ? "ENG"
+ : (modeFromUrl === "ENG" || modeFromUrl === "IM") ? modeFromUrl : "IM"
+
+ // 모드 초기화 (기존의 useState 초기값 대신)
+ React.useEffect(() => {
+ setSelectedMode(initialMode as "IM" | "ENG")
+ }, [initialMode, setSelectedMode])
+
+ const isTagOrFormRoute = pathname ? (pathname.includes("/tag/") || pathname.includes("/form/")) : false
+ const currentPackageName = isTagOrFormRoute
+ ? currentContract?.packages.find((pkg) => pkg.itemId === selectedPackageId)?.itemName || "None"
+ : "None"
+
+ // 폼 목록에서 고유한 폼 이름만 추출
+ const formNames = React.useMemo(() => {
+ return [...new Set(formList.map((form) => form.formName))]
+ }, [formList])
+
+ // URL에서 현재 폼 코드 추출
+ const getCurrentFormCode = (path: string): string | null => {
+ const segments = path.split("/").filter(Boolean)
+ const formIndex = segments.indexOf("form")
+ if (formIndex !== -1 && segments[formIndex + 2]) {
+ return segments[formIndex + 2]
+ }
+ return null
+ }
+
+ const currentFormCode = React.useMemo(() => {
+ return pathname ? getCurrentFormCode(pathname) : null
+ }, [pathname])
+
+ const createUrlWithLng = (path: string, queryParams?: Record) => {
+ // 기본 경로에 언어 파라미터 포함
+ const basePath = `/${currentLng}${path.startsWith('/') ? path : '/' + path}`
+
+ if (queryParams) {
+ const searchParams = new URLSearchParams(queryParams)
+ return `${basePath}?${searchParams.toString()}`
+ }
+
+ return basePath
+ }
+
+ // URL에서 모드가 변경되면 상태도 업데이트 (ship 프로젝트가 아닐 때만)
+ React.useEffect(() => {
+ if (!isShipProject) {
+ const modeFromUrl = searchParams?.get('mode')
+ if (modeFromUrl === "ENG" || modeFromUrl === "IM") {
+ setSelectedMode(modeFromUrl)
+ }
+ }
+ }, [searchParams, isShipProject])
+
+ // 프로젝트 타입이 변경될 때 모드 업데이트
+ React.useEffect(() => {
+ if (isShipProject) {
+ setSelectedMode("ENG")
+
+ // URL 모드 파라미터도 업데이트
+ const url = new URL(window.location.href);
+ url.searchParams.set('mode', 'ENG');
+ router.replace(url.pathname + url.search);
+ }
+ }, [isShipProject, router])
+
+ // (1) 새로고침 시 URL 파라미터(tagIdNumber) → selectedPackageId 세팅
+ React.useEffect(() => {
+ if (!currentContract) return
+
+ if (tagIdNumber) {
+ setSelectedPackageId(tagIdNumber)
+ } else {
+ // tagIdNumber가 없으면, 현재 계약의 첫 번째 패키지로
+ if (currentContract.packages?.length) {
+ setSelectedPackageId(currentContract.packages[0].itemId)
+ } else {
+ setSelectedPackageId(null)
+ }
+ }
+ }, [tagIdNumber, currentContract])
+
+ // (2) 프로젝트 변경 시 계약 초기화
+ React.useEffect(() => {
+ if (currentProject?.contracts.length) {
+ setSelectedContractId(currentProject.contracts[0].contractId)
+ } else {
+ setSelectedContractId(0)
+ }
+ }, [currentProject])
+
+ // (3) 패키지 ID와 모드가 변경될 때마다 폼 로딩
+ React.useEffect(() => {
+ const packageId = getTagIdFromPathname(pathname)
+
+ if (packageId) {
+ setSelectedPackageId(packageId)
+
+ // URL에서 패키지 ID를 얻었을 때 즉시 폼 로드
+ loadFormsList(packageId, selectedMode);
+ } else if (currentContract?.packages?.length) {
+ const firstPackageId = currentContract.packages[0].itemId;
+ setSelectedPackageId(firstPackageId);
+ loadFormsList(firstPackageId, selectedMode);
+ }
+ }, [pathname, currentContract, selectedMode])
+
+ // 모드에 따른 폼 로드 함수
+ const loadFormsList = async (packageId: number, mode: "IM" | "ENG") => {
+ if (!packageId) return;
+
+ setIsLoadingForms(true);
+ try {
+ const result = await getFormsByContractItemId(packageId, mode);
+ setFormList(result.forms || []);
+ } catch (error) {
+ console.error(`폼 로딩 오류 (${mode} 모드):`, error);
+ setFormList([]);
+ } finally {
+ setIsLoadingForms(false);
+ }
+ };
+
+ // 핸들러들
+ function handleSelectContract(projId: number, cId: number) {
+ setSelectedProjectId(projId)
+ setSelectedContractId(cId)
+ }
+
+ function handleSelectPackage(itemId: number) {
+ setSelectedPackageId(itemId)
+ }
+
+ function handleSelectForm(formName: string) {
+ const form = formList.find((f) => f.formName === formName)
+ if (form) {
+ setSelectedFormCode(form.formCode)
+ }
+ }
+
+ // 모드 변경 핸들러
+// 모드 변경 핸들러
+const handleModeChange = async (mode: "IM" | "ENG") => {
+ // ship 프로젝트인 경우 모드 변경 금지
+ if (isShipProject && mode !== "ENG") return;
+
+ setSelectedMode(mode);
+
+ // 모드가 변경될 때 자동 네비게이션
+ if (currentContract?.packages?.length) {
+ const firstPackageId = currentContract.packages[0].itemId;
+
+ if (mode === "IM") {
+ // IM 모드: 첫 번째 패키지로 이동
+ const baseSegments = pathname?.split("/").filter(Boolean).slice(0, pathname.split("/").filter(Boolean).indexOf("vendor-data") + 1).join("/");
+ router.push(`/${baseSegments}/tag/${firstPackageId}?mode=${mode}`);
+ } else {
+ // ENG 모드: 폼 목록을 먼저 로드
+ setIsLoadingForms(true);
+ try {
+ const result = await getFormsByContractItemId(firstPackageId, mode);
+ setFormList(result.forms || []);
+
+ // 폼이 있으면 첫 번째 폼으로 이동
+ if (result.forms && result.forms.length > 0) {
+ const firstForm = result.forms[0];
+ setSelectedFormCode(firstForm.formCode);
+
+ const baseSegments = pathname?.split("/").filter(Boolean).slice(0, pathname.split("/").filter(Boolean).indexOf("vendor-data") + 1).join("/");
+ router.push(`/${baseSegments}/form/0/${firstForm.formCode}/${selectedProjectId}/${selectedContractId}?mode=${mode}`);
+ } else {
+ // 폼이 없으면 모드만 변경
+ const baseSegments = pathname?.split("/").filter(Boolean).slice(0, pathname.split("/").filter(Boolean).indexOf("vendor-data") + 1).join("/");
+ router.push(`/${baseSegments}/form/0/0/${selectedProjectId}/${selectedContractId}?mode=${mode}`);
+ }
+ } catch (error) {
+ console.error(`폼 로딩 오류 (${mode} 모드):`, error);
+ // 오류 발생 시 모드만 변경
+ const url = new URL(window.location.href);
+ url.searchParams.set('mode', mode);
+ router.replace(url.pathname + url.search);
+ } finally {
+ setIsLoadingForms(false);
+ }
+ }
+ } else {
+ // 패키지가 없는 경우, 모드만 변경
+ const url = new URL(window.location.href);
+ url.searchParams.set('mode', mode);
+ router.replace(url.pathname + url.search);
+ }
+};
+
+ return (
+
+
+ setIsCollapsed(true)}
+ onResize={() => setIsCollapsed(false)}
+ className={cn(isCollapsed && "min-w-[50px] transition-all duration-300 ease-in-out")}
+ >
+
+
+
+ {!isCollapsed ? (
+ isShipProject ? (
+ // 프로젝트 타입이 ship인 경우: 탭 없이 ENG 모드 사이드바만 바로 표시
+
+ f.formCode === selectedFormCode)?.formName || null
+ : null
+ }
+ onSelectForm={handleSelectForm}
+ isLoadingForms={isLoadingForms}
+ mode="ENG"
+ className="hidden lg:block"
+ />
+
+ ) : (
+ // 프로젝트 타입이 ship이 아닌 경우: 기존 탭 UI 표시
+ handleModeChange(value as "IM" | "ENG")}
+ className="w-full"
+ >
+
+ H/O
+ ENG
+
+
+
+ f.formCode === selectedFormCode)?.formName || null
+ : null
+ }
+ onSelectForm={handleSelectForm}
+ isLoadingForms={isLoadingForms}
+ mode="IM"
+ className="hidden lg:block"
+ />
+
+
+
+ f.formCode === selectedFormCode)?.formName || null
+ : null
+ }
+ onSelectForm={handleSelectForm}
+ isLoadingForms={isLoadingForms}
+ mode="ENG"
+ className="hidden lg:block"
+ />
+
+
+ )
+ ) : (
+ // 접혀있을 때 UI
+ <>
+ {!isShipProject && (
+ // ship 프로젝트가 아닐 때만 모드 선택 버튼 표시
+
+ handleModeChange("IM")}
+ >
+ H/O
+
+ handleModeChange("ENG")}
+ >
+ ENG
+
+
+ )}
+
+ f.formCode === selectedFormCode)?.formName || null
+ : null
+ }
+ onSelectForm={handleSelectForm}
+ isLoadingForms={isLoadingForms}
+ mode={isShipProject ? "ENG" : selectedMode}
+ className="hidden lg:block"
+ />
+ >
+ )}
+
+
+
+
+
+
+
+
+ {isShipProject || selectedMode === "ENG"
+ ? "Engineering Mode"
+ : `Package: ${currentPackageName}`}
+
+
+ {children}
+
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/components/vendor-data/vendor-data-container.tsx b/components/vendor-data/vendor-data-container.tsx
index 47397c72..a549594c 100644
--- a/components/vendor-data/vendor-data-container.tsx
+++ b/components/vendor-data/vendor-data-container.tsx
@@ -6,7 +6,7 @@ import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/componen
import { cn } from "@/lib/utils"
import { ProjectSwitcher } from "./project-swicher"
import { Sidebar } from "./sidebar"
-import { usePathname, useRouter, useSearchParams } from "next/navigation"
+import { usePathname, useRouter, useSearchParams, useParams } from "next/navigation"
import { getFormsByContractItemId, type FormInfo } from "@/lib/forms/services"
import { Separator } from "@/components/ui/separator"
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs"
@@ -68,6 +68,8 @@ export function VendorDataContainer({
const pathname = usePathname()
const router = useRouter()
const searchParams = useSearchParams()
+ const params = useParams()
+ const currentLng = params?.lng as string || 'en'
const tagIdNumber = getTagIdFromPathname(pathname)
@@ -127,6 +129,7 @@ export function VendorDataContainer({
return pathname ? getCurrentFormCode(pathname) : null
}, [pathname])
+
// URL에서 모드가 변경되면 상태도 업데이트 (ship 프로젝트가 아닐 때만)
React.useEffect(() => {
if (!isShipProject) {
@@ -238,7 +241,7 @@ const handleModeChange = async (mode: "IM" | "ENG") => {
if (mode === "IM") {
// IM 모드: 첫 번째 패키지로 이동
const baseSegments = pathname?.split("/").filter(Boolean).slice(0, pathname.split("/").filter(Boolean).indexOf("vendor-data") + 1).join("/");
- router.push(`/${baseSegments}/tag/${firstPackageId}?mode=${mode}`);
+ router.push(`/${currentLng}/${baseSegments}/tag/${firstPackageId}?mode=${mode}`);
} else {
// ENG 모드: 폼 목록을 먼저 로드
setIsLoadingForms(true);
@@ -252,11 +255,11 @@ const handleModeChange = async (mode: "IM" | "ENG") => {
setSelectedFormCode(firstForm.formCode);
const baseSegments = pathname?.split("/").filter(Boolean).slice(0, pathname.split("/").filter(Boolean).indexOf("vendor-data") + 1).join("/");
- router.push(`/${baseSegments}/form/0/${firstForm.formCode}/${selectedProjectId}/${selectedContractId}?mode=${mode}`);
+ router.push(`/${currentLng}/${baseSegments}/form/0/${firstForm.formCode}/${selectedProjectId}/${selectedContractId}?mode=${mode}`);
} else {
// 폼이 없으면 모드만 변경
const baseSegments = pathname?.split("/").filter(Boolean).slice(0, pathname.split("/").filter(Boolean).indexOf("vendor-data") + 1).join("/");
- router.push(`/${baseSegments}/form/0/0/${selectedProjectId}/${selectedContractId}?mode=${mode}`);
+ router.push(`/${currentLng}/${baseSegments}/form/0/0/${selectedProjectId}/${selectedContractId}?mode=${mode}`);
}
} catch (error) {
console.error(`폼 로딩 오류 (${mode} 모드):`, error);
diff --git a/components/vendor-regular-registrations/document-status-dialog.tsx b/components/vendor-regular-registrations/document-status-dialog.tsx
index f8e2e1cd..db3defe6 100644
--- a/components/vendor-regular-registrations/document-status-dialog.tsx
+++ b/components/vendor-regular-registrations/document-status-dialog.tsx
@@ -8,13 +8,12 @@ import {
} from "@/components/ui/dialog";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
-import { FileText, Download, CheckCircle, XCircle, Clock } from "lucide-react";
+import { FileText, Download, CheckCircle, XCircle, Clock, RefreshCw } from "lucide-react";
import { toast } from "sonner";
import type { VendorRegularRegistration } from "@/config/vendorRegularRegistrationsColumnsConfig";
import {
documentStatusColumns,
- contractAgreementColumns,
} from "@/config/vendorRegularRegistrationsColumnsConfig";
import { downloadFile } from "@/lib/file-download";
@@ -22,6 +21,7 @@ interface DocumentStatusDialogProps {
open: boolean;
onOpenChange: (open: boolean) => void;
registration: VendorRegularRegistration | null;
+ onRefresh?: () => void;
}
const StatusIcon = ({ status }: { status: string | boolean }) => {
@@ -68,63 +68,87 @@ export function DocumentStatusDialog({
open,
onOpenChange,
registration,
+ onRefresh,
}: DocumentStatusDialogProps) {
if (!registration) return null;
+ // 디버깅: registration 데이터 확인
+ console.log(`📋 DocumentStatusDialog - Partners 등록 데이터:`, {
+ companyName: registration.companyName,
+ businessNumber: registration.businessNumber,
+ representative: registration.representative,
+ safetyQualificationContent: registration.safetyQualificationContent,
+ basicContractsLength: registration.basicContracts?.length || 0,
+ additionalInfo: registration.additionalInfo
+ });
+
// 파일 다운로드 핸들러
- const handleFileDownload = async (docKey: string, fileIndex: number = 0) => {
- try {
- const files = registration.documentFiles[docKey as keyof typeof registration.documentFiles];
- if (!files || files.length === 0) {
- toast.error("다운로드할 파일이 없습니다.");
- return;
- }
+ // const handleFileDownload = async (docKey: string, fileIndex: number = 0) => {
+ // try {
+ // const files = registration.documentFiles[docKey as keyof typeof registration.documentFiles];
+ // if (!files || files.length === 0) {
+ // toast.error("다운로드할 파일이 없습니다.");
+ // return;
+ // }
- const file = files[fileIndex];
- if (!file) {
- toast.error("파일을 찾을 수 없습니다.");
- return;
- }
+ // const file = files[fileIndex];
+ // if (!file) {
+ // toast.error("파일을 찾을 수 없습니다.");
+ // return;
+ // }
- // filePath와 fileName 추출
- const filePath = file.filePath || file.path;
- const fileName = file.originalFileName || file.fileName || file.name;
+ // // filePath와 fileName 추출
+ // const filePath = file.filePath || file.path;
+ // const fileName = file.originalFileName || file.fileName || file.name;
- if (!filePath || !fileName) {
- toast.error("파일 정보가 올바르지 않습니다.");
- return;
- }
+ // if (!filePath || !fileName) {
+ // toast.error("파일 정보가 올바르지 않습니다.");
+ // return;
+ // }
- console.log(`📥 파일 다운로드 시작:`, { filePath, fileName, docKey });
+ // console.log(`📥 파일 다운로드 시작:`, { filePath, fileName, docKey });
- // downloadFile 함수를 사용하여 파일 다운로드
- const result = await downloadFile(filePath, fileName, {
- showToast: true,
- onError: (error) => {
- console.error("파일 다운로드 오류:", error);
- toast.error(`파일 다운로드 실패: ${error}`);
- },
- onSuccess: (fileName, fileSize) => {
- console.log(`✅ 파일 다운로드 성공:`, { fileName, fileSize });
- }
- });
+ // // downloadFile 함수를 사용하여 파일 다운로드
+ // const result = await downloadFile(filePath, fileName, {
+ // showToast: true,
+ // onError: (error) => {
+ // console.error("파일 다운로드 오류:", error);
+ // toast.error(`파일 다운로드 실패: ${error}`);
+ // },
+ // onSuccess: (fileName, fileSize) => {
+ // console.log(`✅ 파일 다운로드 성공:`, { fileName, fileSize });
+ // }
+ // });
- if (!result.success) {
- console.error("파일 다운로드 실패:", result.error);
- }
- } catch (error) {
- console.error("파일 다운로드 중 오류 발생:", error);
- toast.error("파일 다운로드 중 오류가 발생했습니다.");
- }
- };
+ // if (!result.success) {
+ // console.error("파일 다운로드 실패:", result.error);
+ // }
+ // } catch (error) {
+ // console.error("파일 다운로드 중 오류 발생:", error);
+ // toast.error("파일 다운로드 중 오류가 발생했습니다.");
+ // }
+ // };
return (
-
-
- 문서/자료 접수 현황 - {registration.companyName}
+
+
+
+ 문서/자료 접수 현황 - {registration.companyName}
+
+ {onRefresh && (
+
+
+ 새로고침
+
+ )}
@@ -160,12 +184,18 @@ export function DocumentStatusDialog({
상태
제출일자
액션
-
+
{documentStatusColumns.map((doc) => {
const isSubmitted = registration.documentSubmissions[
doc.key as keyof typeof registration.documentSubmissions
] as boolean;
+ // 내자인 경우 통장사본은 표시하지 않음
+ const isForeign = registration.country !== 'KR';
+ if (doc.key === 'bankCopy' && !isForeign) {
+ return null;
+ }
+
return (
{doc.label}
+ {doc.key === 'bankCopy' && isForeign && (
+ (외자 필수)
+ )}
@@ -182,7 +215,7 @@ export function DocumentStatusDialog({
{isSubmitted ? "2024.01.01" : "-"}
- {isSubmitted && (
+ {/* {isSubmitted && (
다운로드
- )}
+ )} */}
);
@@ -211,37 +244,63 @@ export function DocumentStatusDialog({
서약일자
액션
- {contractAgreementColumns.map((agreement) => {
- const status = registration.contractAgreements[
- agreement.key as keyof typeof registration.contractAgreements
- ] as string;
-
- return (
-
-
-
- {agreement.label}
-
-
-
-
-
- {status === "completed" ? "2024.01.01" : "-"}
-
-
- {status === "completed" && (
-
-
- 다운로드
-
- )}
+ {!registration.basicContracts || registration.basicContracts.length === 0 ? (
+
+ 요청된 기본계약이 없습니다.
+
+ ) : (
+ registration.basicContracts.map((contract, index) => {
+ const isCompleted = contract.status === "COMPLETED";
+
+ return (
+
+
+
+ {contract.templateName || "템플릿명 없음"}
+
+
+
+
+
+ {isCompleted && contract.createdAt
+ ? new Intl.DateTimeFormat('ko-KR').format(new Date(contract.createdAt))
+ : "-"
+ }
+
+
+ {isCompleted && (
+
+
+ 다운로드
+
+ )}
+
-
- );
- })}
+ );
+ })
+ )}
+
+
+
+ {/* 안전적격성 평가 */}
+
+
안전적격성 평가
+
+
+ {registration.safetyQualificationContent && (
+
+
{registration.safetyQualificationContent}
+
+ )}
diff --git a/components/vendor-regular-registrations/registration-request-dialog.tsx b/components/vendor-regular-registrations/registration-request-dialog.tsx
new file mode 100644
index 00000000..2a79189a
--- /dev/null
+++ b/components/vendor-regular-registrations/registration-request-dialog.tsx
@@ -0,0 +1,691 @@
+"use client";
+
+import { useState, useEffect } from "react";
+import {
+ Dialog,
+ DialogContent,
+ DialogHeader,
+ DialogTitle,
+ DialogFooter,
+} from "@/components/ui/dialog";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+import { Textarea } from "@/components/ui/textarea";
+import { Checkbox } from "@/components/ui/checkbox";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { Badge } from "@/components/ui/badge";
+import { toast } from "sonner";
+import { FileText, Building2, User, Phone, Mail } from "lucide-react";
+
+import type { VendorRegularRegistration } from "@/config/vendorRegularRegistrationsColumnsConfig";
+import { fetchRegistrationRequestData } from "@/lib/vendor-regular-registrations/service";
+
+interface RegistrationRequestDialogProps {
+ open: boolean;
+ onOpenChange: (open: boolean) => void;
+ registration: VendorRegularRegistration | null;
+ onSubmit?: (data: RegistrationRequestData) => void;
+}
+
+export interface RegistrationRequestData {
+ // 업체정보
+ companyNameKor: string;
+ companyNameEng: string;
+ businessNumber: string;
+ corporateNumber: string;
+ majorItems: string;
+ establishmentDate: string;
+
+ // 소재지
+ headOfficeAddress: string;
+ headOfficePhone: string;
+ factoryAddress: string;
+ factoryPhone: string;
+ salesOfficeAddress: string;
+ salesOfficePhone: string;
+
+ // 대표자 정보
+ representativeNameKor: string;
+ representativeNameEng: string;
+ representativeContact: string;
+ representativeBirthDate: string;
+ representativeEmail: string;
+ isWorkingAtCompany: boolean;
+ isInternalPartner: boolean;
+
+ // 대표자 경력
+ representativeCareer: Array<{
+ date: string;
+ content: string;
+ }>;
+
+ // 업무담당자
+ businessContacts: {
+ sales: { name: string; position: string; department: string; responsibility: string; email: string; };
+ design: { name: string; position: string; department: string; responsibility: string; email: string; };
+ delivery: { name: string; position: string; department: string; responsibility: string; email: string; };
+ quality: { name: string; position: string; department: string; responsibility: string; email: string; };
+ taxInvoice: { name: string; position: string; department: string; responsibility: string; email: string; };
+ };
+}
+
+export function RegistrationRequestDialog({
+ open,
+ onOpenChange,
+ registration,
+ onSubmit,
+}: RegistrationRequestDialogProps) {
+ const [loading, setLoading] = useState(false);
+ const [dataLoading, setDataLoading] = useState(false);
+ const [formData, setFormData] = useState({
+ // 업체정보 (기본값 설정)
+ companyNameKor: "",
+ companyNameEng: "",
+ businessNumber: "",
+ corporateNumber: "",
+ majorItems: "",
+ establishmentDate: "",
+
+ // 소재지
+ headOfficeAddress: "",
+ headOfficePhone: "",
+ factoryAddress: "",
+ factoryPhone: "",
+ salesOfficeAddress: "",
+ salesOfficePhone: "",
+
+ // 대표자 정보
+ representativeNameKor: "",
+ representativeNameEng: "",
+ representativeContact: "",
+ representativeBirthDate: "",
+ representativeEmail: "",
+ isWorkingAtCompany: false,
+ isInternalPartner: false,
+
+ // 대표자 경력
+ representativeCareer: [{ date: "", content: "" }],
+
+ // 업무담당자
+ businessContacts: {
+ sales: { name: "", position: "", department: "", responsibility: "", email: "" },
+ design: { name: "", position: "", department: "", responsibility: "", email: "" },
+ delivery: { name: "", position: "", department: "", responsibility: "", email: "" },
+ quality: { name: "", position: "", department: "", responsibility: "", email: "" },
+ taxInvoice: { name: "", position: "", department: "", responsibility: "", email: "" },
+ },
+ });
+
+ // 기존 데이터 로드 및 자동 입력
+ useEffect(() => {
+ if (open && registration?.id) {
+ loadExistingData();
+ }
+ }, [open, registration?.id]);
+
+ const loadExistingData = async () => {
+ if (!registration?.id) return;
+
+ setDataLoading(true);
+ try {
+ const result = await fetchRegistrationRequestData(registration.id);
+ if (result.success && result.data) {
+ const { vendor, businessContacts, additionalInfo } = result.data;
+
+ // 업무담당자 데이터 변환
+ const contactsMap = {
+ sales: { name: "", position: "", department: "", responsibility: "", email: "" },
+ design: { name: "", position: "", department: "", responsibility: "", email: "" },
+ delivery: { name: "", position: "", department: "", responsibility: "", email: "" },
+ quality: { name: "", position: "", department: "", responsibility: "", email: "" },
+ taxInvoice: { name: "", position: "", department: "", responsibility: "", email: "" },
+ };
+
+ console.log("🔍 업무담당자 데이터 매핑:", {
+ businessContacts: businessContacts.map(c => ({
+ contactType: c.contactType,
+ contactName: c.contactName
+ })),
+ contactsMapKeys: Object.keys(contactsMap)
+ });
+
+ businessContacts.forEach(contact => {
+ let mappedType = contact.contactType;
+
+ // DB의 snake_case를 camelCase로 변환
+ if (contact.contactType === 'tax_invoice') {
+ mappedType = 'taxInvoice';
+ }
+
+ if (mappedType in contactsMap) {
+ contactsMap[mappedType as keyof typeof contactsMap] = {
+ name: contact.contactName || "",
+ position: contact.position || "",
+ department: contact.department || "",
+ responsibility: contact.responsibility || "",
+ email: contact.email || "",
+ };
+
+ console.log(`✅ 매핑 성공: ${contact.contactType} -> ${mappedType}`, {
+ name: contact.contactName,
+ position: contact.position
+ });
+ } else {
+ console.warn(`❌ 매핑 실패: ${contact.contactType} -> ${mappedType} not found in contactsMap`);
+ }
+ });
+
+ // 날짜 포맷팅 함수
+ const formatDate = (date: Date | string | null) => {
+ if (!date) return "";
+ try {
+ const d = new Date(date);
+ // Invalid Date 체크
+ if (isNaN(d.getTime())) return "";
+ return d.toISOString().split('T')[0]; // YYYY-MM-DD 형식
+ } catch (error) {
+ console.warn("날짜 포맷팅 오류:", date, error);
+ return "";
+ }
+ };
+
+ // 폼 데이터 업데이트
+ setFormData({
+ // 업체정보
+ companyNameKor: vendor.vendorName || "",
+ companyNameEng: "", // TODO: 영문명이 있다면 추가
+ businessNumber: vendor.taxId || "",
+ corporateNumber: vendor.corporateRegistrationNumber || "",
+ majorItems: registration.majorItems || "",
+ establishmentDate: "", // vendors 테이블에 establishmentDate 필드가 없음
+
+ // 소재지 (vendors 테이블에는 address, phone만 있음)
+ headOfficeAddress: vendor.address || "",
+ headOfficePhone: vendor.phone || "",
+ factoryAddress: "", // vendors 테이블에 공장주소 필드가 없음
+ factoryPhone: "", // vendors 테이블에 공장전화 필드가 없음
+ salesOfficeAddress: "", // vendors 테이블에 영업소주소 필드가 없음
+ salesOfficePhone: "", // vendors 테이블에 영업소전화 필드가 없음
+
+ // 대표자 정보
+ representativeNameKor: vendor.representativeName || "",
+ representativeNameEng: "", // vendors 테이블에 영문명 필드가 없음
+ representativeContact: vendor.representativePhone || "",
+ representativeBirthDate: vendor.representativeBirth || "", // 문자열로 직접 사용
+ representativeEmail: vendor.representativeEmail || "",
+ isWorkingAtCompany: vendor.representativeWorkExpirence || false,
+ isInternalPartner: false, // vendors 테이블에 해당 필드가 없음
+
+ // 대표자 경력 (기본값 유지)
+ representativeCareer: [{ date: "", content: "" }],
+
+ // 업무담당자
+ businessContacts: contactsMap,
+ });
+
+ console.log("✅ 기존 데이터 로드 완료:", {
+ vendor: vendor.vendorName,
+ contactsCount: businessContacts.length,
+ hasAdditionalInfo: !!additionalInfo,
+ vendorData: {
+ representativeBirth: vendor.representativeBirth,
+ representativeBirthType: typeof vendor.representativeBirth,
+ createdAt: vendor.createdAt,
+ createdAtType: typeof vendor.createdAt
+ }
+ });
+
+ } else {
+ toast.error(result.error || "데이터 로드 실패");
+ }
+ } catch (error) {
+ console.error("데이터 로드 오류:", error);
+ toast.error("데이터 로드 중 오류가 발생했습니다.");
+ } finally {
+ setDataLoading(false);
+ }
+ };
+
+ if (!registration) return null;
+
+ const handleInputChange = (field: string, value: any) => {
+ setFormData(prev => ({
+ ...prev,
+ [field]: value
+ }));
+ };
+
+ const handleBusinessContactChange = (type: keyof typeof formData.businessContacts, field: 'name' | 'position' | 'department' | 'responsibility' | 'email', value: string) => {
+ setFormData(prev => ({
+ ...prev,
+ businessContacts: {
+ ...prev.businessContacts,
+ [type]: {
+ ...prev.businessContacts[type],
+ [field]: value
+ }
+ }
+ }));
+ };
+
+ const handleCareerChange = (index: number, field: 'date' | 'content', value: string) => {
+ setFormData(prev => ({
+ ...prev,
+ representativeCareer: prev.representativeCareer.map((career, i) =>
+ i === index ? { ...career, [field]: value } : career
+ )
+ }));
+ };
+
+ const addCareerEntry = () => {
+ setFormData(prev => ({
+ ...prev,
+ representativeCareer: [...prev.representativeCareer, { date: "", content: "" }]
+ }));
+ };
+
+ const removeCareerEntry = (index: number) => {
+ if (formData.representativeCareer.length > 1) {
+ setFormData(prev => ({
+ ...prev,
+ representativeCareer: prev.representativeCareer.filter((_, i) => i !== index)
+ }));
+ }
+ };
+
+ const handleSubmit = async () => {
+ setLoading(true);
+ try {
+ // 필수 필드 검증
+ const requiredFields = [
+ { field: formData.companyNameKor, name: "업체명(국문)" },
+ { field: formData.businessNumber, name: "사업자번호" },
+ { field: formData.representativeNameKor, name: "대표자 성명(국문)" },
+ { field: formData.representativeContact, name: "대표자 연락처" },
+ { field: formData.representativeBirthDate, name: "대표자 생년월일" },
+ { field: formData.representativeEmail, name: "대표자 이메일" },
+ ];
+
+ const missingFields = requiredFields.filter(({ field }) => !field?.trim());
+ if (missingFields.length > 0) {
+ toast.error(`다음 필수 항목을 입력해주세요: ${missingFields.map(f => f.name).join(", ")}`);
+ return;
+ }
+
+ if (onSubmit) {
+ await onSubmit(formData);
+ } else {
+ // TODO: 실제 정규업체 등록 요청 API 호출
+ toast.success("정규업체 등록 요청이 제출되었습니다.");
+ onOpenChange(false);
+ }
+ } catch (error) {
+ console.error("정규업체 등록 요청 오류:", error);
+ toast.error("정규업체 등록 요청 중 오류가 발생했습니다.");
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ return (
+
+
+
+
+
+ 정규업체 등록 요청
+
+
+ 정규업체 등록을 요청할 협력업체 정보 확인 및 누락정보를 입력하세요.
+
+
+
+ {dataLoading ? (
+
+ ) : (
+
+ {/* 신규 협력사 등록 카드 */}
+
+
+
+
+ 신규 협력사 등록 카드
+
+
+
+
+ {/* 업체정보 */}
+
+
+ {/* 소재지 */}
+
+
+ {/* 대표자 정보 */}
+
+
대표자 정보
+
+
+
+
+ handleInputChange('isWorkingAtCompany', checked)}
+ />
+ 당사근무여부 *
+
+
+ handleInputChange('isInternalPartner', checked)}
+ />
+ 사내협력사 *
+
+
+
+
+ {/* 대표자 경력 */}
+
+
대표자 경력
+
+ {formData.representativeCareer.map((career, index) => (
+
+
+ handleCareerChange(index, 'date', e.target.value)}
+ />
+
+
+ handleCareerChange(index, 'content', e.target.value)}
+ />
+
+ {formData.representativeCareer.length > 1 && (
+
removeCareerEntry(index)}
+ >
+ 삭제
+
+ )}
+
+ ))}
+
+ 경력 추가
+
+
+
+
+ {/* 업무담당자 */}
+
+
업무담당자
+
+ {Object.entries(formData.businessContacts).map(([type, contact]) => {
+ const labels = {
+ sales: "영업",
+ design: "설계",
+ delivery: "납기",
+ quality: "품질",
+ taxInvoice: "세금계산서"
+ };
+
+ return (
+
+
{labels[type as keyof typeof labels]} 담당자
+
+
+ 담당자명
+ handleBusinessContactChange(type as keyof typeof formData.businessContacts, 'name', e.target.value)}
+ />
+
+
+ 직급
+ handleBusinessContactChange(type as keyof typeof formData.businessContacts, 'position', e.target.value)}
+ placeholder="예: 부장, 과장"
+ />
+
+
+ 부서
+ handleBusinessContactChange(type as keyof typeof formData.businessContacts, 'department', e.target.value)}
+ placeholder="예: 영업부, 기술부"
+ />
+
+
+ 담당업무
+ handleBusinessContactChange(type as keyof typeof formData.businessContacts, 'responsibility', e.target.value)}
+ placeholder="예: 고객 대응, 품질 관리"
+ />
+
+
+ 이메일
+ handleBusinessContactChange(type as keyof typeof formData.businessContacts, 'email', e.target.value)}
+ placeholder="example@company.com"
+ />
+
+
+
+ );
+ })}
+
+
+
+
+
+
+ )}
+
+
+ onOpenChange(false)}
+ disabled={loading}
+ >
+ 취소
+
+
+ {loading ? "요청 중..." : "등록요청"}
+
+
+
+
+ );
+}
diff --git a/config/vendorRegularRegistrationsColumnsConfig.ts b/config/vendorRegularRegistrationsColumnsConfig.ts
index 933945fc..f9567883 100644
--- a/config/vendorRegularRegistrationsColumnsConfig.ts
+++ b/config/vendorRegularRegistrationsColumnsConfig.ts
@@ -8,6 +8,7 @@ export interface VendorRegularRegistration {
majorItems: string | null;
establishmentDate: string | null;
representative: string | null;
+ country: string | null;
documentSubmissions: {
businessRegistration: boolean;
creditEvaluation: boolean;
@@ -27,9 +28,18 @@ export interface VendorRegularRegistration {
safetyHealth: string;
ethics: string;
domesticCredit: string;
- safetyQualification: string;
};
+ // 안전적격성 평가는 별도 필드로 분리
+ safetyQualificationContent: string | null;
+ gtcSkipped: boolean;
additionalInfo: boolean;
+ // 기본계약 정보 추가
+ basicContracts: Array<{
+ templateId: number | null;
+ templateName: string | null;
+ status: string;
+ createdAt: Date | null;
+ }>;
registrationRequestDate: string | null;
assignedDepartment: string | null;
assignedUser: string | null;
@@ -158,5 +168,4 @@ export const contractAgreementColumns: { key: keyof VendorRegularRegistration["c
{ key: "safetyHealth", label: "안전보건관리" },
{ key: "ethics", label: "윤리규범준수" },
{ key: "domesticCredit", label: "내국신용장" },
- { key: "safetyQualification", label: "안전적격성평가" },
];
diff --git a/db/migrations/0287_busy_darkhawk.sql b/db/migrations/0287_busy_darkhawk.sql
new file mode 100644
index 00000000..c2634f58
--- /dev/null
+++ b/db/migrations/0287_busy_darkhawk.sql
@@ -0,0 +1,3 @@
+ALTER TABLE "change_logs" RENAME COLUMN "project_id" TO "vendor_id";--> statement-breakpoint
+DROP INDEX "idx_change_logs_project_synced";--> statement-breakpoint
+CREATE INDEX "idx_change_logs_vendor_synced" ON "change_logs" USING btree ("vendor_id","is_synced");
\ No newline at end of file
diff --git a/db/migrations/0288_serious_iron_lad.sql b/db/migrations/0288_serious_iron_lad.sql
new file mode 100644
index 00000000..cf51c589
--- /dev/null
+++ b/db/migrations/0288_serious_iron_lad.sql
@@ -0,0 +1,37 @@
+DROP VIEW "public"."sync_status_view";--> statement-breakpoint
+ALTER TABLE "sync_batches" RENAME COLUMN "project_id" TO "vendor_id";--> statement-breakpoint
+DROP INDEX "idx_sync_batches_project_system";--> statement-breakpoint
+CREATE INDEX "idx_sync_batches_project_system" ON "sync_batches" USING btree ("vendor_id","target_system");--> statement-breakpoint
+CREATE VIEW "public"."sync_status_view" AS (
+ WITH change_stats AS (
+ SELECT
+ cl.vendor_id,
+ sc.target_system,
+ COUNT(*) as total_changes,
+ COUNT(CASE WHEN cl.is_synced = false AND cl.sync_attempts < sc.retry_max_attempts THEN 1 END) as pending_changes,
+ COUNT(CASE WHEN cl.is_synced = true THEN 1 END) as synced_changes,
+ COUNT(CASE WHEN cl.sync_attempts >= sc.retry_max_attempts AND cl.is_synced = false THEN 1 END) as failed_changes,
+ MAX(cl.synced_at) as last_sync_at
+ FROM change_logs cl
+ CROSS JOIN sync_configs sc
+ WHERE cl.vendor_id = sc.vendor_id
+ AND (cl.target_systems IS NULL OR cl.target_systems @> to_jsonb(ARRAY[sc.target_system]))
+ GROUP BY cl.vendor_id, sc.target_system
+ )
+ SELECT
+ cs.project_id,
+ cs.target_system,
+ COALESCE(cs.total_changes, 0) as total_changes,
+ COALESCE(cs.pending_changes, 0) as pending_changes,
+ COALESCE(cs.synced_changes, 0) as synced_changes,
+ COALESCE(cs.failed_changes, 0) as failed_changes,
+ cs.last_sync_at,
+ CASE
+ WHEN sc.sync_enabled = true AND sc.last_successful_sync IS NOT NULL
+ THEN sc.last_successful_sync + (sc.sync_interval_minutes || ' minutes')::interval
+ ELSE NULL
+ END as next_sync_at,
+ sc.sync_enabled
+ FROM sync_configs sc
+ LEFT JOIN change_stats cs ON sc.vendor_id = cs.vendor_id AND sc.target_system = cs.target_system
+);
\ No newline at end of file
diff --git a/db/migrations/0289_watery_stryfe.sql b/db/migrations/0289_watery_stryfe.sql
new file mode 100644
index 00000000..1b026749
--- /dev/null
+++ b/db/migrations/0289_watery_stryfe.sql
@@ -0,0 +1,37 @@
+DROP VIEW "public"."sync_status_view";--> statement-breakpoint
+ALTER TABLE "sync_configs" RENAME COLUMN "project_id" TO "vendor_id";--> statement-breakpoint
+DROP INDEX "idx_sync_configs_contract_system";--> statement-breakpoint
+CREATE INDEX "idx_sync_configs_contract_system" ON "sync_configs" USING btree ("vendor_id","target_system");--> statement-breakpoint
+CREATE VIEW "public"."sync_status_view" AS (
+ WITH change_stats AS (
+ SELECT
+ cl.vendor_id,
+ sc.target_system,
+ COUNT(*) as total_changes,
+ COUNT(CASE WHEN cl.is_synced = false AND cl.sync_attempts < sc.retry_max_attempts THEN 1 END) as pending_changes,
+ COUNT(CASE WHEN cl.is_synced = true THEN 1 END) as synced_changes,
+ COUNT(CASE WHEN cl.sync_attempts >= sc.retry_max_attempts AND cl.is_synced = false THEN 1 END) as failed_changes,
+ MAX(cl.synced_at) as last_sync_at
+ FROM change_logs cl
+ CROSS JOIN sync_configs sc
+ WHERE cl.vendor_id = sc.vendor_id
+ AND (cl.target_systems IS NULL OR cl.target_systems @> to_jsonb(ARRAY[sc.target_system]))
+ GROUP BY cl.vendor_id, sc.target_system
+ )
+ SELECT
+ cs.vendor_id,
+ cs.target_system,
+ COALESCE(cs.total_changes, 0) as total_changes,
+ COALESCE(cs.pending_changes, 0) as pending_changes,
+ COALESCE(cs.synced_changes, 0) as synced_changes,
+ COALESCE(cs.failed_changes, 0) as failed_changes,
+ cs.last_sync_at,
+ CASE
+ WHEN sc.sync_enabled = true AND sc.last_successful_sync IS NOT NULL
+ THEN sc.last_successful_sync + (sc.sync_interval_minutes || ' minutes')::interval
+ ELSE NULL
+ END as next_sync_at,
+ sc.sync_enabled
+ FROM sync_configs sc
+ LEFT JOIN change_stats cs ON sc.vendor_id = cs.vendor_id AND sc.target_system = cs.target_system
+);
\ No newline at end of file
diff --git a/db/migrations/0290_conscious_avengers.sql b/db/migrations/0290_conscious_avengers.sql
new file mode 100644
index 00000000..e0e00ed8
--- /dev/null
+++ b/db/migrations/0290_conscious_avengers.sql
@@ -0,0 +1,23 @@
+CREATE SCHEMA "risks";
+--> statement-breakpoint
+CREATE TABLE "risks"."risk_events" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "vendor_id" integer NOT NULL,
+ "provider" varchar(128) NOT NULL,
+ "event_type" varchar(50) NOT NULL,
+ "content" text,
+ "event_status" boolean DEFAULT true NOT NULL,
+ "manager_id" integer,
+ "admin_comment" text,
+ "occurred_at" timestamp DEFAULT now() NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ "updated_at" timestamp DEFAULT now() NOT NULL,
+ "created_by" integer,
+ "updated_by" integer
+);
+--> statement-breakpoint
+ALTER TABLE "risks"."risk_events" ADD CONSTRAINT "risk_events_vendor_id_vendors_id_fk" FOREIGN KEY ("vendor_id") REFERENCES "public"."vendors"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "risks"."risk_events" ADD CONSTRAINT "risk_events_manager_id_users_id_fk" FOREIGN KEY ("manager_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "risks"."risk_events" ADD CONSTRAINT "risk_events_created_by_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "risks"."risk_events" ADD CONSTRAINT "risk_events_updated_by_users_id_fk" FOREIGN KEY ("updated_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+CREATE VIEW "risks"."risks_view" AS (select "risks"."risk_events"."id", "risks"."risk_events"."event_type", "risks"."risk_events"."vendor_id", "vendors"."vendor_code", "vendors"."vendor_name", "vendors"."tax_id", "risks"."risk_events"."provider", "risks"."risk_events"."content", "risks"."risk_events"."event_status", "risks"."risk_events"."manager_id", "users"."name", "risks"."risk_events"."admin_comment", "risks"."risk_events"."occurred_at" from "risks"."risk_events" left join "vendors" on "vendors"."id" = "risks"."risk_events"."vendor_id" left join "users" on "users"."id" = "risks"."risk_events"."manager_id");
\ No newline at end of file
diff --git a/db/migrations/0291_stiff_big_bertha.sql b/db/migrations/0291_stiff_big_bertha.sql
new file mode 100644
index 00000000..d7327b53
--- /dev/null
+++ b/db/migrations/0291_stiff_big_bertha.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "vendor_regular_registrations" ADD COLUMN "safety_qualification_content" text;--> statement-breakpoint
+ALTER TABLE "vendor_regular_registrations" ADD COLUMN "gtc_skipped" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/db/migrations/0292_aromatic_mandrill.sql b/db/migrations/0292_aromatic_mandrill.sql
new file mode 100644
index 00000000..8effebfa
--- /dev/null
+++ b/db/migrations/0292_aromatic_mandrill.sql
@@ -0,0 +1,231 @@
+DROP VIEW "public"."simplified_documents_view";--> statement-breakpoint
+CREATE VIEW "public"."simplified_documents_view" AS (
+ WITH
+ -- 리비전별 첨부파일 집계
+ revision_attachments AS (
+ SELECT
+ r.id as revision_id,
+ COALESCE(
+ json_agg(
+ json_build_object(
+ 'id', da.id,
+ 'revisionId', da.revision_id,
+ 'fileName', da.file_name,
+ 'filePath', da.file_path,
+ 'fileSize', da.file_size,
+ 'fileType', da.file_type,
+ 'dolceFilePath', da.dolce_file_path,
+ 'createdAt', da.created_at,
+ 'updatedAt', da.updated_at
+ ) ORDER BY da.created_at
+ ) FILTER (WHERE da.id IS NOT NULL),
+ '[]'::json
+ ) as attachments
+ FROM revisions r
+ LEFT JOIN document_attachments da ON r.id = da.revision_id
+ GROUP BY r.id
+ ),
+
+ -- 스테이지별 리비전 집계 (첨부파일 포함)
+ stage_revisions AS (
+ SELECT
+ ist.id as stage_id,
+ COALESCE(
+ json_agg(
+ json_build_object(
+ 'id', r.id,
+ 'issueStageId', r.issue_stage_id,
+ 'revision', r.revision,
+ 'uploaderType', r.uploader_type,
+ 'uploaderId', r.uploader_id,
+ 'uploaderName', r.uploader_name,
+ 'comment', r.comment,
+ 'usage', r.usage,
+ 'usageType', r.usage_type,
+ 'revisionStatus', r.revision_status,
+ 'submittedDate', r.submitted_date,
+ 'uploadedAt', r.uploaded_at,
+ 'approvedDate', r.approved_date,
+ 'reviewStartDate', r.review_start_date,
+ 'rejectedDate', r.rejected_date,
+ 'reviewerId', r.reviewer_id,
+ 'reviewerName', r.reviewer_name,
+ 'reviewComments', r.review_comments,
+ 'createdAt', r.created_at,
+ 'updatedAt', r.updated_at,
+ 'attachments', COALESCE(ra.attachments, '[]'::json)
+ ) ORDER BY r.created_at
+ ) FILTER (WHERE r.id IS NOT NULL),
+ '[]'::json
+ ) as revisions
+ FROM issue_stages ist
+ LEFT JOIN revisions r ON ist.id = r.issue_stage_id
+ LEFT JOIN revision_attachments ra ON r.id = ra.revision_id
+ GROUP BY ist.id
+ ),
+
+ -- 문서별 스테이지 집계 (리비전 포함)
+ stage_aggregation AS (
+ SELECT
+ ist.document_id,
+ json_agg(
+ json_build_object(
+ 'id', ist.id,
+ 'stageName', ist.stage_name,
+ 'stageStatus', ist.stage_status,
+ 'stageOrder', ist.stage_order,
+ 'planDate', ist.plan_date,
+ 'actualDate', ist.actual_date,
+ 'assigneeName', ist.assignee_name,
+ 'priority', ist.priority,
+ 'revisions', COALESCE(sr.revisions, '[]'::json)
+ ) ORDER BY ist.stage_order
+ ) as all_stages
+ FROM issue_stages ist
+ LEFT JOIN stage_revisions sr ON ist.id = sr.stage_id
+ GROUP BY ist.document_id
+ ),
+
+ -- 첫 번째 스테이지 정보 (drawingKind에 따라 다른 조건)
+ first_stage_info AS (
+ SELECT
+ document_id,
+ first_stage_id,
+ first_stage_name,
+ first_stage_plan_date,
+ first_stage_actual_date
+ FROM (
+ SELECT
+ ist.document_id,
+ ist.id as first_stage_id,
+ ist.stage_name as first_stage_name,
+ ist.plan_date as first_stage_plan_date,
+ ist.actual_date as first_stage_actual_date,
+ ROW_NUMBER() OVER (PARTITION BY ist.document_id ORDER BY ist.stage_order ASC) as rn
+ FROM issue_stages ist
+ JOIN documents d ON ist.document_id = d.id
+ WHERE
+ (d.drawing_kind = 'B4' AND LOWER(ist.stage_name) LIKE '%pre%') OR
+ (d.drawing_kind = 'B3' AND LOWER(ist.stage_name) LIKE '%approval%') OR
+ (d.drawing_kind = 'B5' AND LOWER(ist.stage_name) LIKE '%first%')
+ ) ranked
+ WHERE rn = 1
+ ),
+
+ -- 두 번째 스테이지 정보 (drawingKind에 따라 다른 조건)
+ second_stage_info AS (
+ SELECT
+ document_id,
+ second_stage_id,
+ second_stage_name,
+ second_stage_plan_date,
+ second_stage_actual_date
+ FROM (
+ SELECT
+ ist.document_id,
+ ist.id as second_stage_id,
+ ist.stage_name as second_stage_name,
+ ist.plan_date as second_stage_plan_date,
+ ist.actual_date as second_stage_actual_date,
+ ROW_NUMBER() OVER (PARTITION BY ist.document_id ORDER BY ist.stage_order ASC) as rn
+ FROM issue_stages ist
+ JOIN documents d ON ist.document_id = d.id
+ WHERE
+ (d.drawing_kind = 'B4' AND LOWER(ist.stage_name) LIKE '%work%') OR
+ (d.drawing_kind = 'B3' AND LOWER(ist.stage_name) LIKE '%work%') OR
+ (d.drawing_kind = 'B5' AND LOWER(ist.stage_name) LIKE '%second%')
+ ) ranked
+ WHERE rn = 1
+ ),
+
+ -- 첨부파일 수 집계
+ attachment_counts AS (
+ SELECT
+ ist.document_id,
+ COUNT(da.id) as attachment_count
+ FROM issue_stages ist
+ LEFT JOIN revisions r ON ist.id = r.issue_stage_id
+ LEFT JOIN document_attachments da ON r.id = da.revision_id
+ GROUP BY ist.document_id
+ )
+
+ SELECT
+ d.id as document_id,
+ d.project_id,
+ d.vendor_id,
+ d.doc_number,
+ d.drawing_kind,
+ d.drawing_move_gbn,
+ d.discipline,
+ d.vendor_doc_number,
+ d.title,
+ d.pic,
+ d.status,
+ d.issued_date,
+ d.contract_id,
+
+ -- 외부 시스템 연동 정보
+ d.external_document_id,
+ d.external_system_type,
+ d.external_synced_at,
+
+ -- DOLCE 응답의 추가 정보들
+ d.shi_drawing_no,
+ d.manager,
+ d.manager_enm,
+ d.manager_no,
+ d.register_group,
+ d.register_group_id,
+
+ -- 생성자 정보
+ d.create_user_no,
+ d.create_user_id,
+ d.create_user_enm,
+
+ -- 프로젝트 및 벤더 정보
+ p.code as project_code,
+ v.vendor_name,
+ v.vendor_code,
+
+ -- B4 전용 필드들
+ d.c_gbn,
+ d.d_gbn,
+ d.degree_gbn,
+ d.dept_gbn,
+ d.s_gbn,
+ d.j_gbn,
+
+ -- 첫 번째 스테이지 정보
+ fsi.first_stage_id,
+ fsi.first_stage_name,
+ fsi.first_stage_plan_date,
+ fsi.first_stage_actual_date,
+
+ -- 두 번째 스테이지 정보
+ ssi.second_stage_id,
+ ssi.second_stage_name,
+ ssi.second_stage_plan_date,
+ ssi.second_stage_actual_date,
+
+ -- 전체 스테이지 (리비전 및 첨부파일 포함)
+ COALESCE(sa.all_stages, '[]'::json) as all_stages,
+
+ -- 기타
+ COALESCE(ac.attachment_count, 0) as attachment_count,
+ d.created_at,
+ d.updated_at
+
+ FROM documents d
+ -- projects, vendors 테이블 JOIN (projectId가 이제 documents에 직접 있음)
+ LEFT JOIN projects p ON d.project_id = p.id AND p.type = 'ship'
+ LEFT JOIN contracts c ON d.contract_id = c.id
+ LEFT JOIN vendors v ON c.vendor_id = v.id
+
+ -- 스테이지 정보 JOIN
+ LEFT JOIN first_stage_info fsi ON d.id = fsi.document_id
+ LEFT JOIN second_stage_info ssi ON d.id = ssi.document_id
+ LEFT JOIN stage_aggregation sa ON d.id = sa.document_id
+ LEFT JOIN attachment_counts ac ON d.id = ac.document_id
+
+ ORDER BY d.created_at DESC
+);
\ No newline at end of file
diff --git a/db/migrations/meta/0287_snapshot.json b/db/migrations/meta/0287_snapshot.json
new file mode 100644
index 00000000..92276bd6
--- /dev/null
+++ b/db/migrations/meta/0287_snapshot.json
@@ -0,0 +1,48206 @@
+{
+ "id": "2d2c96e8-07f9-4aba-a96a-825789b6e8ff",
+ "prevId": "7d9d9caf-52d8-4572-af1f-d55e110319da",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.companies": {
+ "name": "companies",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "companies_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "taxID": {
+ "name": "taxID",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_envelopes": {
+ "name": "contract_envelopes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_envelopes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "envelope_id": {
+ "name": "envelope_id",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "envelope_status": {
+ "name": "envelope_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contract_envelopes_contract_id_contracts_id_fk": {
+ "name": "contract_envelopes_contract_id_contracts_id_fk",
+ "tableFrom": "contract_envelopes",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_items": {
+ "name": "contract_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_items_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_id": {
+ "name": "item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "unit_price": {
+ "name": "unit_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_rate": {
+ "name": "tax_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_amount": {
+ "name": "tax_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_line_amount": {
+ "name": "total_line_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "contract_items_contract_item_idx": {
+ "name": "contract_items_contract_item_idx",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "item_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "contract_items_contract_id_contracts_id_fk": {
+ "name": "contract_items_contract_id_contracts_id_fk",
+ "tableFrom": "contract_items",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contract_items_item_id_items_id_fk": {
+ "name": "contract_items_item_id_items_id_fk",
+ "tableFrom": "contract_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contract_items_contract_id_item_id_unique": {
+ "name": "contract_items_contract_id_item_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_id",
+ "item_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_signers": {
+ "name": "contract_signers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_signers_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "envelope_id": {
+ "name": "envelope_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_contact_id": {
+ "name": "vendor_contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "signer_type": {
+ "name": "signer_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'VENDOR'"
+ },
+ "signer_email": {
+ "name": "signer_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "signer_name": {
+ "name": "signer_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "signer_position": {
+ "name": "signer_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "signer_status": {
+ "name": "signer_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "signed_at": {
+ "name": "signed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contract_signers_envelope_id_contract_envelopes_id_fk": {
+ "name": "contract_signers_envelope_id_contract_envelopes_id_fk",
+ "tableFrom": "contract_signers",
+ "tableTo": "contract_envelopes",
+ "columnsFrom": [
+ "envelope_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contract_signers_vendor_contact_id_vendor_contacts_id_fk": {
+ "name": "contract_signers_vendor_contact_id_vendor_contacts_id_fk",
+ "tableFrom": "contract_signers",
+ "tableTo": "vendor_contacts",
+ "columnsFrom": [
+ "vendor_contact_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contracts": {
+ "name": "contracts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contracts_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_name": {
+ "name": "contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "end_date": {
+ "name": "end_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "partial_shipping_allowed": {
+ "name": "partial_shipping_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "partial_payment_allowed": {
+ "name": "partial_payment_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contracts_project_id_projects_id_fk": {
+ "name": "contracts_project_id_projects_id_fk",
+ "tableFrom": "contracts",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contracts_vendor_id_vendors_id_fk": {
+ "name": "contracts_vendor_id_vendors_id_fk",
+ "tableFrom": "contracts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contracts_contract_no_unique": {
+ "name": "contracts_contract_no_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_no"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.poa": {
+ "name": "poa",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "poa_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_contract_no": {
+ "name": "original_contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_contract_name": {
+ "name": "original_contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_status": {
+ "name": "original_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_status": {
+ "name": "approval_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "poa_original_contract_no_contracts_contract_no_fk": {
+ "name": "poa_original_contract_no_contracts_contract_no_fk",
+ "tableFrom": "poa",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "original_contract_no"
+ ],
+ "columnsTo": [
+ "contract_no"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "poa_project_id_projects_id_fk": {
+ "name": "poa_project_id_projects_id_fk",
+ "tableFrom": "poa",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "poa_vendor_id_vendors_id_fk": {
+ "name": "poa_vendor_id_vendors_id_fk",
+ "tableFrom": "poa",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_offshore_hull": {
+ "name": "item_offshore_hull",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_item_list": {
+ "name": "sub_item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_offshore_top": {
+ "name": "item_offshore_top",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_item_list": {
+ "name": "sub_item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_shipbuilding": {
+ "name": "item_shipbuilding",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ship_types": {
+ "name": "ship_types",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'OPTION'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.items": {
+ "name": "items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_no": {
+ "name": "project_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "package_code": {
+ "name": "package_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sm_code": {
+ "name": "sm_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_item_code": {
+ "name": "parent_item_code",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_level": {
+ "name": "item_level",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delete_flag": {
+ "name": "delete_flag",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_date": {
+ "name": "change_date",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "base_unit_of_measure": {
+ "name": "base_unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_item_unique": {
+ "name": "project_item_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_no",
+ "item_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.materials": {
+ "name": "materials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_item_code": {
+ "name": "parent_item_code",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_level": {
+ "name": "item_level",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delete_flag": {
+ "name": "delete_flag",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_date": {
+ "name": "change_date",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "base_unit_of_measure": {
+ "name": "base_unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "materials_item_code_unique": {
+ "name": "materials_item_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "item_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pq_criterias": {
+ "name": "pq_criterias",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_point": {
+ "name": "check_point",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_group_name": {
+ "name": "sub_group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pq_list_id": {
+ "name": "pq_list_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "input_format": {
+ "name": "input_format",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'TEXT'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pq_criterias_pq_list_id_pq_lists_id_fk": {
+ "name": "pq_criterias_pq_list_id_pq_lists_id_fk",
+ "tableFrom": "pq_criterias",
+ "tableTo": "pq_lists",
+ "columnsFrom": [
+ "pq_list_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pq_lists": {
+ "name": "pq_lists",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_to": {
+ "name": "valid_to",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pq_lists_project_id_projects_id_fk": {
+ "name": "pq_lists_project_id_projects_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "pq_lists_created_by_users_id_fk": {
+ "name": "pq_lists_created_by_users_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "pq_lists_updated_by_users_id_fk": {
+ "name": "pq_lists_updated_by_users_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.site_visit_request_attachments": {
+ "name": "site_visit_request_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "site_visit_request_id": {
+ "name": "site_visit_request_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_site_visit_info_id": {
+ "name": "vendor_site_visit_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "site_visit_request_attachments_site_visit_request_id_site_visit_requests_id_fk": {
+ "name": "site_visit_request_attachments_site_visit_request_id_site_visit_requests_id_fk",
+ "tableFrom": "site_visit_request_attachments",
+ "tableTo": "site_visit_requests",
+ "columnsFrom": [
+ "site_visit_request_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "site_visit_request_attachments_vendor_site_visit_info_id_vendor_site_visit_info_id_fk": {
+ "name": "site_visit_request_attachments_vendor_site_visit_info_id_vendor_site_visit_info_id_fk",
+ "tableFrom": "site_visit_request_attachments",
+ "tableTo": "vendor_site_visit_info",
+ "columnsFrom": [
+ "vendor_site_visit_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.site_visit_requests": {
+ "name": "site_visit_requests",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "investigation_id": {
+ "name": "investigation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "inspection_duration": {
+ "name": "inspection_duration",
+ "type": "numeric(4, 1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_start_date": {
+ "name": "requested_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_end_date": {
+ "name": "requested_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_attendees": {
+ "name": "shi_attendees",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "vendor_requests": {
+ "name": "vendor_requests",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "additional_requests": {
+ "name": "additional_requests",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REQUESTED'"
+ },
+ "sent_at": {
+ "name": "sent_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "site_visit_requests_investigation_id_vendor_investigations_id_fk": {
+ "name": "site_visit_requests_investigation_id_vendor_investigations_id_fk",
+ "tableFrom": "site_visit_requests",
+ "tableTo": "vendor_investigations",
+ "columnsFrom": [
+ "investigation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "site_visit_requests_requester_id_users_id_fk": {
+ "name": "site_visit_requests_requester_id_users_id_fk",
+ "tableFrom": "site_visit_requests",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_criteria_attachments": {
+ "name": "vendor_criteria_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_criteria_answer_id": {
+ "name": "vendor_criteria_answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_criteria_attachments_vendor_criteria_answer_id_vendor_pq_criteria_answers_id_fk": {
+ "name": "vendor_criteria_attachments_vendor_criteria_answer_id_vendor_pq_criteria_answers_id_fk",
+ "tableFrom": "vendor_criteria_attachments",
+ "tableTo": "vendor_pq_criteria_answers",
+ "columnsFrom": [
+ "vendor_criteria_answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_investigation_attachments": {
+ "name": "vendor_investigation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "investigation_id": {
+ "name": "investigation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'REPORT'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_investigation_attachments_investigation_id_vendor_investigations_id_fk": {
+ "name": "vendor_investigation_attachments_investigation_id_vendor_investigations_id_fk",
+ "tableFrom": "vendor_investigation_attachments",
+ "tableTo": "vendor_investigations",
+ "columnsFrom": [
+ "investigation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_investigations": {
+ "name": "vendor_investigations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pq_submission_id": {
+ "name": "pq_submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "qm_manager_id": {
+ "name": "qm_manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_status": {
+ "name": "investigation_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "investigation_address": {
+ "name": "investigation_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_method": {
+ "name": "investigation_method",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_start_at": {
+ "name": "scheduled_start_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_end_at": {
+ "name": "scheduled_end_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "forecasted_at": {
+ "name": "forecasted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_result": {
+ "name": "evaluation_result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_notes": {
+ "name": "investigation_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "purchase_comment": {
+ "name": "purchase_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_investigations_vendor_id_vendors_id_fk": {
+ "name": "vendor_investigations_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_investigations_pq_submission_id_vendor_pq_submissions_id_fk": {
+ "name": "vendor_investigations_pq_submission_id_vendor_pq_submissions_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "vendor_pq_submissions",
+ "columnsFrom": [
+ "pq_submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "cascade"
+ },
+ "vendor_investigations_requester_id_users_id_fk": {
+ "name": "vendor_investigations_requester_id_users_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_investigations_qm_manager_id_users_id_fk": {
+ "name": "vendor_investigations_qm_manager_id_users_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "qm_manager_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_submissions": {
+ "name": "vendor_pq_submissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "pq_number": {
+ "name": "pq_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REQUESTED'"
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agreements": {
+ "name": "agreements",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "pq_items": {
+ "name": "pq_items",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejected_at": {
+ "name": "rejected_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reject_reason": {
+ "name": "reject_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_pq_submission": {
+ "name": "unique_pq_submission",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_pq_submissions_requester_id_users_id_fk": {
+ "name": "vendor_pq_submissions_requester_id_users_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_pq_submissions_vendor_id_vendors_id_fk": {
+ "name": "vendor_pq_submissions_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_submissions_project_id_projects_id_fk": {
+ "name": "vendor_pq_submissions_project_id_projects_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_pq_submissions_pq_number_unique": {
+ "name": "vendor_pq_submissions_pq_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pq_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_criteria_answers": {
+ "name": "vendor_pq_criteria_answers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "answer": {
+ "name": "answer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_comment": {
+ "name": "shi_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_reply": {
+ "name": "vendor_reply",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_pq_criteria_answers_vendor_id_vendors_id_fk": {
+ "name": "vendor_pq_criteria_answers_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_criteria_answers_criteria_id_pq_criterias_id_fk": {
+ "name": "vendor_pq_criteria_answers_criteria_id_pq_criterias_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "pq_criterias",
+ "columnsFrom": [
+ "criteria_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_criteria_answers_project_id_projects_id_fk": {
+ "name": "vendor_pq_criteria_answers_project_id_projects_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_review_logs": {
+ "name": "vendor_pq_review_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_pq_criteria_answer_id": {
+ "name": "vendor_pq_criteria_answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_name": {
+ "name": "reviewer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_pq_review_logs_vendor_pq_criteria_answer_id_vendor_pq_criteria_answers_id_fk": {
+ "name": "vendor_pq_review_logs_vendor_pq_criteria_answer_id_vendor_pq_criteria_answers_id_fk",
+ "tableFrom": "vendor_pq_review_logs",
+ "tableTo": "vendor_pq_criteria_answers",
+ "columnsFrom": [
+ "vendor_pq_criteria_answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_site_visit_info": {
+ "name": "vendor_site_visit_info",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "site_visit_request_id": {
+ "name": "site_visit_request_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_name": {
+ "name": "factory_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_location": {
+ "name": "factory_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_address": {
+ "name": "factory_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_name": {
+ "name": "factory_pic_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_phone": {
+ "name": "factory_pic_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_email": {
+ "name": "factory_pic_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_directions": {
+ "name": "factory_directions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_procedure": {
+ "name": "access_procedure",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachments": {
+ "name": "has_attachments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "other_info": {
+ "name": "other_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "submitted_by": {
+ "name": "submitted_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_site_visit_info_site_visit_request_id_site_visit_requests_id_fk": {
+ "name": "vendor_site_visit_info_site_visit_request_id_site_visit_requests_id_fk",
+ "tableFrom": "vendor_site_visit_info",
+ "tableTo": "site_visit_requests",
+ "columnsFrom": [
+ "site_visit_request_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_site_visit_info_submitted_by_users_id_fk": {
+ "name": "vendor_site_visit_info_submitted_by_users_id_fk",
+ "tableFrom": "vendor_site_visit_info",
+ "tableTo": "users",
+ "columnsFrom": [
+ "submitted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_projects": {
+ "name": "bidding_projects",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "proj_nm": {
+ "name": "proj_nm",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sector": {
+ "name": "sector",
+ "type": "char(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proj_msrm": {
+ "name": "proj_msrm",
+ "type": "numeric(3, 0)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kunnr": {
+ "name": "kunnr",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kunnr_nm": {
+ "name": "kunnr_nm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cls_1": {
+ "name": "cls_1",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cls1_nm": {
+ "name": "cls1_nm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ptype": {
+ "name": "ptype",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ptype_nm": {
+ "name": "ptype_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_cd": {
+ "name": "pmodel_cd",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_nm": {
+ "name": "pmodel_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_sz": {
+ "name": "pmodel_sz",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_uom": {
+ "name": "pmodel_uom",
+ "type": "char(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "txt04": {
+ "name": "txt04",
+ "type": "char(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "txt30": {
+ "name": "txt30",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "estm_pm": {
+ "name": "estm_pm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pjt_type": {
+ "name": "pjt_type",
+ "type": "varchar",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "bidding_projects_pspid_unique": {
+ "name": "bidding_projects_pspid_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pspid"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_series": {
+ "name": "project_series",
+ "schema": "",
+ "columns": {
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sers_no": {
+ "name": "sers_no",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sc_dt": {
+ "name": "sc_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kl_dt": {
+ "name": "kl_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "lc_dt": {
+ "name": "lc_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dl_dt": {
+ "name": "dl_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dock_no": {
+ "name": "dock_no",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dock_nm": {
+ "name": "dock_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proj_no": {
+ "name": "proj_no",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "post1": {
+ "name": "post1",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "project_sersNo_unique": {
+ "name": "project_sersNo_unique",
+ "columns": [
+ {
+ "expression": "pspid",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "sers_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_series_pspid_bidding_projects_pspid_fk": {
+ "name": "project_series_pspid_bidding_projects_pspid_fk",
+ "tableFrom": "project_series",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "pspid"
+ ],
+ "columnsTo": [
+ "pspid"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.projects": {
+ "name": "projects",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ship'"
+ },
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "projects_pspid_unique": {
+ "name": "projects_pspid_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pspid"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.cbe_evaluations": {
+ "name": "cbe_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluated_by": {
+ "name": "evaluated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluated_at": {
+ "name": "evaluated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "result": {
+ "name": "result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_cost": {
+ "name": "total_cost",
+ "type": "numeric(18, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_schedule": {
+ "name": "delivery_schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cbe_evaluations_rfq_id_rfqs_id_fk": {
+ "name": "cbe_evaluations_rfq_id_rfqs_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "cbe_evaluations_vendor_id_vendors_id_fk": {
+ "name": "cbe_evaluations_vendor_id_vendors_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "cbe_evaluations_evaluated_by_users_id_fk": {
+ "name": "cbe_evaluations_evaluated_by_users_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "evaluated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_attachments": {
+ "name": "rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_id": {
+ "name": "evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cbe_id": {
+ "name": "cbe_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_attachments_rfq_id_rfqs_id_fk": {
+ "name": "rfq_attachments_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_vendor_id_vendors_id_fk": {
+ "name": "rfq_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_evaluation_id_rfq_evaluations_id_fk": {
+ "name": "rfq_attachments_evaluation_id_rfq_evaluations_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfq_evaluations",
+ "columnsFrom": [
+ "evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_cbe_id_cbe_evaluations_id_fk": {
+ "name": "rfq_attachments_cbe_id_cbe_evaluations_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "cbe_evaluations",
+ "columnsFrom": [
+ "cbe_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_comment_id_rfq_comments_id_fk": {
+ "name": "rfq_attachments_comment_id_rfq_comments_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_comments": {
+ "name": "rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment_text": {
+ "name": "comment_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "commented_by": {
+ "name": "commented_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_id": {
+ "name": "evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cbe_id": {
+ "name": "cbe_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_comments_rfq_id_rfqs_id_fk": {
+ "name": "rfq_comments_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_vendor_id_vendors_id_fk": {
+ "name": "rfq_comments_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_commented_by_users_id_fk": {
+ "name": "rfq_comments_commented_by_users_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "commented_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_evaluation_id_rfq_evaluations_id_fk": {
+ "name": "rfq_comments_evaluation_id_rfq_evaluations_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "rfq_evaluations",
+ "columnsFrom": [
+ "evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_cbe_id_vendor_responses_id_fk": {
+ "name": "rfq_comments_cbe_id_vendor_responses_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "cbe_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_evaluations": {
+ "name": "rfq_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "eval_type": {
+ "name": "eval_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "result": {
+ "name": "result",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_evaluations_rfq_id_rfqs_id_fk": {
+ "name": "rfq_evaluations_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_evaluations",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_evaluations_vendor_id_vendors_id_fk": {
+ "name": "rfq_evaluations_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_evaluations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_items": {
+ "name": "rfq_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_items_rfq_id_rfqs_id_fk": {
+ "name": "rfq_items_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_items",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "rfq_items_item_code_items_item_code_fk": {
+ "name": "rfq_items_item_code_items_item_code_fk",
+ "tableFrom": "rfq_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfqs": {
+ "name": "rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_project_id": {
+ "name": "bid_project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PURCHASE'"
+ },
+ "parent_rfq_id": {
+ "name": "parent_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfqs_project_id_projects_id_fk": {
+ "name": "rfqs_project_id_projects_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_bid_project_id_bidding_projects_id_fk": {
+ "name": "rfqs_bid_project_id_bidding_projects_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "bid_project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_created_by_users_id_fk": {
+ "name": "rfqs_created_by_users_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_parent_rfq_id_rfqs_id_fk": {
+ "name": "rfqs_parent_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "parent_rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "rfqs_rfq_code_unique": {
+ "name": "rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_commercial_responses": {
+ "name": "vendor_commercial_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric(18, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_period": {
+ "name": "delivery_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "warranty_period": {
+ "name": "warranty_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validity_period": {
+ "name": "validity_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "price_breakdown": {
+ "name": "price_breakdown",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commercial_notes": {
+ "name": "commercial_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_commercial_responses_response_id_vendor_responses_id_fk": {
+ "name": "vendor_commercial_responses_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_commercial_responses",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_attachments": {
+ "name": "vendor_response_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "technical_response_id": {
+ "name": "technical_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commercial_response_id": {
+ "name": "commercial_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_attachments_response_id_vendor_responses_id_fk": {
+ "name": "vendor_response_attachments_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_technical_response_id_vendor_technical_responses_id_fk": {
+ "name": "vendor_response_attachments_technical_response_id_vendor_technical_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_technical_responses",
+ "columnsFrom": [
+ "technical_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_commercial_response_id_vendor_commercial_responses_id_fk": {
+ "name": "vendor_response_attachments_commercial_response_id_vendor_commercial_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_commercial_responses",
+ "columnsFrom": [
+ "commercial_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_responses": {
+ "name": "vendor_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REVIEWING'"
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_by": {
+ "name": "responded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "vendor_response_unique": {
+ "name": "vendor_response_unique",
+ "columns": [
+ {
+ "expression": "rfq_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_responses_rfq_id_rfqs_id_fk": {
+ "name": "vendor_responses_rfq_id_rfqs_id_fk",
+ "tableFrom": "vendor_responses",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_responses_vendor_id_vendors_id_fk": {
+ "name": "vendor_responses_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_responses",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_technical_responses": {
+ "name": "vendor_technical_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_technical_responses_response_id_vendor_responses_id_fk": {
+ "name": "vendor_technical_responses_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_technical_responses",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.departments": {
+ "name": "departments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "departments_department_code_unique": {
+ "name": "departments_department_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.login_attempts": {
+ "name": "login_attempts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "login_attempts_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "failure_reason": {
+ "name": "failure_reason",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attempted_at": {
+ "name": "attempted_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "login_attempts_email_idx": {
+ "name": "login_attempts_email_idx",
+ "columns": [
+ {
+ "expression": "email",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "login_attempts_attempted_at_idx": {
+ "name": "login_attempts_attempted_at_idx",
+ "columns": [
+ {
+ "expression": "attempted_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "login_attempts_ip_address_idx": {
+ "name": "login_attempts_ip_address_idx",
+ "columns": [
+ {
+ "expression": "ip_address",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "login_attempts_user_id_users_id_fk": {
+ "name": "login_attempts_user_id_users_id_fk",
+ "tableFrom": "login_attempts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mfa_tokens": {
+ "name": "mfa_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "mfa_tokens_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "phone_number": {
+ "name": "phone_number",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attempts": {
+ "name": "attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "mfa_tokens_user_id_idx": {
+ "name": "mfa_tokens_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "mfa_tokens_token_idx": {
+ "name": "mfa_tokens_token_idx",
+ "columns": [
+ {
+ "expression": "token",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "mfa_tokens_expires_at_idx": {
+ "name": "mfa_tokens_expires_at_idx",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "mfa_tokens_user_id_users_id_fk": {
+ "name": "mfa_tokens_user_id_users_id_fk",
+ "tableFrom": "mfa_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.otps": {
+ "name": "otps",
+ "schema": "",
+ "columns": {
+ "email": {
+ "name": "email",
+ "type": "varchar(256)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "otpToken": {
+ "name": "otpToken",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "otp_expires": {
+ "name": "otp_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.password_history": {
+ "name": "password_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "password_history_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "salt": {
+ "name": "salt",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "replaced_at": {
+ "name": "replaced_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "password_history_user_id_idx": {
+ "name": "password_history_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "password_history_created_at_idx": {
+ "name": "password_history_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "password_history_user_id_users_id_fk": {
+ "name": "password_history_user_id_users_id_fk",
+ "tableFrom": "password_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.passwords": {
+ "name": "passwords",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "passwords_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "salt": {
+ "name": "salt",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "strength": {
+ "name": "strength",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_uppercase": {
+ "name": "has_uppercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_lowercase": {
+ "name": "has_lowercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_numbers": {
+ "name": "has_numbers",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_symbols": {
+ "name": "has_symbols",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "length": {
+ "name": "length",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "passwords_user_id_idx": {
+ "name": "passwords_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "passwords_active_idx": {
+ "name": "passwords_active_idx",
+ "columns": [
+ {
+ "expression": "is_active",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "passwords_user_id_users_id_fk": {
+ "name": "passwords_user_id_users_id_fk",
+ "tableFrom": "passwords",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.permissions": {
+ "name": "permissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "permissions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_key": {
+ "name": "permission_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.role_permissions": {
+ "name": "role_permissions",
+ "schema": "",
+ "columns": {
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_id": {
+ "name": "permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "role_permissions_role_id_roles_id_fk": {
+ "name": "role_permissions_role_id_roles_id_fk",
+ "tableFrom": "role_permissions",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "role_permissions_permission_id_permissions_id_fk": {
+ "name": "role_permissions_permission_id_permissions_id_fk",
+ "tableFrom": "role_permissions",
+ "tableTo": "permissions",
+ "columnsFrom": [
+ "permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "roles_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "roles_company_id_vendors_id_fk": {
+ "name": "roles_company_id_vendors_id_fk",
+ "tableFrom": "roles",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security_settings": {
+ "name": "security_settings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "security_settings_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "min_password_length": {
+ "name": "min_password_length",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 8
+ },
+ "require_uppercase": {
+ "name": "require_uppercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_lowercase": {
+ "name": "require_lowercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_numbers": {
+ "name": "require_numbers",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_symbols": {
+ "name": "require_symbols",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "password_expiry_days": {
+ "name": "password_expiry_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 90
+ },
+ "password_history_count": {
+ "name": "password_history_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "max_failed_attempts": {
+ "name": "max_failed_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "lockout_duration_minutes": {
+ "name": "lockout_duration_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 30
+ },
+ "require_mfa_for_partners": {
+ "name": "require_mfa_for_partners",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "sms_token_expiry_minutes": {
+ "name": "sms_token_expiry_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "max_sms_attempts_per_day": {
+ "name": "max_sms_attempts_per_day",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 10
+ },
+ "session_timeout_minutes": {
+ "name": "session_timeout_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 480
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "epId": {
+ "name": "epId",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deptCode": {
+ "name": "deptCode",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deptName": {
+ "name": "deptName",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tech_company_id": {
+ "name": "tech_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'partners'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'en'"
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mfa_enabled": {
+ "name": "mfa_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "mfa_secret": {
+ "name": "mfa_secret",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_locked": {
+ "name": "is_locked",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "lockout_until": {
+ "name": "lockout_until",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "failed_login_attempts": {
+ "name": "failed_login_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_login_at": {
+ "name": "last_login_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password_change_required": {
+ "name": "password_change_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "deactivated_at": {
+ "name": "deactivated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deactivation_reason": {
+ "name": "deactivation_reason",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_consent_update": {
+ "name": "last_consent_update",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consent_version": {
+ "name": "consent_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requires_consent_update": {
+ "name": "requires_consent_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "users_email_idx": {
+ "name": "users_email_idx",
+ "columns": [
+ {
+ "expression": "email",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "users_phone_idx": {
+ "name": "users_phone_idx",
+ "columns": [
+ {
+ "expression": "phone",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "users_company_id_vendors_id_fk": {
+ "name": "users_company_id_vendors_id_fk",
+ "tableFrom": "users",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "users_tech_company_id_tech_vendors_id_fk": {
+ "name": "users_tech_company_id_tech_vendors_id_fk",
+ "tableFrom": "users",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "tech_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "users_email_unique": {
+ "name": "users_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.form_entries": {
+ "name": "form_entries",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "form_entries_contract_item_id_contract_items_id_fk": {
+ "name": "form_entries_contract_item_id_contract_items_id_fk",
+ "tableFrom": "form_entries",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.form_metas": {
+ "name": "form_metas",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "columns": {
+ "name": "columns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "form_metas_project_id_projects_id_fk": {
+ "name": "form_metas_project_id_projects_id_fk",
+ "tableFrom": "form_metas",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "form_code_project_unique": {
+ "name": "form_code_project_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "form_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.forms": {
+ "name": "forms",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "forms_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "eng": {
+ "name": "eng",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "im": {
+ "name": "im",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "contract_item_form_code_unique": {
+ "name": "contract_item_form_code_unique",
+ "columns": [
+ {
+ "expression": "contract_item_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "form_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "forms_contract_item_id_contract_items_id_fk": {
+ "name": "forms_contract_item_id_contract_items_id_fk",
+ "tableFrom": "forms",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_class_attributes": {
+ "name": "tag_class_attributes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tag_class_attributes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_class_id": {
+ "name": "tag_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "att_id": {
+ "name": "att_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "def_val": {
+ "name": "def_val",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uom_id": {
+ "name": "uom_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "seq": {
+ "name": "seq",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "tag_class_attributes_seq_idx": {
+ "name": "tag_class_attributes_seq_idx",
+ "columns": [
+ {
+ "expression": "seq",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "tag_class_attributes_tag_class_id_tag_classes_id_fk": {
+ "name": "tag_class_attributes_tag_class_id_tag_classes_id_fk",
+ "tableFrom": "tag_class_attributes",
+ "tableTo": "tag_classes",
+ "columnsFrom": [
+ "tag_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_att_id_in_tag_class": {
+ "name": "uniq_att_id_in_tag_class",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_class_id",
+ "att_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_classes": {
+ "name": "tag_classes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tag_classes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subclasses": {
+ "name": "subclasses",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'[]'::json"
+ },
+ "subclass_remark": {
+ "name": "subclass_remark",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{}'::json"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_classes_project_id_projects_id_fk": {
+ "name": "tag_classes_project_id_projects_id_fk",
+ "tableFrom": "tag_classes",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tag_classes_tag_type_code_project_id_tag_types_code_project_id_fk": {
+ "name": "tag_classes_tag_type_code_project_id_tag_types_code_project_id_fk",
+ "tableFrom": "tag_classes",
+ "tableTo": "tag_types",
+ "columnsFrom": [
+ "tag_type_code",
+ "project_id"
+ ],
+ "columnsTo": [
+ "code",
+ "project_id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_code_in_project": {
+ "name": "uniq_code_in_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_subfield_options": {
+ "name": "tag_subfield_options",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_subfield_options_project_id_projects_id_fk": {
+ "name": "tag_subfield_options_project_id_projects_id_fk",
+ "tableFrom": "tag_subfield_options",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_attribute_project_code": {
+ "name": "uniq_attribute_project_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "attributes_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_subfields": {
+ "name": "tag_subfields",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_description": {
+ "name": "attributes_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expression": {
+ "name": "expression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delimiter": {
+ "name": "delimiter",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_subfields_project_id_projects_id_fk": {
+ "name": "tag_subfields_project_id_projects_id_fk",
+ "tableFrom": "tag_subfields",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_tag_type_attribute": {
+ "name": "uniq_tag_type_attribute",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "tag_type_code",
+ "attributes_id"
+ ]
+ },
+ "uniq_attribute_id_project": {
+ "name": "uniq_attribute_id_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "attributes_id",
+ "project_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_type_class_form_mappings": {
+ "name": "tag_type_class_form_mappings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_label": {
+ "name": "tag_type_label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "class_label": {
+ "name": "class_label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ep": {
+ "name": "ep",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_mapping_in_project": {
+ "name": "uniq_mapping_in_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "tag_type_label",
+ "class_label",
+ "form_code",
+ "remark"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_types": {
+ "name": "tag_types",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_types_project_id_projects_id_fk": {
+ "name": "tag_types_project_id_projects_id_fk",
+ "tableFrom": "tag_types",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tag_types_code_project_id_pk": {
+ "name": "tag_types_code_project_id_pk",
+ "columns": [
+ "code",
+ "project_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tags": {
+ "name": "tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tags_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_id": {
+ "name": "form_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_idx": {
+ "name": "tag_idx",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_no": {
+ "name": "tag_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type": {
+ "name": "tag_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "class": {
+ "name": "class",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_class_id": {
+ "name": "tag_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tags_contract_item_id_contract_items_id_fk": {
+ "name": "tags_contract_item_id_contract_items_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tags_form_id_forms_id_fk": {
+ "name": "tags_form_id_forms_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "forms",
+ "columnsFrom": [
+ "form_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tags_tag_class_id_tag_classes_id_fk": {
+ "name": "tags_tag_class_id_tag_classes_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "tag_classes",
+ "columnsFrom": [
+ "tag_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contract_item_tag_idx_unique": {
+ "name": "contract_item_tag_idx_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_item_id",
+ "tag_idx"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_items": {
+ "name": "template_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "form_mapping_id": {
+ "name": "form_mapping_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tmpl_id": {
+ "name": "tmpl_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tmpl_type": {
+ "name": "tmpl_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "spr_lst_setup": {
+ "name": "spr_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "grd_lst_setup": {
+ "name": "grd_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "spr_itm_lst_setup": {
+ "name": "spr_itm_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_items_form_mapping_id_tag_type_class_form_mappings_id_fk": {
+ "name": "template_items_form_mapping_id_tag_type_class_form_mappings_id_fk",
+ "tableFrom": "template_items",
+ "tableTo": "tag_type_class_form_mappings",
+ "columnsFrom": [
+ "form_mapping_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_tmpl_in_form_mapping": {
+ "name": "uniq_tmpl_in_form_mapping",
+ "nullsNotDistinct": false,
+ "columns": [
+ "form_mapping_id",
+ "tmpl_id"
+ ]
+ },
+ "uniq_name_in_form_mapping": {
+ "name": "uniq_name_in_form_mapping",
+ "nullsNotDistinct": false,
+ "columns": [
+ "form_mapping_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_data_report_temps": {
+ "name": "vendor_data_report_temps",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_id": {
+ "name": "form_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_data_report_temps_contract_item_id_contract_items_id_fk": {
+ "name": "vendor_data_report_temps_contract_item_id_contract_items_id_fk",
+ "tableFrom": "vendor_data_report_temps",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_data_report_temps_form_id_forms_id_fk": {
+ "name": "vendor_data_report_temps_form_id_forms_id_fk",
+ "tableFrom": "vendor_data_report_temps",
+ "tableTo": "forms",
+ "columnsFrom": [
+ "form_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.change_logs": {
+ "name": "change_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_id": {
+ "name": "entity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "changed_fields": {
+ "name": "changed_fields",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "old_values": {
+ "name": "old_values",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_values": {
+ "name": "new_values",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_name": {
+ "name": "user_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_synced": {
+ "name": "is_synced",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "sync_attempts": {
+ "name": "sync_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "last_sync_error": {
+ "name": "last_sync_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "synced_at": {
+ "name": "synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_systems": {
+ "name": "target_systems",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'[]'::jsonb"
+ }
+ },
+ "indexes": {
+ "idx_change_logs_vendor_synced": {
+ "name": "idx_change_logs_vendor_synced",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_synced",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_created_at": {
+ "name": "idx_change_logs_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_entity": {
+ "name": "idx_change_logs_entity",
+ "columns": [
+ {
+ "expression": "entity_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "entity_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_sync_attempts": {
+ "name": "idx_change_logs_sync_attempts",
+ "columns": [
+ {
+ "expression": "sync_attempts",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_attachments": {
+ "name": "document_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "document_attachments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upload_id": {
+ "name": "upload_id",
+ "type": "varchar(36)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "varchar(36)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dolce_file_path": {
+ "name": "dolce_file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_attachments_revision_id_revisions_id_fk": {
+ "name": "document_attachments_revision_id_revisions_id_fk",
+ "tableFrom": "document_attachments",
+ "tableTo": "revisions",
+ "columnsFrom": [
+ "revision_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.documents": {
+ "name": "documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "documents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_move_gbn": {
+ "name": "drawing_move_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discipline": {
+ "name": "discipline",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_document_id": {
+ "name": "external_document_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_system_type": {
+ "name": "external_system_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_synced_at": {
+ "name": "external_synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_drawing_no": {
+ "name": "shi_drawing_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager": {
+ "name": "manager",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_enm": {
+ "name": "manager_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_no": {
+ "name": "manager_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group": {
+ "name": "register_group",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group_id": {
+ "name": "register_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_no": {
+ "name": "create_user_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_id": {
+ "name": "create_user_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_enm": {
+ "name": "create_user_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_contract_doc_status": {
+ "name": "unique_contract_doc_status",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_contract_vendor_doc": {
+ "name": "unique_contract_vendor_doc",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"vendor_doc_number\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_external_doc": {
+ "name": "unique_external_doc",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_system_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"external_document_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_project_doc_status": {
+ "name": "unique_project_doc_status",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_external_doc_project": {
+ "name": "unique_external_doc_project",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_system_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"external_document_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "drawing_kind_idx": {
+ "name": "drawing_kind_idx",
+ "columns": [
+ {
+ "expression": "drawing_kind",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "documents_project_id_projects_id_fk": {
+ "name": "documents_project_id_projects_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "documents_contract_id_contracts_id_fk": {
+ "name": "documents_contract_id_contracts_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "documents_vendor_id_vendors_id_fk": {
+ "name": "documents_vendor_id_vendors_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_stages": {
+ "name": "issue_stages",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "issue_stages_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_name": {
+ "name": "stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "plan_date": {
+ "name": "plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actual_date": {
+ "name": "actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stage_status": {
+ "name": "stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "stage_order": {
+ "name": "stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'MEDIUM'"
+ },
+ "assignee_id": {
+ "name": "assignee_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assignee_name": {
+ "name": "assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reminder_days": {
+ "name": "reminder_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_document_stage": {
+ "name": "unique_document_stage",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "document_stage_order": {
+ "name": "document_stage_order",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_order",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_stages_document_id_documents_id_fk": {
+ "name": "issue_stages_document_id_documents_id_fk",
+ "tableFrom": "issue_stages",
+ "tableTo": "documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.revisions": {
+ "name": "revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "revisions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "issue_stage_id": {
+ "name": "issue_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "uploader_type": {
+ "name": "uploader_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'vendor'"
+ },
+ "uploader_id": {
+ "name": "uploader_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploader_name": {
+ "name": "uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage": {
+ "name": "usage",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_type": {
+ "name": "usage_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_status": {
+ "name": "revision_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'SUBMITTED'"
+ },
+ "submitted_date": {
+ "name": "submitted_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_start_date": {
+ "name": "review_start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_date": {
+ "name": "approved_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejected_date": {
+ "name": "rejected_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_id": {
+ "name": "reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_name": {
+ "name": "reviewer_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_upload_id": {
+ "name": "external_upload_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "register_id": {
+ "name": "register_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "unique_stage_revision_usage": {
+ "name": "unique_stage_revision_usage",
+ "columns": [
+ {
+ "expression": "issue_stage_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "usage",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "COALESCE(\"usage_type\", '')",
+ "asc": true,
+ "isExpression": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.stage_documents": {
+ "name": "stage_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "stage_documents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_project_doc": {
+ "name": "unique_project_doc",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_project_vendor_doc": {
+ "name": "unique_project_vendor_doc",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"stage_documents\".\"vendor_doc_number\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_doc_vendor_id_idx": {
+ "name": "stage_doc_vendor_id_idx",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_doc_status_idx": {
+ "name": "stage_doc_status_idx",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "stage_documents_project_id_projects_id_fk": {
+ "name": "stage_documents_project_id_projects_id_fk",
+ "tableFrom": "stage_documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.stage_issue_stages": {
+ "name": "stage_issue_stages",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "stage_issue_stages_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_name": {
+ "name": "stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "plan_date": {
+ "name": "plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actual_date": {
+ "name": "actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stage_status": {
+ "name": "stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "stage_order": {
+ "name": "stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'MEDIUM'"
+ },
+ "assignee_id": {
+ "name": "assignee_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assignee_name": {
+ "name": "assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reminder_days": {
+ "name": "reminder_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_stage_document_stage": {
+ "name": "unique_stage_document_stage",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_document_stage_order": {
+ "name": "stage_document_stage_order",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_order",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "stage_issue_stages_document_id_stage_documents_id_fk": {
+ "name": "stage_issue_stages_document_id_stage_documents_id_fk",
+ "tableFrom": "stage_issue_stages",
+ "tableTo": "stage_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_batches": {
+ "name": "sync_batches",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "batch_size": {
+ "name": "batch_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "retry_count": {
+ "name": "retry_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "change_log_ids": {
+ "name": "change_log_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "success_count": {
+ "name": "success_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "failure_count": {
+ "name": "failure_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_metadata": {
+ "name": "sync_metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_sync_batches_project_system": {
+ "name": "idx_sync_batches_project_system",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_system",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sync_batches_status": {
+ "name": "idx_sync_batches_status",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sync_batches_created_at": {
+ "name": "idx_sync_batches_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_configs": {
+ "name": "sync_configs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_enabled": {
+ "name": "sync_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "sync_interval_minutes": {
+ "name": "sync_interval_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 30
+ },
+ "last_successful_sync": {
+ "name": "last_successful_sync",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_sync_attempt": {
+ "name": "last_sync_attempt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpoint_url": {
+ "name": "endpoint_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_token": {
+ "name": "auth_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_version": {
+ "name": "api_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'v1'"
+ },
+ "max_batch_size": {
+ "name": "max_batch_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 100
+ },
+ "retry_max_attempts": {
+ "name": "retry_max_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_sync_configs_contract_system": {
+ "name": "idx_sync_configs_contract_system",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_system",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_attachments": {
+ "name": "vendor_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'GENERAL'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_attachments_vendor_id_vendors_id_fk": {
+ "name": "vendor_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_candidates": {
+ "name": "vendor_candidates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'COLLECTED'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_candidates_vendor_id_vendors_id_fk": {
+ "name": "vendor_candidates_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_candidates",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_contacts": {
+ "name": "vendor_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_position": {
+ "name": "contact_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_department": {
+ "name": "contact_department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_task": {
+ "name": "contact_task",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_primary": {
+ "name": "is_primary",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_contacts_vendor_id_vendors_id_fk": {
+ "name": "vendor_contacts_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_contacts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_possible_items": {
+ "name": "vendor_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_possible_items_vendor_id_vendors_id_fk": {
+ "name": "vendor_possible_items_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_possible_items",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_possible_items_item_code_items_item_code_fk": {
+ "name": "vendor_possible_items_item_code_items_item_code_fk",
+ "tableFrom": "vendor_possible_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_possible_materials": {
+ "name": "vendor_possible_materials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_possible_materials_vendor_id_vendors_id_fk": {
+ "name": "vendor_possible_materials_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_possible_materials",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_possible_materials_item_code_materials_item_code_fk": {
+ "name": "vendor_possible_materials_item_code_materials_item_code_fk",
+ "tableFrom": "vendor_possible_materials",
+ "tableTo": "materials",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_types": {
+ "name": "vendor_types",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_ko": {
+ "name": "name_ko",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_en": {
+ "name": "name_en",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_types_code_unique": {
+ "name": "vendor_types_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendors": {
+ "name": "vendors",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "vendor_type_id": {
+ "name": "vendor_type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_work_expirence": {
+ "name": "representative_work_expirence",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "corporate_registration_number": {
+ "name": "corporate_registration_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_agency": {
+ "name": "credit_agency",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_rating": {
+ "name": "credit_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cash_flow_rating": {
+ "name": "cash_flow_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "business_size": {
+ "name": "business_size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendors_vendor_type_id_vendor_types_id_fk": {
+ "name": "vendors_vendor_type_id_vendor_types_id_fk",
+ "tableFrom": "vendors",
+ "tableTo": "vendor_types",
+ "columnsFrom": [
+ "vendor_type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tasks": {
+ "name": "tasks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(30)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'todo'"
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bug'"
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'low'"
+ },
+ "archived": {
+ "name": "archived",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "current_timestamp"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "tasks_code_unique": {
+ "name": "tasks_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_candidate_logs": {
+ "name": "vendor_candidate_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_candidate_id": {
+ "name": "vendor_candidate_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_candidate_logs_vendor_candidate_id_vendor_candidates_id_fk": {
+ "name": "vendor_candidate_logs_vendor_candidate_id_vendor_candidates_id_fk",
+ "tableFrom": "vendor_candidate_logs",
+ "tableTo": "vendor_candidates",
+ "columnsFrom": [
+ "vendor_candidate_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_candidate_logs_user_id_users_id_fk": {
+ "name": "vendor_candidate_logs_user_id_users_id_fk",
+ "tableFrom": "vendor_candidate_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendors_logs": {
+ "name": "vendors_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendors_logs_vendor_id_vendors_id_fk": {
+ "name": "vendors_logs_vendor_id_vendors_id_fk",
+ "tableFrom": "vendors_logs",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendors_logs_user_id_users_id_fk": {
+ "name": "vendors_logs_user_id_users_id_fk",
+ "tableFrom": "vendors_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.basic_contract": {
+ "name": "basic_contract",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "basic_contract_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_by": {
+ "name": "requested_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "basic_contract_template_id_basic_contract_templates_id_fk": {
+ "name": "basic_contract_template_id_basic_contract_templates_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "basic_contract_templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_vendor_id_vendors_id_fk": {
+ "name": "basic_contract_vendor_id_vendors_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_requested_by_users_id_fk": {
+ "name": "basic_contract_requested_by_users_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requested_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.basic_contract_templates": {
+ "name": "basic_contract_templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "basic_contract_templates_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "template_name": {
+ "name": "template_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validity_period": {
+ "name": "validity_period",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_review_required": {
+ "name": "legal_review_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "shipbuilding_applicable": {
+ "name": "shipbuilding_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "wind_applicable": {
+ "name": "wind_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "pc_applicable": {
+ "name": "pc_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "nb_applicable": {
+ "name": "nb_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "rc_applicable": {
+ "name": "rc_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "gy_applicable": {
+ "name": "gy_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sys_applicable": {
+ "name": "sys_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "infra_applicable": {
+ "name": "infra_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disposed_at": {
+ "name": "disposed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restored_at": {
+ "name": "restored_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "basic_contract_templates_created_by_users_id_fk": {
+ "name": "basic_contract_templates_created_by_users_id_fk",
+ "tableFrom": "basic_contract_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_templates_updated_by_users_id_fk": {
+ "name": "basic_contract_templates_updated_by_users_id_fk",
+ "tableFrom": "basic_contract_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "template_name_revision_unique": {
+ "name": "template_name_revision_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "template_name",
+ "revision"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.incoterms": {
+ "name": "incoterms",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(20)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.payment_terms": {
+ "name": "payment_terms",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.place_of_shipping": {
+ "name": "place_of_shipping",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(20)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_items": {
+ "name": "pr_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_item": {
+ "name": "rfq_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item": {
+ "name": "pr_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_no": {
+ "name": "pr_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_category": {
+ "name": "material_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "acc": {
+ "name": "acc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "size": {
+ "name": "size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gross_weight": {
+ "name": "gross_weight",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "gw_uom": {
+ "name": "gw_uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_no": {
+ "name": "spec_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_url": {
+ "name": "spec_url",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tracking_no": {
+ "name": "tracking_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_yn": {
+ "name": "major_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "project_def": {
+ "name": "project_def",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_sc": {
+ "name": "project_sc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_kl": {
+ "name": "project_kl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_lc": {
+ "name": "project_lc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_dl": {
+ "name": "project_dl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_items_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "pr_items_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "pr_items",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_attachments": {
+ "name": "procurement_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "procurement_rfq_details_id": {
+ "name": "procurement_rfq_details_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_attachments_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "procurement_attachments_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_attachments_procurement_rfq_details_id_procurement_rfq_details_id_fk": {
+ "name": "procurement_attachments_procurement_rfq_details_id_procurement_rfq_details_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "procurement_rfq_details",
+ "columnsFrom": [
+ "procurement_rfq_details_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_attachments_created_by_users_id_fk": {
+ "name": "procurement_attachments_created_by_users_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "attachment_type_check": {
+ "name": "attachment_type_check",
+ "value": "\"procurement_attachments\".\"procurement_rfqs_id\" IS NOT NULL OR \"procurement_attachments\".\"procurement_rfq_details_id\" IS NOT NULL"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.procurement_quotation_items": {
+ "name": "procurement_quotation_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_price": {
+ "name": "unit_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "vendor_material_code": {
+ "name": "vendor_material_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_material_description": {
+ "name": "vendor_material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "lead_time_in_days": {
+ "name": "lead_time_in_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_rate": {
+ "name": "tax_rate",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_amount": {
+ "name": "tax_amount",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount_rate": {
+ "name": "discount_rate",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount_amount": {
+ "name": "discount_amount",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_alternative": {
+ "name": "is_alternative",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_recommended": {
+ "name": "is_recommended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_quotation_items_quotation_id_procurement_vendor_quotations_id_fk": {
+ "name": "procurement_quotation_items_quotation_id_procurement_vendor_quotations_id_fk",
+ "tableFrom": "procurement_quotation_items",
+ "tableTo": "procurement_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_quotation_items_pr_item_id_pr_items_id_fk": {
+ "name": "procurement_quotation_items_pr_item_id_pr_items_id_fk",
+ "tableFrom": "procurement_quotation_items",
+ "tableTo": "pr_items",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_attachments": {
+ "name": "procurement_rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_attachments_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_attachments_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_comment_id_procurement_rfq_comments_id_fk": {
+ "name": "procurement_rfq_attachments_comment_id_procurement_rfq_comments_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_quotation_id_procurement_vendor_quotations_id_fk": {
+ "name": "procurement_rfq_attachments_quotation_id_procurement_vendor_quotations_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_uploaded_by_users_id_fk": {
+ "name": "procurement_rfq_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_vendor_id_vendors_id_fk": {
+ "name": "procurement_rfq_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_comments": {
+ "name": "procurement_rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_comment": {
+ "name": "is_vendor_comment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_comments_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_comments_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_vendor_id_vendors_id_fk": {
+ "name": "procurement_rfq_comments_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_user_id_users_id_fk": {
+ "name": "procurement_rfq_comments_user_id_users_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_parent_comment_id_procurement_rfq_comments_id_fk": {
+ "name": "procurement_rfq_comments_parent_comment_id_procurement_rfq_comments_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "procurement_rfq_comments",
+ "columnsFrom": [
+ "parent_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_details": {
+ "name": "procurement_rfq_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendors_id": {
+ "name": "vendors_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_detail": {
+ "name": "incoterms_detail",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'VV'"
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_details_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_details_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_vendors_id_vendors_id_fk": {
+ "name": "procurement_rfq_details_vendors_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendors_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_payment_terms_code_payment_terms_code_fk": {
+ "name": "procurement_rfq_details_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_incoterms_code_incoterms_code_fk": {
+ "name": "procurement_rfq_details_incoterms_code_incoterms_code_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_updated_by_users_id_fk": {
+ "name": "procurement_rfq_details_updated_by_users_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfqs": {
+ "name": "procurement_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "series": {
+ "name": "series",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_send_date": {
+ "name": "rfq_send_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'RFQ Created'"
+ },
+ "rfq_sealed_yn": {
+ "name": "rfq_sealed_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sent_by": {
+ "name": "sent_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfqs_sent_by_users_id_fk": {
+ "name": "procurement_rfqs_sent_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "sent_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfqs_created_by_users_id_fk": {
+ "name": "procurement_rfqs_created_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfqs_updated_by_users_id_fk": {
+ "name": "procurement_rfqs_updated_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "procurement_rfqs_rfq_code_unique": {
+ "name": "procurement_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_vendor_quotations": {
+ "name": "procurement_vendor_quotations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quotation_code": {
+ "name": "quotation_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_version": {
+ "name": "quotation_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "total_items_count": {
+ "name": "total_items_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sub_total": {
+ "name": "sub_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "tax_total": {
+ "name": "tax_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "discount_total": {
+ "name": "discount_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "valid_until": {
+ "name": "valid_until",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "estimated_delivery_date": {
+ "name": "estimated_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_detail": {
+ "name": "incoterms_detail",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Draft'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejection_reason": {
+ "name": "rejection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accepted_at": {
+ "name": "accepted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_vendor_quotations_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_vendor_quotations_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_vendor_id_vendors_id_fk": {
+ "name": "procurement_vendor_quotations_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_payment_terms_code_payment_terms_code_fk": {
+ "name": "procurement_vendor_quotations_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_incoterms_code_incoterms_code_fk": {
+ "name": "procurement_vendor_quotations_incoterms_code_incoterms_code_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preset_shares": {
+ "name": "preset_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "preset_id": {
+ "name": "preset_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "shared_with_user_id": {
+ "name": "shared_with_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission": {
+ "name": "permission",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preset_shares_preset_id_table_presets_id_fk": {
+ "name": "preset_shares_preset_id_table_presets_id_fk",
+ "tableFrom": "preset_shares",
+ "tableTo": "table_presets",
+ "columnsFrom": [
+ "preset_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.table_presets": {
+ "name": "table_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "table_id": {
+ "name": "table_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "settings": {
+ "name": "settings",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_shared": {
+ "name": "is_shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_attachments": {
+ "name": "tech_sales_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tech_sales_rfq_id": {
+ "name": "tech_sales_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_attachments_tech_sales_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_attachments_tech_sales_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_attachments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "tech_sales_rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_attachments_created_by_users_id_fk": {
+ "name": "tech_sales_attachments_created_by_users_id_fk",
+ "tableFrom": "tech_sales_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_contact_possible_items": {
+ "name": "tech_sales_contact_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "contact_id": {
+ "name": "contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_possible_item_id": {
+ "name": "vendor_possible_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_contact_possible_items_contact_id_tech_vendor_contacts_id_fk": {
+ "name": "tech_sales_contact_possible_items_contact_id_tech_vendor_contacts_id_fk",
+ "tableFrom": "tech_sales_contact_possible_items",
+ "tableTo": "tech_vendor_contacts",
+ "columnsFrom": [
+ "contact_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_contact_possible_items_vendor_possible_item_id_tech_vendor_possible_items_id_fk": {
+ "name": "tech_sales_contact_possible_items_vendor_possible_item_id_tech_vendor_possible_items_id_fk",
+ "tableFrom": "tech_sales_contact_possible_items",
+ "tableTo": "tech_vendor_possible_items",
+ "columnsFrom": [
+ "vendor_possible_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_comment_attachments": {
+ "name": "tech_sales_rfq_comment_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_comment_attachments_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_comment_id_tech_sales_rfq_comments_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_comment_id_tech_sales_rfq_comments_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_uploaded_by_users_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_comments": {
+ "name": "tech_sales_rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_comment": {
+ "name": "is_vendor_comment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_comments_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_comments_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_rfq_comments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_user_id_users_id_fk": {
+ "name": "tech_sales_rfq_comments_user_id_users_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_parent_comment_id_tech_sales_rfq_comments_id_fk": {
+ "name": "tech_sales_rfq_comments_parent_comment_id_tech_sales_rfq_comments_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_sales_rfq_comments",
+ "columnsFrom": [
+ "parent_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_items": {
+ "name": "tech_sales_rfq_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_shipbuilding_id": {
+ "name": "item_shipbuilding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_offshore_top_id": {
+ "name": "item_offshore_top_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_offshore_hull_id": {
+ "name": "item_offshore_hull_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_type": {
+ "name": "item_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_items_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_items_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_shipbuilding_id_item_shipbuilding_id_fk": {
+ "name": "tech_sales_rfq_items_item_shipbuilding_id_item_shipbuilding_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_shipbuilding",
+ "columnsFrom": [
+ "item_shipbuilding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_offshore_top_id_item_offshore_top_id_fk": {
+ "name": "tech_sales_rfq_items_item_offshore_top_id_item_offshore_top_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_offshore_top",
+ "columnsFrom": [
+ "item_offshore_top_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_offshore_hull_id_item_offshore_hull_id_fk": {
+ "name": "tech_sales_rfq_items_item_offshore_hull_id_item_offshore_hull_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_offshore_hull",
+ "columnsFrom": [
+ "item_offshore_hull_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfqs": {
+ "name": "tech_sales_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_project_id": {
+ "name": "bidding_project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_send_date": {
+ "name": "rfq_send_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'RFQ Created'"
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sent_by": {
+ "name": "sent_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'SHIP'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfqs_bidding_project_id_bidding_projects_id_fk": {
+ "name": "tech_sales_rfqs_bidding_project_id_bidding_projects_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "bidding_project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_sent_by_users_id_fk": {
+ "name": "tech_sales_rfqs_sent_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "sent_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_created_by_users_id_fk": {
+ "name": "tech_sales_rfqs_created_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_updated_by_users_id_fk": {
+ "name": "tech_sales_rfqs_updated_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "tech_sales_rfqs_rfq_code_unique": {
+ "name": "tech_sales_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_attachments": {
+ "name": "tech_sales_vendor_quotation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_vendor_quotation_attachments_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotation_attachments_uploaded_by_users_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotation_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_contacts": {
+ "name": "tech_sales_vendor_quotation_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_id": {
+ "name": "contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_revisions": {
+ "name": "tech_sales_vendor_quotation_revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "snapshot": {
+ "name": "snapshot",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_note": {
+ "name": "revision_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revised_by": {
+ "name": "revised_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revised_at": {
+ "name": "revised_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "tech_sales_quotation_revisions_quotation_version_idx": {
+ "name": "tech_sales_quotation_revisions_quotation_version_idx",
+ "columns": [
+ {
+ "expression": "quotation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "tech_sales_vendor_quotation_revisions_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_vendor_quotation_revisions_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_revisions",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotations": {
+ "name": "tech_sales_vendor_quotations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quotation_code": {
+ "name": "quotation_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_version": {
+ "name": "quotation_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_until": {
+ "name": "valid_until",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_flags": {
+ "name": "vendor_flags",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Assigned'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejection_reason": {
+ "name": "rejection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accepted_at": {
+ "name": "accepted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_vendor_quotations_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_vendor_quotations_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_vendor_quotations",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotations_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_vendor_quotations_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_vendor_quotations",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_rotation_attempts": {
+ "name": "ocr_rotation_attempts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rotation": {
+ "name": "rotation",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "confidence": {
+ "name": "confidence",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tables_found": {
+ "name": "tables_found",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "text_quality": {
+ "name": "text_quality",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "keyword_count": {
+ "name": "keyword_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "extracted_rows_count": {
+ "name": "extracted_rows_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ocr_rotation_attempts_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_rotation_attempts_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_rotation_attempts",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_rows": {
+ "name": "ocr_rows",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "table_id": {
+ "name": "table_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "row_index": {
+ "name": "row_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "report_no": {
+ "name": "report_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "inspection_date": {
+ "name": "inspection_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "no": {
+ "name": "no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identification_no": {
+ "name": "identification_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_no": {
+ "name": "tag_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joint_no": {
+ "name": "joint_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joint_type": {
+ "name": "joint_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "welding_date": {
+ "name": "welding_date",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confidence": {
+ "name": "confidence",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source_table": {
+ "name": "source_table",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source_row": {
+ "name": "source_row",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_ocr_report_no_unique": {
+ "name": "idx_ocr_report_no_unique",
+ "columns": [
+ {
+ "expression": "report_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "tag_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "joint_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "joint_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ocr_rows_table_id_ocr_tables_id_fk": {
+ "name": "ocr_rows_table_id_ocr_tables_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "ocr_tables",
+ "columnsFrom": [
+ "table_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ocr_rows_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_rows_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ocr_rows_user_id_users_id_fk": {
+ "name": "ocr_rows_user_id_users_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_sessions": {
+ "name": "ocr_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "processing_time": {
+ "name": "processing_time",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "best_rotation": {
+ "name": "best_rotation",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_tables": {
+ "name": "total_tables",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_rows": {
+ "name": "total_rows",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "image_enhanced": {
+ "name": "image_enhanced",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "pdf_converted": {
+ "name": "pdf_converted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "warnings": {
+ "name": "warnings",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_tables": {
+ "name": "ocr_tables",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "table_index": {
+ "name": "table_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "row_count": {
+ "name": "row_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ocr_tables_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_tables_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_tables",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfq_attachment_revisions": {
+ "name": "b_rfq_attachment_revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_no": {
+ "name": "revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_comment": {
+ "name": "revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest": {
+ "name": "is_latest",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "latest_revision_idx": {
+ "name": "latest_revision_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_latest",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"b_rfq_attachment_revisions\".\"is_latest\" = $1",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "attachment_revision_idx": {
+ "name": "attachment_revision_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "b_rfq_attachment_revisions_attachment_id_b_rfq_attachments_id_fk": {
+ "name": "b_rfq_attachment_revisions_attachment_id_b_rfq_attachments_id_fk",
+ "tableFrom": "b_rfq_attachment_revisions",
+ "tableTo": "b_rfq_attachments",
+ "columnsFrom": [
+ "attachment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "b_rfq_attachment_revisions_created_by_users_id_fk": {
+ "name": "b_rfq_attachment_revisions_created_by_users_id_fk",
+ "tableFrom": "b_rfq_attachment_revisions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfqs": {
+ "name": "b_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "b_rfqs_project_id_projects_id_fk": {
+ "name": "b_rfqs_project_id_projects_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "b_rfqs_created_by_users_id_fk": {
+ "name": "b_rfqs_created_by_users_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "b_rfqs_updated_by_users_id_fk": {
+ "name": "b_rfqs_updated_by_users_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "b_rfqs_rfq_code_unique": {
+ "name": "b_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfq_attachments": {
+ "name": "b_rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Rev.0'"
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "b_rfq_attachments_rfq_id_b_rfqs_id_fk": {
+ "name": "b_rfq_attachments_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "b_rfq_attachments",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "b_rfq_attachments_created_by_users_id_fk": {
+ "name": "b_rfq_attachments_created_by_users_id_fk",
+ "tableFrom": "b_rfq_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.final_rfq": {
+ "name": "final_rfq",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "final_rfq_status": {
+ "name": "final_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'VV'"
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "firsttime_yn": {
+ "name": "firsttime_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_remark": {
+ "name": "vendor_remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "final_rfq_rfq_id_b_rfqs_id_fk": {
+ "name": "final_rfq_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "final_rfq_vendor_id_vendors_id_fk": {
+ "name": "final_rfq_vendor_id_vendors_id_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "final_rfq_incoterms_code_incoterms_code_fk": {
+ "name": "final_rfq_incoterms_code_incoterms_code_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "final_rfq_payment_terms_code_payment_terms_code_fk": {
+ "name": "final_rfq_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.initial_rfq": {
+ "name": "initial_rfq",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "initial_rfq_status": {
+ "name": "initial_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "rfq_revision": {
+ "name": "rfq_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "initial_rfq_rfq_id_b_rfqs_id_fk": {
+ "name": "initial_rfq_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "initial_rfq_vendor_id_vendors_id_fk": {
+ "name": "initial_rfq_vendor_id_vendors_id_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "initial_rfq_incoterms_code_incoterms_code_fk": {
+ "name": "initial_rfq_incoterms_code_incoterms_code_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_attachment_responses": {
+ "name": "vendor_attachment_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'NOT_RESPONDED'"
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'Rev.0'"
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "vendor_response_idx": {
+ "name": "vendor_response_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "rfq_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_attachment_responses_attachment_id_b_rfq_attachments_id_fk": {
+ "name": "vendor_attachment_responses_attachment_id_b_rfq_attachments_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "b_rfq_attachments",
+ "columnsFrom": [
+ "attachment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_vendor_id_vendors_id_fk": {
+ "name": "vendor_attachment_responses_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_created_by_users_id_fk": {
+ "name": "vendor_attachment_responses_created_by_users_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_updated_by_users_id_fk": {
+ "name": "vendor_attachment_responses_updated_by_users_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_attachments_b": {
+ "name": "vendor_response_attachments_b",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_attachments_b_vendor_response_id_vendor_attachment_responses_id_fk": {
+ "name": "vendor_response_attachments_b_vendor_response_id_vendor_attachment_responses_id_fk",
+ "tableFrom": "vendor_response_attachments_b",
+ "tableTo": "vendor_attachment_responses",
+ "columnsFrom": [
+ "vendor_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_b_uploaded_by_users_id_fk": {
+ "name": "vendor_response_attachments_b_uploaded_by_users_id_fk",
+ "tableFrom": "vendor_response_attachments_b",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_history": {
+ "name": "vendor_response_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_status": {
+ "name": "previous_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_by": {
+ "name": "action_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_at": {
+ "name": "action_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_history_vendor_response_id_vendor_attachment_responses_id_fk": {
+ "name": "vendor_response_history_vendor_response_id_vendor_attachment_responses_id_fk",
+ "tableFrom": "vendor_response_history",
+ "tableTo": "vendor_attachment_responses",
+ "columnsFrom": [
+ "vendor_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_history_action_by_users_id_fk": {
+ "name": "vendor_response_history_action_by_users_id_fk",
+ "tableFrom": "vendor_response_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "action_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_attachments": {
+ "name": "tech_vendor_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'GENERAL'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_contacts": {
+ "name": "tech_vendor_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_position": {
+ "name": "contact_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_title": {
+ "name": "contact_title",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_country": {
+ "name": "contact_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_primary": {
+ "name": "is_primary",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_contacts_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_contacts_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_contacts",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_possible_items": {
+ "name": "tech_vendor_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "shipbuilding_item_id": {
+ "name": "shipbuilding_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "offshore_top_item_id": {
+ "name": "offshore_top_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "offshore_hull_item_id": {
+ "name": "offshore_hull_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_possible_items_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_possible_items_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_shipbuilding_item_id_item_shipbuilding_id_fk": {
+ "name": "tech_vendor_possible_items_shipbuilding_item_id_item_shipbuilding_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_shipbuilding",
+ "columnsFrom": [
+ "shipbuilding_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_offshore_top_item_id_item_offshore_top_id_fk": {
+ "name": "tech_vendor_possible_items_offshore_top_item_id_item_offshore_top_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_offshore_top",
+ "columnsFrom": [
+ "offshore_top_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_offshore_hull_item_id_item_offshore_hull_id_fk": {
+ "name": "tech_vendor_possible_items_offshore_hull_item_id_item_offshore_hull_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_offshore_hull",
+ "columnsFrom": [
+ "offshore_hull_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendors": {
+ "name": "tech_vendors",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_eng": {
+ "name": "country_eng",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_fab": {
+ "name": "country_fab",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_name": {
+ "name": "agent_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_phone": {
+ "name": "agent_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_email": {
+ "name": "agent_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tech_vendor_type": {
+ "name": "tech_vendor_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "is_quote_comparison": {
+ "name": "is_quote_comparison",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_answer_options": {
+ "name": "esg_answer_options",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "esg_evaluation_item_id": {
+ "name": "esg_evaluation_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_text": {
+ "name": "answer_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_answer_options_esg_evaluation_item_id_esg_evaluation_items_id_fk": {
+ "name": "esg_answer_options_esg_evaluation_item_id_esg_evaluation_items_id_fk",
+ "tableFrom": "esg_answer_options",
+ "tableTo": "esg_evaluation_items",
+ "columnsFrom": [
+ "esg_evaluation_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluation_items": {
+ "name": "esg_evaluation_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "esg_evaluation_id": {
+ "name": "esg_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_item": {
+ "name": "evaluation_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_item_description": {
+ "name": "evaluation_item_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_evaluation_items_esg_evaluation_id_esg_evaluations_id_fk": {
+ "name": "esg_evaluation_items_esg_evaluation_id_esg_evaluations_id_fk",
+ "tableFrom": "esg_evaluation_items",
+ "tableTo": "esg_evaluations",
+ "columnsFrom": [
+ "esg_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluation_responses": {
+ "name": "esg_evaluation_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "esg_evaluation_item_id": {
+ "name": "esg_evaluation_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "esg_answer_option_id": {
+ "name": "esg_answer_option_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selected_score": {
+ "name": "selected_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "additional_comments": {
+ "name": "additional_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_evaluation_responses_submission_id_evaluation_submissions_id_fk": {
+ "name": "esg_evaluation_responses_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "esg_evaluation_responses_esg_evaluation_item_id_esg_evaluation_items_id_fk": {
+ "name": "esg_evaluation_responses_esg_evaluation_item_id_esg_evaluation_items_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "esg_evaluation_items",
+ "columnsFrom": [
+ "esg_evaluation_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "esg_evaluation_responses_esg_answer_option_id_esg_answer_options_id_fk": {
+ "name": "esg_evaluation_responses_esg_answer_option_id_esg_answer_options_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "esg_answer_options",
+ "columnsFrom": [
+ "esg_answer_option_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluations": {
+ "name": "esg_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "esg_evaluations_serial_number_unique": {
+ "name": "esg_evaluations_serial_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "serial_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_submissions": {
+ "name": "evaluation_submissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_round": {
+ "name": "evaluation_round",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_status": {
+ "name": "submission_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_by": {
+ "name": "reviewed_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "average_esg_score": {
+ "name": "average_esg_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_general_items": {
+ "name": "total_general_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "completed_general_items": {
+ "name": "completed_general_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "total_esg_items": {
+ "name": "total_esg_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "completed_esg_items": {
+ "name": "completed_esg_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_submissions_periodic_evaluation_id_periodic_evaluations_id_fk": {
+ "name": "evaluation_submissions_periodic_evaluation_id_periodic_evaluations_id_fk",
+ "tableFrom": "evaluation_submissions",
+ "tableTo": "periodic_evaluations",
+ "columnsFrom": [
+ "periodic_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_submissions_company_id_vendors_id_fk": {
+ "name": "evaluation_submissions_company_id_vendors_id_fk",
+ "tableFrom": "evaluation_submissions",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "evaluation_submissions_submission_id_unique": {
+ "name": "evaluation_submissions_submission_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "submission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.general_evaluation_responses": {
+ "name": "general_evaluation_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "general_evaluation_id": {
+ "name": "general_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_text": {
+ "name": "response_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_attachments": {
+ "name": "has_attachments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "general_evaluation_responses_submission_id_evaluation_submissions_id_fk": {
+ "name": "general_evaluation_responses_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "general_evaluation_responses",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "general_evaluation_responses_general_evaluation_id_general_evaluations_id_fk": {
+ "name": "general_evaluation_responses_general_evaluation_id_general_evaluations_id_fk",
+ "tableFrom": "general_evaluation_responses",
+ "tableTo": "general_evaluations",
+ "columnsFrom": [
+ "general_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.general_evaluations": {
+ "name": "general_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "general_evaluations_serial_number_unique": {
+ "name": "general_evaluations_serial_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "serial_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_evaluation_attachments": {
+ "name": "vendor_evaluation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "general_evaluation_response_id": {
+ "name": "general_evaluation_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stored_file_name": {
+ "name": "stored_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_evaluation_attachments_submission_id_evaluation_submissions_id_fk": {
+ "name": "vendor_evaluation_attachments_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "vendor_evaluation_attachments",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_evaluation_attachments_general_evaluation_response_id_general_evaluation_responses_id_fk": {
+ "name": "vendor_evaluation_attachments_general_evaluation_response_id_general_evaluation_responses_id_fk",
+ "tableFrom": "vendor_evaluation_attachments",
+ "tableTo": "general_evaluation_responses",
+ "columnsFrom": [
+ "general_evaluation_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_evaluation_attachments_file_id_unique": {
+ "name": "vendor_evaluation_attachments_file_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "file_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_target_reviewers": {
+ "name": "evaluation_target_reviewers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name_from": {
+ "name": "department_name_from",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "assigned_by": {
+ "name": "assigned_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_target_reviewers_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "evaluation_target_reviewers_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviewers_reviewer_user_id_users_id_fk": {
+ "name": "evaluation_target_reviewers_reviewer_user_id_users_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "reviewer_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviewers_assigned_by_users_id_fk": {
+ "name": "evaluation_target_reviewers_assigned_by_users_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "assigned_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_target_department": {
+ "name": "unique_target_department",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_target_reviews": {
+ "name": "evaluation_target_reviews",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_approved": {
+ "name": "is_approved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comment": {
+ "name": "review_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_target_reviews_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "evaluation_target_reviews_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "evaluation_target_reviews",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviews_reviewer_user_id_users_id_fk": {
+ "name": "evaluation_target_reviews_reviewer_user_id_users_id_fk",
+ "tableFrom": "evaluation_target_reviews",
+ "tableTo": "users",
+ "columnsFrom": [
+ "reviewer_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_target_reviewer": {
+ "name": "unique_target_reviewer",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "reviewer_user_id",
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_targets": {
+ "name": "evaluation_targets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_user_id": {
+ "name": "admin_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_targets_vendor_id_vendors_id_fk": {
+ "name": "evaluation_targets_vendor_id_vendors_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_targets_admin_user_id_users_id_fk": {
+ "name": "evaluation_targets_admin_user_id_users_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "admin_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_targets_confirmed_by_users_id_fk": {
+ "name": "evaluation_targets_confirmed_by_users_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "confirmed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.periodic_evaluations": {
+ "name": "periodic_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_grade": {
+ "name": "evaluation_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "periodic_evaluations_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "periodic_evaluations_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "periodic_evaluations",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "periodic_evaluations_finalized_by_users_id_fk": {
+ "name": "periodic_evaluations_finalized_by_users_id_fk",
+ "tableFrom": "periodic_evaluations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "finalized_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_evaluation_target": {
+ "name": "unique_evaluation_target",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "evaluation_period"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluation_attachments": {
+ "name": "reviewer_evaluation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reviewer_evaluation_detail_id": {
+ "name": "reviewer_evaluation_detail_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stored_file_name": {
+ "name": "stored_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_path": {
+ "name": "public_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_extension": {
+ "name": "file_extension",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "reviewer_evaluation_detail_id_idx": {
+ "name": "reviewer_evaluation_detail_id_idx",
+ "columns": [
+ {
+ "expression": "reviewer_evaluation_detail_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "reviewer_evaluation_attachments_reviewer_evaluation_detail_id_reviewer_evaluation_details_id_fk": {
+ "name": "reviewer_evaluation_attachments_reviewer_evaluation_detail_id_reviewer_evaluation_details_id_fk",
+ "tableFrom": "reviewer_evaluation_attachments",
+ "tableTo": "reviewer_evaluation_details",
+ "columnsFrom": [
+ "reviewer_evaluation_detail_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluation_attachments_uploaded_by_users_id_fk": {
+ "name": "reviewer_evaluation_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "reviewer_evaluation_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluation_details": {
+ "name": "reviewer_evaluation_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reviewer_evaluation_id": {
+ "name": "reviewer_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reg_eval_criteria_details_id": {
+ "name": "reg_eval_criteria_details_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reviewer_evaluation_details_reviewer_evaluation_id_reviewer_evaluations_id_fk": {
+ "name": "reviewer_evaluation_details_reviewer_evaluation_id_reviewer_evaluations_id_fk",
+ "tableFrom": "reviewer_evaluation_details",
+ "tableTo": "reviewer_evaluations",
+ "columnsFrom": [
+ "reviewer_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluation_details_reg_eval_criteria_details_id_reg_eval_criteria_details_id_fk": {
+ "name": "reviewer_evaluation_details_reg_eval_criteria_details_id_reg_eval_criteria_details_id_fk",
+ "tableFrom": "reviewer_evaluation_details",
+ "tableTo": "reg_eval_criteria_details",
+ "columnsFrom": [
+ "reg_eval_criteria_details_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_reviewer_criteria": {
+ "name": "unique_reviewer_criteria",
+ "nullsNotDistinct": false,
+ "columns": [
+ "reviewer_evaluation_id",
+ "reg_eval_criteria_details_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluations": {
+ "name": "reviewer_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_target_reviewer_id": {
+ "name": "evaluation_target_reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_completed": {
+ "name": "is_completed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reviewer_evaluations_periodic_evaluation_id_periodic_evaluations_id_fk": {
+ "name": "reviewer_evaluations_periodic_evaluation_id_periodic_evaluations_id_fk",
+ "tableFrom": "reviewer_evaluations",
+ "tableTo": "periodic_evaluations",
+ "columnsFrom": [
+ "periodic_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluations_evaluation_target_reviewer_id_evaluation_target_reviewers_id_fk": {
+ "name": "reviewer_evaluations_evaluation_target_reviewer_id_evaluation_target_reviewers_id_fk",
+ "tableFrom": "reviewer_evaluations",
+ "tableTo": "evaluation_target_reviewers",
+ "columnsFrom": [
+ "evaluation_target_reviewer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_reviewer_evaluation": {
+ "name": "unique_reviewer_evaluation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "periodic_evaluation_id",
+ "evaluation_target_reviewer_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reg_eval_criteria": {
+ "name": "reg_eval_criteria",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "category2": {
+ "name": "category2",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'processScore'"
+ },
+ "item": {
+ "name": "item",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "range": {
+ "name": "range",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_score_min ": {
+ "name": "variable_score_min ",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_score_max ": {
+ "name": "variable_score_max ",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_score_unit ": {
+ "name": "variable_score_unit ",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_type": {
+ "name": "score_type",
+ "type": "score_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'fixed'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reg_eval_criteria_created_by_users_id_fk": {
+ "name": "reg_eval_criteria_created_by_users_id_fk",
+ "tableFrom": "reg_eval_criteria",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "reg_eval_criteria_updated_by_users_id_fk": {
+ "name": "reg_eval_criteria_updated_by_users_id_fk",
+ "tableFrom": "reg_eval_criteria",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reg_eval_criteria_details": {
+ "name": "reg_eval_criteria_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score_equip_ship": {
+ "name": "score_equip_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_equip_marine": {
+ "name": "score_equip_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_ship": {
+ "name": "score_bulk_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_marine": {
+ "name": "score_bulk_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reg_eval_criteria_details_criteria_id_reg_eval_criteria_id_fk": {
+ "name": "reg_eval_criteria_details_criteria_id_reg_eval_criteria_id_fk",
+ "tableFrom": "reg_eval_criteria_details",
+ "tableTo": "reg_eval_criteria",
+ "columnsFrom": [
+ "criteria_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_gtc_files": {
+ "name": "project_gtc_files",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_gtc_files_project_id_projects_id_fk": {
+ "name": "project_gtc_files_project_id_projects_id_fk",
+ "tableFrom": "project_gtc_files",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.menu_assignments": {
+ "name": "menu_assignments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "menu_assignments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "menu_path": {
+ "name": "menu_path",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "menu_title": {
+ "name": "menu_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "menu_description": {
+ "name": "menu_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "menu_group": {
+ "name": "menu_group",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "section_title": {
+ "name": "section_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'evcp'"
+ },
+ "manager1_id": {
+ "name": "manager1_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager2_id": {
+ "name": "manager2_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "menu_assignments_path_idx": {
+ "name": "menu_assignments_path_idx",
+ "columns": [
+ {
+ "expression": "menu_path",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_manager1_idx": {
+ "name": "menu_assignments_manager1_idx",
+ "columns": [
+ {
+ "expression": "manager1_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_manager2_idx": {
+ "name": "menu_assignments_manager2_idx",
+ "columns": [
+ {
+ "expression": "manager2_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_domain_idx": {
+ "name": "menu_assignments_domain_idx",
+ "columns": [
+ {
+ "expression": "domain",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "menu_assignments_manager1_id_users_id_fk": {
+ "name": "menu_assignments_manager1_id_users_id_fk",
+ "tableFrom": "menu_assignments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "manager1_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "menu_assignments_manager2_id_users_id_fk": {
+ "name": "menu_assignments_manager2_id_users_id_fk",
+ "tableFrom": "menu_assignments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "manager2_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "menu_assignments_menu_path_unique": {
+ "name": "menu_assignments_menu_path_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "menu_path"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.page_information": {
+ "name": "page_information",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "page_path": {
+ "name": "page_path",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "page_name": {
+ "name": "page_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "information_content": {
+ "name": "information_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_file_name": {
+ "name": "attachment_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_file_path": {
+ "name": "attachment_file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_file_size": {
+ "name": "attachment_file_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "page_information_page_path_unique": {
+ "name": "page_information_page_path_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "page_path"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna": {
+ "name": "qna",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "qna_category",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_qna_author": {
+ "name": "idx_qna_author",
+ "columns": [
+ {
+ "expression": "author",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_author_users_id_fk": {
+ "name": "qna_author_users_id_fk",
+ "tableFrom": "qna",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna_answer": {
+ "name": "qna_answer",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "qna_id": {
+ "name": "qna_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_answer_qna": {
+ "name": "idx_answer_qna",
+ "columns": [
+ {
+ "expression": "qna_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_answer_author": {
+ "name": "idx_answer_author",
+ "columns": [
+ {
+ "expression": "author",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_answer_qna_id_qna_id_fk": {
+ "name": "qna_answer_qna_id_qna_id_fk",
+ "tableFrom": "qna_answer",
+ "tableTo": "qna",
+ "columnsFrom": [
+ "qna_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "qna_answer_author_users_id_fk": {
+ "name": "qna_answer_author_users_id_fk",
+ "tableFrom": "qna_answer",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna_comments": {
+ "name": "qna_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_id": {
+ "name": "answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_comment_answer": {
+ "name": "idx_comment_answer",
+ "columns": [
+ {
+ "expression": "answer_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_comment_parent": {
+ "name": "idx_comment_parent",
+ "columns": [
+ {
+ "expression": "parent_comment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_comments_author_users_id_fk": {
+ "name": "qna_comments_author_users_id_fk",
+ "tableFrom": "qna_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "qna_comments_answer_id_qna_answer_id_fk": {
+ "name": "qna_comments_answer_id_qna_answer_id_fk",
+ "tableFrom": "qna_comments",
+ "tableTo": "qna_answer",
+ "columnsFrom": [
+ "answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notice": {
+ "name": "notice",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "page_path": {
+ "name": "page_path",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author_id": {
+ "name": "author_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notice_author_id_users_id_fk": {
+ "name": "notice_author_id_users_id_fk",
+ "tableFrom": "notice",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.daily_access_stats": {
+ "name": "daily_access_stats",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "date": {
+ "name": "date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_visits": {
+ "name": "total_visits",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "unique_users": {
+ "name": "unique_users",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_sessions": {
+ "name": "total_sessions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "avg_session_duration": {
+ "name": "avg_session_duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_download_logs": {
+ "name": "file_download_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_email": {
+ "name": "user_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_name": {
+ "name": "user_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_role": {
+ "name": "user_role",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_ip": {
+ "name": "user_ip",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "downloaded_at": {
+ "name": "downloaded_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_id": {
+ "name": "request_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "referer": {
+ "name": "referer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "download_duration_ms": {
+ "name": "download_duration_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.login_sessions": {
+ "name": "login_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "login_at": {
+ "name": "login_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "logout_at": {
+ "name": "logout_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_token": {
+ "name": "session_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "nextauth_session_id": {
+ "name": "nextauth_session_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_method": {
+ "name": "auth_method",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "last_activity_at": {
+ "name": "last_activity_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "session_expired_at": {
+ "name": "session_expired_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "login_sessions_user_id_users_id_fk": {
+ "name": "login_sessions_user_id_users_id_fk",
+ "tableFrom": "login_sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "login_sessions_session_token_unique": {
+ "name": "login_sessions_session_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "session_token"
+ ]
+ },
+ "login_sessions_nextauth_session_id_unique": {
+ "name": "login_sessions_nextauth_session_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "nextauth_session_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.page_visits": {
+ "name": "page_visits",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "route": {
+ "name": "route",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "page_title": {
+ "name": "page_title",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "referrer": {
+ "name": "referrer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "visited_at": {
+ "name": "visited_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "query_params": {
+ "name": "query_params",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "browser_name": {
+ "name": "browser_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "os_name": {
+ "name": "os_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "page_visits_user_id_users_id_fk": {
+ "name": "page_visits_user_id_users_id_fk",
+ "tableFrom": "page_visits",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "page_visits_session_id_login_sessions_id_fk": {
+ "name": "page_visits_session_id_login_sessions_id_fk",
+ "tableFrom": "page_visits",
+ "tableTo": "login_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.temp_auth_sessions": {
+ "name": "temp_auth_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "temp_auth_key": {
+ "name": "temp_auth_key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_method": {
+ "name": "auth_method",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_used": {
+ "name": "is_used",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "temp_auth_sessions_user_id_users_id_fk": {
+ "name": "temp_auth_sessions_user_id_users_id_fk",
+ "tableFrom": "temp_auth_sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "temp_auth_sessions_temp_auth_key_unique": {
+ "name": "temp_auth_sessions_temp_auth_key_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "temp_auth_key"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_download_stats": {
+ "name": "user_download_stats",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "date": {
+ "name": "date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_downloads": {
+ "name": "total_downloads",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_bytes": {
+ "name": "total_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "unique_files": {
+ "name": "unique_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_download_at": {
+ "name": "last_download_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notifications": {
+ "name": "notifications",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "related_record_id": {
+ "name": "related_record_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "related_record_type": {
+ "name": "related_record_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "read_at": {
+ "name": "read_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_notifications_user_id": {
+ "name": "idx_notifications_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_created_at": {
+ "name": "idx_notifications_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_is_read": {
+ "name": "idx_notifications_is_read",
+ "columns": [
+ {
+ "expression": "is_read",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_user_read": {
+ "name": "idx_notifications_user_read",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_read",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_history": {
+ "name": "template_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_description": {
+ "name": "change_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_by": {
+ "name": "changed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_history_template_id_templates_id_fk": {
+ "name": "template_history_template_id_templates_id_fk",
+ "tableFrom": "template_history",
+ "tableTo": "templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "template_history_changed_by_users_id_fk": {
+ "name": "template_history_changed_by_users_id_fk",
+ "tableFrom": "template_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "changed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_variables": {
+ "name": "template_variables",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_name": {
+ "name": "variable_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_type": {
+ "name": "variable_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "default_value": {
+ "name": "default_value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validation_rule": {
+ "name": "validation_rule",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_variables_template_id_templates_id_fk": {
+ "name": "template_variables_template_id_templates_id_fk",
+ "tableFrom": "template_variables",
+ "tableTo": "templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.templates": {
+ "name": "templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sample_data": {
+ "name": "sample_data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{}'::jsonb"
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "templates_created_by_users_id_fk": {
+ "name": "templates_created_by_users_id_fk",
+ "tableFrom": "templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "templates_slug_unique": {
+ "name": "templates_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_clauses": {
+ "name": "gtc_clauses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_clauses_document_item_number_idx": {
+ "name": "gtc_clauses_document_item_number_idx",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "item_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_document_idx": {
+ "name": "gtc_clauses_document_idx",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_parent_idx": {
+ "name": "gtc_clauses_parent_idx",
+ "columns": [
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_full_path_idx": {
+ "name": "gtc_clauses_full_path_idx",
+ "columns": [
+ {
+ "expression": "full_path",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_clauses_document_id_gtc_documents_id_fk": {
+ "name": "gtc_clauses_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_clauses_created_by_id_users_id_fk": {
+ "name": "gtc_clauses_created_by_id_users_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_clauses_updated_by_id_users_id_fk": {
+ "name": "gtc_clauses_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_documents": {
+ "name": "gtc_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {
+ "gtc_project_revision_idx": {
+ "name": "gtc_project_revision_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_type_idx": {
+ "name": "gtc_type_idx",
+ "columns": [
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_project_idx": {
+ "name": "gtc_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_created_at_idx": {
+ "name": "gtc_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_updated_at_idx": {
+ "name": "gtc_updated_at_idx",
+ "columns": [
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_documents_project_id_projects_id_fk": {
+ "name": "gtc_documents_project_id_projects_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_documents_created_by_id_users_id_fk": {
+ "name": "gtc_documents_created_by_id_users_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_documents_updated_by_id_users_id_fk": {
+ "name": "gtc_documents_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_negotiation_history": {
+ "name": "gtc_negotiation_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_clause_id": {
+ "name": "vendor_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_status": {
+ "name": "previous_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_fields": {
+ "name": "changed_fields",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachments": {
+ "name": "attachments",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_type": {
+ "name": "actor_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "actor_id": {
+ "name": "actor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_name": {
+ "name": "actor_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_email": {
+ "name": "actor_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "gtc_negotiation_history_vendor_clause_idx": {
+ "name": "gtc_negotiation_history_vendor_clause_idx",
+ "columns": [
+ {
+ "expression": "vendor_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_negotiation_history_action_idx": {
+ "name": "gtc_negotiation_history_action_idx",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_negotiation_history_created_at_idx": {
+ "name": "gtc_negotiation_history_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_negotiation_history_vendor_clause_id_gtc_vendor_clauses_id_fk": {
+ "name": "gtc_negotiation_history_vendor_clause_id_gtc_vendor_clauses_id_fk",
+ "tableFrom": "gtc_negotiation_history",
+ "tableTo": "gtc_vendor_clauses",
+ "columnsFrom": [
+ "vendor_clause_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_negotiation_history_actor_id_users_id_fk": {
+ "name": "gtc_negotiation_history_actor_id_users_id_fk",
+ "tableFrom": "gtc_negotiation_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "actor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_templates": {
+ "name": "gtc_templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'1.0'"
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_metadata": {
+ "name": "variable_metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_templates_name_idx": {
+ "name": "gtc_templates_name_idx",
+ "columns": [
+ {
+ "expression": "name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_templates_is_default_idx": {
+ "name": "gtc_templates_is_default_idx",
+ "columns": [
+ {
+ "expression": "is_default",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_templates_document_id_gtc_documents_id_fk": {
+ "name": "gtc_templates_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_templates_created_by_id_users_id_fk": {
+ "name": "gtc_templates_created_by_id_users_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_templates_updated_by_id_users_id_fk": {
+ "name": "gtc_templates_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_vendor_clauses": {
+ "name": "gtc_vendor_clauses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_document_id": {
+ "name": "vendor_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_clause_id": {
+ "name": "base_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_item_number": {
+ "name": "modified_item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_category": {
+ "name": "modified_category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_subtitle": {
+ "name": "modified_subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_content": {
+ "name": "modified_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_number_modified": {
+ "name": "is_number_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_category_modified": {
+ "name": "is_category_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_subtitle_modified": {
+ "name": "is_subtitle_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_content_modified": {
+ "name": "is_content_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_note": {
+ "name": "negotiation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_excluded": {
+ "name": "is_excluded",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_vendor_clauses_vendor_base_idx": {
+ "name": "gtc_vendor_clauses_vendor_base_idx",
+ "columns": [
+ {
+ "expression": "vendor_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "base_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_vendor_document_idx": {
+ "name": "gtc_vendor_clauses_vendor_document_idx",
+ "columns": [
+ {
+ "expression": "vendor_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_base_clause_idx": {
+ "name": "gtc_vendor_clauses_base_clause_idx",
+ "columns": [
+ {
+ "expression": "base_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_parent_idx": {
+ "name": "gtc_vendor_clauses_parent_idx",
+ "columns": [
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_review_status_idx": {
+ "name": "gtc_vendor_clauses_review_status_idx",
+ "columns": [
+ {
+ "expression": "review_status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_vendor_clauses_vendor_document_id_gtc_vendor_documents_id_fk": {
+ "name": "gtc_vendor_clauses_vendor_document_id_gtc_vendor_documents_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "gtc_vendor_documents",
+ "columnsFrom": [
+ "vendor_document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_base_clause_id_gtc_clauses_id_fk": {
+ "name": "gtc_vendor_clauses_base_clause_id_gtc_clauses_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "gtc_clauses",
+ "columnsFrom": [
+ "base_clause_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_created_by_id_users_id_fk": {
+ "name": "gtc_vendor_clauses_created_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_updated_by_id_users_id_fk": {
+ "name": "gtc_vendor_clauses_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_vendor_documents": {
+ "name": "gtc_vendor_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "base_document_id": {
+ "name": "base_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'1.0'"
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_start_date": {
+ "name": "negotiation_start_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "negotiation_end_date": {
+ "name": "negotiation_end_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_date": {
+ "name": "approval_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_name": {
+ "name": "final_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_path": {
+ "name": "final_file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_size": {
+ "name": "final_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_vendor_documents_base_vendor_idx": {
+ "name": "gtc_vendor_documents_base_vendor_idx",
+ "columns": [
+ {
+ "expression": "base_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_vendor_idx": {
+ "name": "gtc_vendor_documents_vendor_idx",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_base_document_idx": {
+ "name": "gtc_vendor_documents_base_document_idx",
+ "columns": [
+ {
+ "expression": "base_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_review_status_idx": {
+ "name": "gtc_vendor_documents_review_status_idx",
+ "columns": [
+ {
+ "expression": "review_status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_vendor_documents_base_document_id_gtc_documents_id_fk": {
+ "name": "gtc_vendor_documents_base_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "base_document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_vendor_id_vendors_id_fk": {
+ "name": "gtc_vendor_documents_vendor_id_vendors_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_created_by_id_users_id_fk": {
+ "name": "gtc_vendor_documents_created_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_updated_by_id_users_id_fk": {
+ "name": "gtc_vendor_documents_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.code_groups": {
+ "name": "code_groups",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_format": {
+ "name": "code_format",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expressions": {
+ "name": "expressions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "control_type": {
+ "name": "control_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "code_groups_project_id_projects_id_fk": {
+ "name": "code_groups_project_id_projects_id_fk",
+ "tableFrom": "code_groups",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_group_id": {
+ "name": "unique_project_group_id",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.combo_box_settings": {
+ "name": "combo_box_settings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "combo_box_settings_code_group_id_code_groups_id_fk": {
+ "name": "combo_box_settings_code_group_id_code_groups_id_fk",
+ "tableFrom": "combo_box_settings",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_code_group_code": {
+ "name": "unique_code_group_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code_group_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_class_options_new": {
+ "name": "document_class_options_new",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_class_id": {
+ "name": "document_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "option_code": {
+ "name": "option_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_class_options_new_document_class_id_document_classes_id_fk": {
+ "name": "document_class_options_new_document_class_id_document_classes_id_fk",
+ "tableFrom": "document_class_options_new",
+ "tableTo": "document_classes",
+ "columnsFrom": [
+ "document_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_document_class_option": {
+ "name": "unique_document_class_option",
+ "nullsNotDistinct": false,
+ "columns": [
+ "document_class_id",
+ "option_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_classes": {
+ "name": "document_classes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_classes_project_id_projects_id_fk": {
+ "name": "document_classes_project_id_projects_id_fk",
+ "tableFrom": "document_classes",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "document_classes_code_group_id_code_groups_id_fk": {
+ "name": "document_classes_code_group_id_code_groups_id_fk",
+ "tableFrom": "document_classes",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_code": {
+ "name": "unique_project_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "code"
+ ]
+ },
+ "unique_project_value": {
+ "name": "unique_project_value",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "value"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_number_type_configs": {
+ "name": "document_number_type_configs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_number_type_id": {
+ "name": "document_number_type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sdq": {
+ "name": "sdq",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_number_type_configs_document_number_type_id_document_number_types_id_fk": {
+ "name": "document_number_type_configs_document_number_type_id_document_number_types_id_fk",
+ "tableFrom": "document_number_type_configs",
+ "tableTo": "document_number_types",
+ "columnsFrom": [
+ "document_number_type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "document_number_type_configs_code_group_id_code_groups_id_fk": {
+ "name": "document_number_type_configs_code_group_id_code_groups_id_fk",
+ "tableFrom": "document_number_type_configs",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_document_number_type_sdq": {
+ "name": "unique_document_number_type_sdq",
+ "nullsNotDistinct": false,
+ "columns": [
+ "document_number_type_id",
+ "sdq"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_number_types": {
+ "name": "document_number_types",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_number_types_project_id_projects_id_fk": {
+ "name": "document_number_types_project_id_projects_id_fk",
+ "tableFrom": "document_number_types",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_name": {
+ "name": "unique_project_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_attachments": {
+ "name": "legal_work_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_auto_generated": {
+ "name": "is_auto_generated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'request'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_attachments_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_attachments_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_attachments",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_requests": {
+ "name": "legal_work_requests",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_department": {
+ "name": "review_department",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inquiry_type": {
+ "name": "inquiry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "request_content": {
+ "name": "request_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "contract_project_name": {
+ "name": "contract_project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_amount": {
+ "name": "contract_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_counterparty": {
+ "name": "contract_counterparty",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "counterparty_type": {
+ "name": "counterparty_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "factual_relation": {
+ "name": "factual_relation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_number": {
+ "name": "project_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipowner_orderer": {
+ "name": "shipowner_orderer",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "governing_law": {
+ "name": "governing_law",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_type": {
+ "name": "project_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_requests_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_requests_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_requests",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_responses": {
+ "name": "legal_work_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_content": {
+ "name": "response_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_reviewer": {
+ "name": "response_reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_confirmer": {
+ "name": "response_confirmer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_approver": {
+ "name": "response_approver",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_re_revision": {
+ "name": "is_re_revision",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "parent_response_id": {
+ "name": "parent_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_responses_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_responses_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_responses",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_works": {
+ "name": "legal_works",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_urgent": {
+ "name": "is_urgent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "request_date": {
+ "name": "request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consultation_date": {
+ "name": "consultation_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expected_answer_date": {
+ "name": "expected_answer_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_completion_date": {
+ "name": "legal_completion_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer": {
+ "name": "reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_responder": {
+ "name": "legal_responder",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachment": {
+ "name": "has_attachment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_works_company_id_vendors_id_fk": {
+ "name": "legal_works_company_id_vendors_id_fk",
+ "tableFrom": "legal_works",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.consent_logs": {
+ "name": "consent_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "consent_logs_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_type": {
+ "name": "consent_type",
+ "type": "consent_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "consent_action",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "policy_version": {
+ "name": "policy_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_timestamp": {
+ "name": "action_timestamp",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "additional_data": {
+ "name": "additional_data",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "consent_logs_user_action_timestamp_idx": {
+ "name": "consent_logs_user_action_timestamp_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "action_timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "consent_logs_consent_type_idx": {
+ "name": "consent_logs_consent_type_idx",
+ "columns": [
+ {
+ "expression": "consent_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "consent_logs_action_idx": {
+ "name": "consent_logs_action_idx",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "consent_logs_user_id_users_id_fk": {
+ "name": "consent_logs_user_id_users_id_fk",
+ "tableFrom": "consent_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.policy_versions": {
+ "name": "policy_versions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "policy_versions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "policy_type": {
+ "name": "policy_type",
+ "type": "policy_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "effective_date": {
+ "name": "effective_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_current": {
+ "name": "is_current",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "policy_versions_type_version_idx": {
+ "name": "policy_versions_type_version_idx",
+ "columns": [
+ {
+ "expression": "policy_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "policy_versions_current_idx": {
+ "name": "policy_versions_current_idx",
+ "columns": [
+ {
+ "expression": "is_current",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "policy_versions_effective_date_idx": {
+ "name": "policy_versions_effective_date_idx",
+ "columns": [
+ {
+ "expression": "effective_date",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_consents": {
+ "name": "user_consents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_consents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_type": {
+ "name": "consent_type",
+ "type": "consent_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_status": {
+ "name": "consent_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "policy_version": {
+ "name": "policy_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consented_at": {
+ "name": "consented_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revoke_reason": {
+ "name": "revoke_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "user_consents_user_type_idx": {
+ "name": "user_consents_user_type_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "consent_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_consents_consented_at_idx": {
+ "name": "user_consents_consented_at_idx",
+ "columns": [
+ {
+ "expression": "consented_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_consents_policy_version_idx": {
+ "name": "user_consents_policy_version_idx",
+ "columns": [
+ {
+ "expression": "policy_version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_consents_user_id_users_id_fk": {
+ "name": "user_consents_user_id_users_id_fk",
+ "tableFrom": "user_consents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_companies": {
+ "name": "bidding_companies",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "invitation_status": {
+ "name": "invitation_status",
+ "type": "invitation_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "invited_at": {
+ "name": "invited_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_amount": {
+ "name": "pre_quote_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_submitted_at": {
+ "name": "pre_quote_submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote_selected": {
+ "name": "is_pre_quote_selected",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "final_quote_amount": {
+ "name": "final_quote_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_quote_submitted_at": {
+ "name": "final_quote_submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_winner": {
+ "name": "is_winner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_companies_bidding_id_biddings_id_fk": {
+ "name": "bidding_companies_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_companies",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_companies_company_id_vendors_id_fk": {
+ "name": "bidding_companies_company_id_vendors_id_fk",
+ "tableFrom": "bidding_companies",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_conditions": {
+ "name": "bidding_conditions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_conditions": {
+ "name": "tax_conditions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_delivery_date": {
+ "name": "contract_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_price_adjustment_applicable": {
+ "name": "is_price_adjustment_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_port": {
+ "name": "shipping_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destination_port": {
+ "name": "destination_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spare_part_options": {
+ "name": "spare_part_options",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_conditions_bidding_id_biddings_id_fk": {
+ "name": "bidding_conditions_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_conditions",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_documents": {
+ "name": "bidding_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "specification_meeting_id": {
+ "name": "specification_meeting_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "document_type": {
+ "name": "document_type",
+ "type": "document_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_documents_bidding_id_biddings_id_fk": {
+ "name": "bidding_documents_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_company_id_vendors_id_fk": {
+ "name": "bidding_documents_company_id_vendors_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_pr_item_id_pr_items_for_bidding_id_fk": {
+ "name": "bidding_documents_pr_item_id_pr_items_for_bidding_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "pr_items_for_bidding",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_specification_meeting_id_specification_meetings_id_fk": {
+ "name": "bidding_documents_specification_meeting_id_specification_meetings_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "specification_meetings",
+ "columnsFrom": [
+ "specification_meeting_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_notice_template": {
+ "name": "bidding_notice_template",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'standard'"
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'표준 입찰공고문'"
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.biddings": {
+ "name": "biddings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_number": {
+ "name": "bidding_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "contract_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bidding_type": {
+ "name": "bidding_type",
+ "type": "bidding_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "award_count": {
+ "name": "award_count",
+ "type": "award_count",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'single'"
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_date": {
+ "name": "pre_quote_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_registration_date": {
+ "name": "bidding_registration_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_start_date": {
+ "name": "submission_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_end_date": {
+ "name": "submission_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_date": {
+ "name": "evaluation_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_specification_meeting": {
+ "name": "has_specification_meeting",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "budget": {
+ "name": "budget",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_price": {
+ "name": "target_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_bid_price": {
+ "name": "final_bid_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_pr_document": {
+ "name": "has_pr_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "status": {
+ "name": "status",
+ "type": "bidding_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bidding_generated'"
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_email": {
+ "name": "manager_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_phone": {
+ "name": "manager_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "biddings_project_id_projects_id_fk": {
+ "name": "biddings_project_id_projects_id_fk",
+ "tableFrom": "biddings",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "biddings_bidding_number_unique": {
+ "name": "biddings_bidding_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "bidding_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_condition_responses": {
+ "name": "company_condition_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_company_id": {
+ "name": "bidding_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms_response": {
+ "name": "payment_terms_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_conditions_response": {
+ "name": "tax_conditions_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_contract_delivery_date": {
+ "name": "proposed_contract_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "price_adjustment_response": {
+ "name": "price_adjustment_response",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_response": {
+ "name": "incoterms_response",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_shipping_port": {
+ "name": "proposed_shipping_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_destination_port": {
+ "name": "proposed_destination_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spare_part_response": {
+ "name": "spare_part_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "additional_proposals": {
+ "name": "additional_proposals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote": {
+ "name": "is_pre_quote",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "company_condition_responses_bidding_company_id_bidding_companies_id_fk": {
+ "name": "company_condition_responses_bidding_company_id_bidding_companies_id_fk",
+ "tableFrom": "company_condition_responses",
+ "tableTo": "bidding_companies",
+ "columnsFrom": [
+ "bidding_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_pr_item_bids": {
+ "name": "company_pr_item_bids",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_company_id": {
+ "name": "bidding_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "proposed_delivery_date": {
+ "name": "proposed_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_unit_price": {
+ "name": "bid_unit_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_amount": {
+ "name": "bid_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "technical_specification": {
+ "name": "technical_specification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote": {
+ "name": "is_pre_quote",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "company_pr_item_bids_bidding_company_id_bidding_companies_id_fk": {
+ "name": "company_pr_item_bids_bidding_company_id_bidding_companies_id_fk",
+ "tableFrom": "company_pr_item_bids",
+ "tableTo": "bidding_companies",
+ "columnsFrom": [
+ "bidding_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "company_pr_item_bids_pr_item_id_pr_items_for_bidding_id_fk": {
+ "name": "company_pr_item_bids_pr_item_id_pr_items_for_bidding_id_fk",
+ "tableFrom": "company_pr_item_bids",
+ "tableTo": "pr_items_for_bidding",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_documents": {
+ "name": "pr_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "document_name": {
+ "name": "document_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "registered_by": {
+ "name": "registered_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_documents_bidding_id_biddings_id_fk": {
+ "name": "pr_documents_bidding_id_biddings_id_fk",
+ "tableFrom": "pr_documents",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_items_for_bidding": {
+ "name": "pr_items_for_bidding",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_info": {
+ "name": "project_info",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_info": {
+ "name": "item_info",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi": {
+ "name": "shi",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_delivery_date": {
+ "name": "requested_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "annual_unit_price": {
+ "name": "annual_unit_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity_unit": {
+ "name": "quantity_unit",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_weight": {
+ "name": "total_weight",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "weight_unit": {
+ "name": "weight_unit",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_spec_document": {
+ "name": "has_spec_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_items_for_bidding_bidding_id_biddings_id_fk": {
+ "name": "pr_items_for_bidding_bidding_id_biddings_id_fk",
+ "tableFrom": "pr_items_for_bidding",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.specification_meetings": {
+ "name": "specification_meetings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "meeting_date": {
+ "name": "meeting_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "meeting_time": {
+ "name": "meeting_time",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "location": {
+ "name": "location",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agenda": {
+ "name": "agenda",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "materials": {
+ "name": "materials",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "specification_meetings_bidding_id_biddings_id_fk": {
+ "name": "specification_meetings_bidding_id_biddings_id_fk",
+ "tableFrom": "specification_meetings",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_selection_results": {
+ "name": "vendor_selection_results",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selected_company_id": {
+ "name": "selected_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selection_reason": {
+ "name": "selection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_summary": {
+ "name": "evaluation_summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_result_documents": {
+ "name": "has_result_documents",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "selected_at": {
+ "name": "selected_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "selected_by": {
+ "name": "selected_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_selection_results_bidding_id_biddings_id_fk": {
+ "name": "vendor_selection_results_bidding_id_biddings_id_fk",
+ "tableFrom": "vendor_selection_results",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_selection_results_selected_company_id_vendors_id_fk": {
+ "name": "vendor_selection_results_selected_company_id_vendors_id_fk",
+ "tableFrom": "vendor_selection_results",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "selected_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_additional_info": {
+ "name": "vendor_additional_info",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "business_type": {
+ "name": "business_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "industry_type": {
+ "name": "industry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_size": {
+ "name": "company_size",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revenue": {
+ "name": "revenue",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "factory_established_date": {
+ "name": "factory_established_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_contract_terms": {
+ "name": "preferred_contract_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_additional_info_vendor_id_vendors_id_fk": {
+ "name": "vendor_additional_info_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_additional_info",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_business_contacts": {
+ "name": "vendor_business_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_type": {
+ "name": "contact_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "position": {
+ "name": "position",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department": {
+ "name": "department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "responsibility": {
+ "name": "responsibility",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_business_contacts_vendor_id_vendors_id_fk": {
+ "name": "vendor_business_contacts_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_business_contacts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_regular_registrations": {
+ "name": "vendor_regular_registrations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'audit_pass'"
+ },
+ "potential_code": {
+ "name": "potential_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_items": {
+ "name": "major_items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registration_request_date": {
+ "name": "registration_request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_department": {
+ "name": "assigned_department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_department_code": {
+ "name": "assigned_department_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_user": {
+ "name": "assigned_user",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_user_code": {
+ "name": "assigned_user_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_regular_registrations_vendor_id_vendors_id_fk": {
+ "name": "vendor_regular_registrations_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_regular_registrations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_assignment_history": {
+ "name": "department_domain_assignment_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_assignment_history_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "assignment_id": {
+ "name": "assignment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_values": {
+ "name": "previous_values",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_values": {
+ "name": "new_values",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_by": {
+ "name": "changed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_assignments": {
+ "name": "department_domain_assignments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_assignments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_domain": {
+ "name": "assigned_domain",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_mappings": {
+ "name": "department_domain_mappings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_mappings_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "assignment_id": {
+ "name": "assignment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_company_code": {
+ "name": "old_company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_department_code": {
+ "name": "old_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_department_name": {
+ "name": "old_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_company_code": {
+ "name": "new_company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_department_code": {
+ "name": "new_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_department_name": {
+ "name": "new_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mapping_status": {
+ "name": "mapping_status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "mapped_by": {
+ "name": "mapped_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mapped_at": {
+ "name": "mapped_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER": {
+ "name": "CUSTOMER_MASTER_BP_HEADER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_HEADER_unique": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_HEADER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "BP_HEADER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRNO": {
+ "name": "ADDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SMTP_ADDR": {
+ "name": "SMTP_ADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "FAX_EXTENS": {
+ "name": "FAX_EXTENS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_NUMBER": {
+ "name": "FAX_NUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CITY1": {
+ "name": "CITY1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY2": {
+ "name": "CITY2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOUSE_NUM1": {
+ "name": "HOUSE_NUM1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANGU": {
+ "name": "LANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME1": {
+ "name": "NAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME2": {
+ "name": "NAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME3": {
+ "name": "NAME3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME4": {
+ "name": "NAME4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NATION": {
+ "name": "NATION",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POST_CODE1": {
+ "name": "POST_CODE1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POST_CODE2": {
+ "name": "POST_CODE2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PO_BOX": {
+ "name": "PO_BOX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGION": {
+ "name": "REGION",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SORT1": {
+ "name": "SORT1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SORT2": {
+ "name": "SORT2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STREET": {
+ "name": "STREET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAXJURCODE": {
+ "name": "TAXJURCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TIME_ZONE": {
+ "name": "TIME_ZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TITLE": {
+ "name": "TITLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANSPZONE": {
+ "name": "TRANSPZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "R3_USER": {
+ "name": "R3_USER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_EXTENS": {
+ "name": "TEL_EXTENS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_NUMBER": {
+ "name": "TEL_NUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URI_ADDR": {
+ "name": "URI_ADDR",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANRED": {
+ "name": "ANRED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUFSD": {
+ "name": "AUFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAKSD": {
+ "name": "FAKSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GFORM": {
+ "name": "GFORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JMJAH": {
+ "name": "JMJAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JMZAH": {
+ "name": "JMZAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFREPRE": {
+ "name": "J_1KFREPRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFTBUS": {
+ "name": "J_1KFTBUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFTIND": {
+ "name": "J_1KFTIND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KATR1": {
+ "name": "KATR1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KDKG1": {
+ "name": "KDKG1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTOKD": {
+ "name": "KTOKD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KUNNR": {
+ "name": "KUNNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LIFNR": {
+ "name": "LIFNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LIFSD": {
+ "name": "LIFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NIELS": {
+ "name": "NIELS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NODEL": {
+ "name": "NODEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUGRP": {
+ "name": "PUGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPERR": {
+ "name": "SPERR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD1": {
+ "name": "STCD1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD2": {
+ "name": "STCD2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD3": {
+ "name": "STCD3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD4": {
+ "name": "STCD4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCEG": {
+ "name": "STCEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMJAH": {
+ "name": "UMJAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UWAER": {
+ "name": "UWAER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VBUND": {
+ "name": "VBUND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT_C": {
+ "name": "ZZAPPDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM_C": {
+ "name": "ZZAPPTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS_C": {
+ "name": "ZZAPPUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBA": {
+ "name": "ZZBA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBRSCH_C": {
+ "name": "ZZBRSCH_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCRMCD": {
+ "name": "ZZCRMCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKAR_C": {
+ "name": "ZZDOKAR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKNR_C": {
+ "name": "ZZDOKNR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKTL_C": {
+ "name": "ZZDOKTL_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKVR_C": {
+ "name": "ZZDOKVR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDUNS": {
+ "name": "ZZDUNS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTBU": {
+ "name": "ZZFTBU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTBUNM": {
+ "name": "ZZFTBUNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTDT": {
+ "name": "ZZFTDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTDTNM": {
+ "name": "ZZFTDTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTGT": {
+ "name": "ZZFTGT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTGTNM": {
+ "name": "ZZFTGTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZINBFLGC": {
+ "name": "ZZINBFLGC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT_C": {
+ "name": "ZZLAMDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM_C": {
+ "name": "ZZLAMTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS_C": {
+ "name": "ZZLAMUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZORT01_C": {
+ "name": "ZZORT01_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZORT02_C": {
+ "name": "ZZORT02_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREASON": {
+ "name": "ZZREASON",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT_C": {
+ "name": "ZZREGDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM_C": {
+ "name": "ZZREGTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS_C": {
+ "name": "ZZREGUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTCDT_C": {
+ "name": "ZZSTCDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTRAS_C": {
+ "name": "ZZSTRAS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSUBSEQ_C": {
+ "name": "ZZSUBSEQ_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AKONT": {
+ "name": "AKONT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BUKRS": {
+ "name": "BUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "FDGRV": {
+ "name": "FDGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPERR": {
+ "name": "SPERR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZAHLS": {
+ "name": "ZAHLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZTERM": {
+ "name": "ZTERM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZUAWA": {
+ "name": "ZUAWA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZWELS": {
+ "name": "ZWELS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AUFSD": {
+ "name": "AUFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AWAHR": {
+ "name": "AWAHR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BZIRK": {
+ "name": "BZIRK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAKSD": {
+ "name": "FAKSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO1": {
+ "name": "INCO1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO2": {
+ "name": "INCO2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KALKS": {
+ "name": "KALKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KDGRP": {
+ "name": "KDGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KONDA": {
+ "name": "KONDA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTGRD": {
+ "name": "KTGRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KURST": {
+ "name": "KURST",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KZAZU": {
+ "name": "KZAZU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LIFSD": {
+ "name": "LIFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LPRIO": {
+ "name": "LPRIO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLTYP": {
+ "name": "PLTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VERSG": {
+ "name": "VERSG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKBUR": {
+ "name": "VKBUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKGRP": {
+ "name": "VKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKORG": {
+ "name": "VKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VSBED": {
+ "name": "VSBED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VTWEG": {
+ "name": "VTWEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VWERK": {
+ "name": "VWERK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS": {
+ "name": "WAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZTERM": {
+ "name": "ZTERM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEFPA": {
+ "name": "DEFPA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KUNN2": {
+ "name": "KUNN2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PARVW": {
+ "name": "PARVW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PARZA": {
+ "name": "PARZA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ALAND": {
+ "name": "ALAND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TATYP": {
+ "name": "TATYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TAXKD": {
+ "name": "TAXKD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LAND1": {
+ "name": "LAND1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "STCEG": {
+ "name": "STCEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "TAXNUM": {
+ "name": "TAXNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAXTYPE": {
+ "name": "TAXTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BICD": {
+ "name": "BICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZAREA": {
+ "name": "BIZAREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CCCD": {
+ "name": "CCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COMPCD": {
+ "name": "COMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DEPTLVL": {
+ "name": "DEPTLVL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPTPOSNO": {
+ "name": "DEPTPOSNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHEMPID": {
+ "name": "DHEMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GNCD": {
+ "name": "GNCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PCCD": {
+ "name": "PCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDEPTCD": {
+ "name": "PDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDFROMDT": {
+ "name": "VALIDFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDTODT": {
+ "name": "VALIDTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_unique": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "DEPTCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRCNTRY": {
+ "name": "ADDRCNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AEDAT": {
+ "name": "AEDAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AENAM": {
+ "name": "AENAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AEZET": {
+ "name": "AEZET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BICD": {
+ "name": "BICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZAREA": {
+ "name": "BIZAREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSCADDR": {
+ "name": "BSCADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COMPCD": {
+ "name": "COMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COUNTRYCD": {
+ "name": "COUNTRYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSFROMDT": {
+ "name": "CSFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTODT": {
+ "name": "CSTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTIROLE": {
+ "name": "CTIROLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL": {
+ "name": "DEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPENDDT": {
+ "name": "DEPENDDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHJOBGRDCD": {
+ "name": "DHJOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHNAME": {
+ "name": "DHNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHSINGLID": {
+ "name": "DHSINGLID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISPATCH": {
+ "name": "DISPATCH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DPSTARTDT": {
+ "name": "DPSTARTDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTLADDR": {
+ "name": "DTLADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTLADDR2": {
+ "name": "DTLADDR2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMAIL": {
+ "name": "EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMPADR": {
+ "name": "EMPADR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMPTYPE": {
+ "name": "EMPTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ENGNAME": {
+ "name": "ENGNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EPID": {
+ "name": "EPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERDAT": {
+ "name": "ERDAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERNAM": {
+ "name": "ERNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERZET": {
+ "name": "ERZET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FORIGNFLG": {
+ "name": "FORIGNFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBCD": {
+ "name": "GJOBCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBDUTYCD": {
+ "name": "GJOBDUTYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBGRDCD": {
+ "name": "GJOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GNCD": {
+ "name": "GNCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HRMANAGE": {
+ "name": "HRMANAGE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IDNO": {
+ "name": "IDNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBCD": {
+ "name": "JOBCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBCLASS": {
+ "name": "JOBCLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBDUTYCD": {
+ "name": "JOBDUTYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDCD": {
+ "name": "JOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTL_EMP": {
+ "name": "KTL_EMP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVABSENCE": {
+ "name": "LVABSENCE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MBPHONE": {
+ "name": "MBPHONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME": {
+ "name": "NAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OKTL_EMPL": {
+ "name": "OKTL_EMPL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGBICD": {
+ "name": "ORGBICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGCOMPCD": {
+ "name": "ORGCOMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGCORPCD": {
+ "name": "ORGCORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGDEPTCD": {
+ "name": "ORGDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGPDEPCD": {
+ "name": "ORGPDEPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PAYPLC": {
+ "name": "PAYPLC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDEPTCD": {
+ "name": "PDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTLCODE": {
+ "name": "PSTLCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RETIRE": {
+ "name": "RETIRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SEX": {
+ "name": "SEX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SINGLEID": {
+ "name": "SINGLEID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SINGLRQ": {
+ "name": "SINGLRQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOCIALID": {
+ "name": "SOCIALID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOCIALID_DECR": {
+ "name": "SOCIALID_DECR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOJRNEMP": {
+ "name": "SOJRNEMP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNUM": {
+ "name": "TELNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TMPJDIV": {
+ "name": "TMPJDIV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USEDSYS": {
+ "name": "USEDSYS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALFROMDT": {
+ "name": "VALFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALTODT": {
+ "name": "VALTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WFREQUIRE": {
+ "name": "WFREQUIRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WORKPLC": {
+ "name": "WORKPLC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZPRFLG": {
+ "name": "ZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBUKRS": {
+ "name": "ZZBUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_unique": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "EMPID"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GTEXT": {
+ "name": "GTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BINM": {
+ "name": "BINM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COUNTRYNM": {
+ "name": "COUNTRYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "PCCD": {
+ "name": "PCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "KTEXT": {
+ "name": "KTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBGRDNM": {
+ "name": "JOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBDUTYNM": {
+ "name": "GJOBDUTYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBGRDNM": {
+ "name": "GJOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ISEXECUT": {
+ "name": "ISEXECUT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDTYPE": {
+ "name": "JOBGRDTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBNM": {
+ "name": "GJOBNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GNNM": {
+ "name": "GNNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBDUTYNM": {
+ "name": "JOBDUTYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ISEXECUT": {
+ "name": "ISEXECUT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDNM": {
+ "name": "JOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDTYPE": {
+ "name": "JOBGRDTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBNM": {
+ "name": "JOBNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BINM": {
+ "name": "BINM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADTL_01": {
+ "name": "ADTL_01",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADTL_02": {
+ "name": "ADTL_02",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "GRPCD": {
+ "name": "GRPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAINCD": {
+ "name": "MAINCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VALIDFROMDT": {
+ "name": "VALIDFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDTODT": {
+ "name": "VALIDTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_unique": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "GRPCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME",
+ "schema": "mdg",
+ "columns": {
+ "GRPCD": {
+ "name": "GRPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "NAME": {
+ "name": "NAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_GRPCD_EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_fk": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_GRPCD_EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_fk",
+ "tableFrom": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME",
+ "tableTo": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "GRPCD"
+ ],
+ "columnsTo": [
+ "GRPCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL": {
+ "name": "EQUP_MASTER_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EQUP_MASTER_MATL_MATNR_unique": {
+ "name": "EQUP_MASTER_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_CHARASGN": {
+ "name": "EQUP_MASTER_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_CHARASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_CHARASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_CHARASGN",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_CLASSASGN": {
+ "name": "EQUP_MASTER_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_CLASSASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_CLASSASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_CLASSASGN",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_DESC": {
+ "name": "EQUP_MASTER_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_DESC_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_DESC_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_DESC",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_PLNT": {
+ "name": "EQUP_MASTER_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_PLNT_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_PLNT_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_PLNT",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_UNIT": {
+ "name": "EQUP_MASTER_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_UNIT_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_UNIT_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_UNIT",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL": {
+ "name": "MATERIAL_MASTER_PART_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZACT": {
+ "name": "ZZACT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCERT": {
+ "name": "ZZCERT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZINSP": {
+ "name": "ZZINSP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMMTYP": {
+ "name": "ZZMMTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMRC": {
+ "name": "ZZMRC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPJT": {
+ "name": "ZZPJT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPLMID": {
+ "name": "ZZPLMID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRCD_SCV_CTLP": {
+ "name": "ZZPRCD_SCV_CTLP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREPMAT": {
+ "name": "ZZREPMAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_DIA": {
+ "name": "ZZREP_DIA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_DIA_UOM": {
+ "name": "ZZREP_DIA_UOM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_ITM_MATL": {
+ "name": "ZZREP_ITM_MATL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSMID": {
+ "name": "ZZSMID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTL": {
+ "name": "ZZSTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MATERIAL_MASTER_PART_MATL_MATNR_unique": {
+ "name": "MATERIAL_MASTER_PART_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_CHARASGN": {
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_CHARASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_CHARASGN",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_CLASSASGN": {
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_CLASSASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_CLASSASGN",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_DESC": {
+ "name": "MATERIAL_MASTER_PART_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_DESC_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_DESC_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_DESC",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_PLNT": {
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_PLNT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_PLNT",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_UNIT": {
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BREIT": {
+ "name": "BREIT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOEHE": {
+ "name": "HOEHE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAENG": {
+ "name": "LAENG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLUM": {
+ "name": "VOLUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_UNIT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_UNIT",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE": {
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_CD": {
+ "name": "MAT_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAT_ID": {
+ "name": "MAT_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_MAT_CD_unique": {
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_MAT_CD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MAT_CD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL": {
+ "name": "MODEL_MASTER_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKAR": {
+ "name": "ZZDOKAR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKNR": {
+ "name": "ZZDOKNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKTL": {
+ "name": "ZZDOKTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKVR": {
+ "name": "ZZDOKVR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMMTYP": {
+ "name": "ZZMMTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MODEL_MASTER_MATL_MATNR_unique": {
+ "name": "MODEL_MASTER_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_CHARASGN": {
+ "name": "MODEL_MASTER_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_CHARASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_CHARASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_CHARASGN",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_CLASSASGN": {
+ "name": "MODEL_MASTER_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_CLASSASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_CLASSASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_CLASSASGN",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_DESC": {
+ "name": "MODEL_MASTER_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_DESC_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_DESC_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_DESC",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_PLNT": {
+ "name": "MODEL_MASTER_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_PLNT_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_PLNT_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_PLNT",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_UNIT": {
+ "name": "MODEL_MASTER_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BREIT": {
+ "name": "BREIT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOEHE": {
+ "name": "HOEHE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAENG": {
+ "name": "LAENG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLUM": {
+ "name": "VOLUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_UNIT_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_UNIT_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_UNIT",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_CCTR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ABTEI": {
+ "name": "ABTEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ANRED": {
+ "name": "ANRED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZER": {
+ "name": "BKZER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZKP": {
+ "name": "BKZKP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZKS": {
+ "name": "BKZKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZOB": {
+ "name": "BKZOB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BUKRS": {
+ "name": "BUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CCTR": {
+ "name": "CCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATAB": {
+ "name": "DATAB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATBI": {
+ "name": "DATBI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATLT": {
+ "name": "DATLT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DRNAM": {
+ "name": "DRNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FUNC_AREA": {
+ "name": "FUNC_AREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GSBER": {
+ "name": "GSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KHINR": {
+ "name": "KHINR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOKRS": {
+ "name": "KOKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KOSAR": {
+ "name": "KOSAR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAND1": {
+ "name": "LAND1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MGEFL": {
+ "name": "MGEFL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME1": {
+ "name": "NAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME2": {
+ "name": "NAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME3": {
+ "name": "NAME3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME4": {
+ "name": "NAME4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORT01": {
+ "name": "ORT01",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORT02": {
+ "name": "ORT02",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PFACH": {
+ "name": "PFACH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZER": {
+ "name": "PKZER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZKP": {
+ "name": "PKZKP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZKS": {
+ "name": "PKZKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTL2": {
+ "name": "PSTL2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTLZ": {
+ "name": "PSTLZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGIO": {
+ "name": "REGIO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STRAS": {
+ "name": "STRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELBX": {
+ "name": "TELBX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELF1": {
+ "name": "TELF1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELF2": {
+ "name": "TELF2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELFX": {
+ "name": "TELFX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELTX": {
+ "name": "TELTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELX1": {
+ "name": "TELX1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXJCD": {
+ "name": "TXJCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK": {
+ "name": "VERAK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK_USE": {
+ "name": "VERAK_USE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VMETH": {
+ "name": "VMETH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS": {
+ "name": "WAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBRANCH": {
+ "name": "ZZBRANCH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFCTRI": {
+ "name": "ZZFCTRI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSECCODE": {
+ "name": "ZZSECCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSEGMENT": {
+ "name": "ZZSEGMENT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "CCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT",
+ "schema": "mdg",
+ "columns": {
+ "CCTR": {
+ "name": "CCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "KTEXT": {
+ "name": "KTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_fk": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_fk",
+ "tableFrom": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT",
+ "tableTo": "ORGANIZATION_MASTER_HRHMTB_CCTR",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "CCTR"
+ ],
+ "columnsTo": [
+ "CCTR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "CCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_PCTR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ABTEI": {
+ "name": "ABTEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATAB": {
+ "name": "DATAB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATBI": {
+ "name": "DATBI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KHINR": {
+ "name": "KHINR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOKRS": {
+ "name": "KOKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LOCK_IND": {
+ "name": "LOCK_IND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PCTR": {
+ "name": "PCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SEGMENT": {
+ "name": "SEGMENT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXJCD": {
+ "name": "TXJCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK": {
+ "name": "VERAK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK_USE": {
+ "name": "VERAK_USE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_PCTR_PCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR_PCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "PCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZBUKRS": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CURR_BUKR": {
+ "name": "CURR_BUKR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBUKRS": {
+ "name": "ZBUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZBUTXT": {
+ "name": "ZZBUTXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCITY": {
+ "name": "ZZCITY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCOUNTRY": {
+ "name": "ZZCOUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLANGU": {
+ "name": "ZZLANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_ZBUKRS_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_ZBUKRS_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZBUKRS"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZEKGRP": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZEKGRP": {
+ "name": "ZEKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKNAM": {
+ "name": "ZZEKNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKTEL": {
+ "name": "ZZEKTEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEMPNUM": {
+ "name": "ZZEMPNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSINGLE": {
+ "name": "ZZSINGLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZTELFX": {
+ "name": "ZZTELFX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZTEL_NUM": {
+ "name": "ZZTEL_NUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_ZEKGRP_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_ZEKGRP_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZEKGRP"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZEKORG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZEKORG": {
+ "name": "ZEKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKOTX": {
+ "name": "ZZEKOTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZEKORG_ZEKORG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG_ZEKORG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZEKORG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZGSBER": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZGSBER": {
+ "name": "ZGSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZGSBER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT",
+ "schema": "mdg",
+ "columns": {
+ "ZGSBER": {
+ "name": "ZGSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LANGU": {
+ "name": "LANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TXTMI": {
+ "name": "TXTMI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_fk": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_fk",
+ "tableFrom": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT",
+ "tableTo": "ORGANIZATION_MASTER_HRHMTB_ZGSBER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "ZGSBER"
+ ],
+ "columnsTo": [
+ "ZGSBER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZGSBER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZLGORT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZLGORT": {
+ "name": "ZLGORT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZWERKS": {
+ "name": "ZWERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLGOBE": {
+ "name": "ZZLGOBE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZLGORT_ZLGORT_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT_ZLGORT_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZLGORT"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZSPART": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZSPART": {
+ "name": "ZSPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZSPART_ZSPART_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART_ZSPART_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZSPART"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKBUR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CTRY_SOFF": {
+ "name": "CTRY_SOFF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_SOFF": {
+ "name": "LANG_SOFF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZVKBUR": {
+ "name": "ZVKBUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_ZVKBUR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_ZVKBUR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKBUR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKGRP": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVKGRP": {
+ "name": "ZVKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_ZVKGRP_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_ZVKGRP_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKGRP"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKORG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVKORG": {
+ "name": "ZVKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZBOAVO": {
+ "name": "ZZBOAVO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZKUNNR": {
+ "name": "ZZKUNNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZVKOKL": {
+ "name": "ZZVKOKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZWAERS": {
+ "name": "ZZWAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKORG_ZVKORG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG_ZVKORG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKORG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVSTEL": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ALAN_VSTE": {
+ "name": "ALAN_VSTE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AZON_VSTE": {
+ "name": "AZON_VSTE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTRY_SHPT": {
+ "name": "CTRY_SHPT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_SHPT": {
+ "name": "LANG_SHPT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZVSTEL": {
+ "name": "ZVSTEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFABKL": {
+ "name": "ZZFABKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAZBS": {
+ "name": "ZZLAZBS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZRIZBS": {
+ "name": "ZZRIZBS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_ZVSTEL_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_ZVSTEL_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVSTEL"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVTWEG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVTWEG": {
+ "name": "ZVTWEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_ZVTWEG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_ZVTWEG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVTWEG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZWERKS": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CTRY_PLNT": {
+ "name": "CTRY_PLNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_PLNT": {
+ "name": "LANG_PLNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZWERKS": {
+ "name": "ZWERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFABKL": {
+ "name": "ZZFABKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME1": {
+ "name": "ZZNAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME2": {
+ "name": "ZZNAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZWERKS_ZWERKS_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS_ZWERKS_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZWERKS"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.PROJECT_MASTER_CMCTB_PROJ_MAST": {
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AS_GRNT_PRD": {
+ "name": "AS_GRNT_PRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZLOC_CD": {
+ "name": "BIZLOC_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_DMN": {
+ "name": "BIZ_DMN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BP_DL_DT": {
+ "name": "BP_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHN_PROJ_TP": {
+ "name": "CHN_PROJ_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_CNTN_YN": {
+ "name": "CNRT_CNTN_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DL_DT": {
+ "name": "CNRT_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DT": {
+ "name": "CNRT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_RESV_YN": {
+ "name": "CNRT_RESV_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_PO_NO": {
+ "name": "CSTM_PO_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIGT_PDT_GRP": {
+ "name": "DIGT_PDT_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_BF_PROJ_NM": {
+ "name": "DL_BF_PROJ_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_CSTM_CD": {
+ "name": "DL_CSTM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_CD": {
+ "name": "DOCK_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_CHRGR": {
+ "name": "DSN_CHRGR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_GRNT_FN_DT": {
+ "name": "FIN_GRNT_FN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GENT_CNT": {
+ "name": "GENT_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOV": {
+ "name": "GOV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRNT_STDT": {
+ "name": "GRNT_STDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IMO_NO": {
+ "name": "IMO_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_NO": {
+ "name": "INQY_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_SEQ": {
+ "name": "INQY_SEQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IO_GB": {
+ "name": "IO_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNG_ACOT_DMN": {
+ "name": "MNG_ACOT_DMN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_ENGN_TP_CD": {
+ "name": "MN_ENGN_TP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSHIP_NO": {
+ "name": "MSHIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTTP": {
+ "name": "NTTP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_FN_DT": {
+ "name": "ORDR_GRNT_FN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_PRD": {
+ "name": "ORDR_GRNT_PRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_1": {
+ "name": "OWN_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_AB": {
+ "name": "OWN_AB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_NM": {
+ "name": "OWN_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_LVL_4": {
+ "name": "PDT_LVL_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRGS_STAT": {
+ "name": "PRGS_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_DT": {
+ "name": "PROJ_CRTE_REQ_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_EMPNO": {
+ "name": "PROJ_CRTE_REQ_EMPNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_PLN_DT": {
+ "name": "PROJ_DL_PLN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_RT_DT": {
+ "name": "PROJ_DL_RT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DSC": {
+ "name": "PROJ_DSC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DTL_TP": {
+ "name": "PROJ_DTL_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_ETC_TP": {
+ "name": "PROJ_ETC_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_GB": {
+ "name": "PROJ_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PROJ_PRGS_YN": {
+ "name": "PROJ_PRGS_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PROF": {
+ "name": "PROJ_PROF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_SCP": {
+ "name": "PROJ_SCP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_WBS_TP": {
+ "name": "PROJ_WBS_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRO_PROJ_NO": {
+ "name": "PRO_PROJ_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REF_NO": {
+ "name": "REF_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RLTD_PROJ": {
+ "name": "RLTD_PROJ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RL_DL_DT": {
+ "name": "RL_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SA_DT": {
+ "name": "SA_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_NO": {
+ "name": "SERS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_YN": {
+ "name": "SERS_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE": {
+ "name": "SHTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_GRP": {
+ "name": "SHTYPE_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND": {
+ "name": "SKND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRC_SYS_ID": {
+ "name": "SRC_SYS_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STDT": {
+ "name": "STDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_ACOT_CLSD_DT": {
+ "name": "SYS_ACOT_CLSD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_CNRT_CNT": {
+ "name": "TOT_CNRT_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WP_PROJ_TP": {
+ "name": "WP_PROJ_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "PROJECT_MASTER_CMCTB_PROJ_MAST_PROJ_NO_unique": {
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST_PROJ_NO_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "PROJ_NO"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER": {
+ "name": "VENDOR_MASTER_BP_HEADER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "VENDOR_MASTER_BP_HEADER_VNDRCD_unique": {
+ "name": "VENDOR_MASTER_BP_HEADER_VNDRCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "VNDRCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRNO": {
+ "name": "ADDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_TMZ": {
+ "name": "ADR_TMZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAX_JRDT_ZONE_CD": {
+ "name": "TAX_JRDT_ZONE_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_TAXNUM": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP_TP": {
+ "name": "ACNT_GRP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZR_NO": {
+ "name": "BIZR_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_CD": {
+ "name": "BIZ_UOM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_NM": {
+ "name": "BIZ_UOM_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_REG_NO": {
+ "name": "CO_REG_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_VLM": {
+ "name": "CO_VLM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_HOLD_ORDR": {
+ "name": "DEL_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_CD": {
+ "name": "DMST_TOP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_NM": {
+ "name": "DMST_TOP_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DNS_NO": {
+ "name": "DNS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_TP": {
+ "name": "DOC_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_VER": {
+ "name": "DOC_VER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIR_NM": {
+ "name": "FIR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_CD": {
+ "name": "GBL_TOP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_NM": {
+ "name": "GBL_TOP_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GIRO_VNDR_ORDR": {
+ "name": "GIRO_VNDR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INB_FLAG": {
+ "name": "INB_FLAG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_LCTN_CHK_NUM": {
+ "name": "INTL_LCTN_CHK_NUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS_CD": {
+ "name": "OVLAP_CAUS_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNT_VNDRCD": {
+ "name": "PTNT_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTN_DOC": {
+ "name": "PTN_DOC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_EMAIL": {
+ "name": "QLT_CHRGR_EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_NM": {
+ "name": "QLT_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_TELNO": {
+ "name": "QLT_CHRGR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_TM": {
+ "name": "REG_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_RESNO": {
+ "name": "REPR_RESNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TEL_NO": {
+ "name": "REP_TEL_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SB_WKA_SEQ": {
+ "name": "SB_WKA_SEQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCETX_RP_SEX_KEY": {
+ "name": "SRCETX_RP_SEX_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_CD_4": {
+ "name": "TX_CD_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VAT_REG_NO": {
+ "name": "VAT_REG_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNO": {
+ "name": "VNDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ACOT_CHRGR_FAXNO": {
+ "name": "ACOT_CHRGR_FAXNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_TELNO": {
+ "name": "ACOT_CHRGR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUTH_GRP": {
+ "name": "AUTH_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BF_VNDRCD": {
+ "name": "BF_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CSTM_VNDR_CLR_ORDR": {
+ "name": "CSTM_VNDR_CLR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTL_ACNT": {
+ "name": "CTL_ACNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_ACT_DT": {
+ "name": "FIN_IR_ACT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_CALC_DT": {
+ "name": "FIN_IR_CALC_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IATA_BIC_GB": {
+ "name": "IATA_BIC_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOGST_VNDR_TP": {
+ "name": "LOGST_VNDR_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEMO": {
+ "name": "MEMO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MIN_ORDR": {
+ "name": "MIN_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_CHRGR_EMAIL": {
+ "name": "MK_CHRGR_EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MOFFC_ACNT_NO": {
+ "name": "MOFFC_ACNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_INVC_ORDR": {
+ "name": "OVLAP_INVC_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLN_GRP": {
+ "name": "PLN_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TP": {
+ "name": "REP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_HOLD_ORDR": {
+ "name": "SPLY_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_MTHD": {
+ "name": "SPLY_MTHD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRT_SPLY_ORDR": {
+ "name": "SPRT_SPLY_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_CD": {
+ "name": "SRCE_TX_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NTN_CD": {
+ "name": "SRCE_TX_NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_BANK_SHRT_KEY": {
+ "name": "TRD_BANK_SHRT_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_ACNT_NO": {
+ "name": "VNDR_ACNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CHRGR_NM": {
+ "name": "VNDR_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DCHAG_CAUS": {
+ "name": "DCHAG_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CERT_NO": {
+ "name": "DCHAG_CERT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ED_DT": {
+ "name": "DCHAG_ED_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ST_DT": {
+ "name": "DCHAG_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RECIP_TP": {
+ "name": "RECIP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_IDENT_NO": {
+ "name": "SRCE_TX_IDENT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NO": {
+ "name": "SRCE_TX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_REL_ORDR": {
+ "name": "SRCE_TX_REL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_TP": {
+ "name": "SRCE_TX_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AT_PUR_ORD_ORDR": {
+ "name": "AT_PUR_ORD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CALC_SHM_GRP": {
+ "name": "CALC_SHM_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNFM_CTL_KEY": {
+ "name": "CNFM_CTL_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GR_BSE_INVC_VR": {
+ "name": "GR_BSE_INVC_VR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORD_CNFM_REQ_ORDR": {
+ "name": "ORD_CNFM_REQ_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_CAUS": {
+ "name": "PUR_HOLD_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_ORD_CUR": {
+ "name": "PUR_ORD_CUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_CHRGR_NM": {
+ "name": "SALE_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TELNO": {
+ "name": "VNDR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_REF_VNDRCD": {
+ "name": "ETC_REF_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_NO": {
+ "name": "PLNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDR_SUB_NO": {
+ "name": "VNDR_SUB_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "soap.soap_logs": {
+ "name": "soap_logs",
+ "schema": "soap",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "direction": {
+ "name": "direction",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "system": {
+ "name": "system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interface": {
+ "name": "interface",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endedAt": {
+ "name": "endedAt",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isSuccess": {
+ "name": "isSuccess",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "requestData": {
+ "name": "requestData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responseData": {
+ "name": "responseData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd": {
+ "name": "cmctb_cd",
+ "schema": "nonsap",
+ "columns": {
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD": {
+ "name": "CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD2": {
+ "name": "CD2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD3": {
+ "name": "CD3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "USR_DF_CHAR_1": {
+ "name": "USR_DF_CHAR_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_2": {
+ "name": "USR_DF_CHAR_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_3": {
+ "name": "USR_DF_CHAR_3",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_4": {
+ "name": "USR_DF_CHAR_4",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_5": {
+ "name": "USR_DF_CHAR_5",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_6": {
+ "name": "USR_DF_CHAR_6",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_7": {
+ "name": "USR_DF_CHAR_7",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_8": {
+ "name": "USR_DF_CHAR_8",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_9": {
+ "name": "USR_DF_CHAR_9",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_10": {
+ "name": "USR_DF_CHAR_10",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_11": {
+ "name": "USR_DF_CHAR_11",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_12": {
+ "name": "USR_DF_CHAR_12",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_13": {
+ "name": "USR_DF_CHAR_13",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_14": {
+ "name": "USR_DF_CHAR_14",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_15": {
+ "name": "USR_DF_CHAR_15",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_16": {
+ "name": "USR_DF_CHAR_16",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_17": {
+ "name": "USR_DF_CHAR_17",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_18": {
+ "name": "USR_DF_CHAR_18",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_19": {
+ "name": "USR_DF_CHAR_19",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_20": {
+ "name": "USR_DF_CHAR_20",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_1": {
+ "name": "USR_DF_CHK_1",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_2": {
+ "name": "USR_DF_CHK_2",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_3": {
+ "name": "USR_DF_CHK_3",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_4": {
+ "name": "USR_DF_CHK_4",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_5": {
+ "name": "USR_DF_CHK_5",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_6": {
+ "name": "USR_DF_CHK_6",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_7": {
+ "name": "USR_DF_CHK_7",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_8": {
+ "name": "USR_DF_CHK_8",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_1": {
+ "name": "USR_DF_DT_1",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_2": {
+ "name": "USR_DF_DT_2",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_3": {
+ "name": "USR_DF_DT_3",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_4": {
+ "name": "USR_DF_DT_4",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_1": {
+ "name": "USR_DF_TM_1",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_2": {
+ "name": "USR_DF_TM_2",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_3": {
+ "name": "USR_DF_TM_3",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_4": {
+ "name": "USR_DF_TM_4",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd_clf": {
+ "name": "cmctb_cd_clf",
+ "schema": "nonsap",
+ "columns": {
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd_clf_nm": {
+ "name": "cmctb_cd_clf_nm",
+ "schema": "nonsap",
+ "columns": {
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF_NM": {
+ "name": "CD_CLF_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRP_DSC": {
+ "name": "GRP_DSC",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cdnm": {
+ "name": "cmctb_cdnm",
+ "schema": "nonsap",
+ "columns": {
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD": {
+ "name": "CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD2": {
+ "name": "CD2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD3": {
+ "name": "CD3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CDNM": {
+ "name": "CDNM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRP_DSC": {
+ "name": "GRP_DSC",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_addr": {
+ "name": "cmctb_customer_addr",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOUSE_NR1": {
+ "name": "HOUSE_NR1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_cfpn": {
+ "name": "cmctb_customer_cfpn",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_compny": {
+ "name": "cmctb_customer_compny",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AR_ACNT_HDL_GB": {
+ "name": "AR_ACNT_HDL_GB",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AMT_RNE_GB": {
+ "name": "AMT_RNE_GB",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_PAY_FRM": {
+ "name": "VNDR_PAY_FRM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BILL_PAY_COND_CD": {
+ "name": "BILL_PAY_COND_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BILL_PAY_BLOC_CD": {
+ "name": "BILL_PAY_BLOC_CD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_general": {
+ "name": "cmctb_customer_general",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS": {
+ "name": "OVLAP_CAUS",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_TP": {
+ "name": "CSTM_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_BLOCK": {
+ "name": "DEL_BLOCK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COND_GRP_1": {
+ "name": "COND_GRP_1",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_GRP_NM": {
+ "name": "CSTM_GRP_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_2": {
+ "name": "TX_NO_2",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_3": {
+ "name": "TX_NO_3",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_4": {
+ "name": "TX_NO_4",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_REG_NO": {
+ "name": "TX_REG_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BA_CD": {
+ "name": "BA_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCH_COND_1": {
+ "name": "SRCH_COND_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCH_COND_2": {
+ "name": "SRCH_COND_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_DISP_NM": {
+ "name": "CITY_DISP_NM",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRM_CD": {
+ "name": "CRM_CD",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IN_FLAG": {
+ "name": "IN_FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDST_CD": {
+ "name": "INDST_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_TP": {
+ "name": "TX_NO_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DTM": {
+ "name": "REG_DTM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTGT_CD": {
+ "name": "FTGT_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTGT_NM": {
+ "name": "FTGT_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTDT_CD": {
+ "name": "FTDT_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTDT_NM": {
+ "name": "FTDT_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTBU_CD": {
+ "name": "FTBU_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTBU_NM": {
+ "name": "FTBU_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_repremail": {
+ "name": "cmctb_customer_repremail",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprfax": {
+ "name": "cmctb_customer_reprfax",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprtel": {
+ "name": "cmctb_customer_reprtel",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprurl": {
+ "name": "cmctb_customer_reprurl",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_sorg": {
+ "name": "cmctb_customer_sorg",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_REGN": {
+ "name": "SALE_REGN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_OFC": {
+ "name": "SALE_OFC",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_GRP": {
+ "name": "CSTM_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSBL": {
+ "name": "PSBL",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_CUR": {
+ "name": "TRD_CUR",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXRAT_TP": {
+ "name": "EXRAT_TP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRC_PRCS_DSC_CD": {
+ "name": "PRC_PRCS_DSC_CD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_STAT_GRP": {
+ "name": "CSTM_STAT_GRP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHIPMT_COND": {
+ "name": "SHIPMT_COND",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAX_TRD_QTY": {
+ "name": "MAX_TRD_QTY",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(84)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_ASGN_GRP": {
+ "name": "ACNT_ASGN_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_taxcd": {
+ "name": "cmctb_customer_taxcd",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DPRT_NTN": {
+ "name": "DPRT_NTN",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_CTG": {
+ "name": "TX_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CSTM_TX_CLF": {
+ "name": "CSTM_TX_CLF",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_taxnum": {
+ "name": "cmctb_customer_taxnum",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_bse": {
+ "name": "cmctb_mat_bse",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SM_CD": {
+ "name": "SM_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_ID": {
+ "name": "MAT_ID",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_TP": {
+ "name": "MAT_TP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_GB": {
+ "name": "MAT_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_DTL": {
+ "name": "MAT_DTL",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_DTL_SPEC": {
+ "name": "MAT_DTL_SPEC",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATL": {
+ "name": "MATL",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OLD_MAT_NO": {
+ "name": "OLD_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SBST_MAT_NO": {
+ "name": "SBST_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UOM": {
+ "name": "UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MRC": {
+ "name": "MRC",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STOR_MAT_ORDR": {
+ "name": "STOR_MAT_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STYPE": {
+ "name": "STYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS": {
+ "name": "CLS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGT": {
+ "name": "WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NET_WGT": {
+ "name": "NET_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGT_UOM": {
+ "name": "WGT_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH": {
+ "name": "LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH_2": {
+ "name": "LTH_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH": {
+ "name": "WTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH_2": {
+ "name": "WTH_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "THK": {
+ "name": "THK",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STD": {
+ "name": "STD",
+ "type": "varchar(70)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROF_STD": {
+ "name": "PROF_STD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CBL_OUT_DIA": {
+ "name": "CBL_OUT_DIA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTRM_MAT_YN": {
+ "name": "LTRM_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNT_AREA": {
+ "name": "PNT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTIN_AREA": {
+ "name": "PNTIN_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTIN_SPEC": {
+ "name": "PNTIN_SPEC",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_AREA": {
+ "name": "PNTOUT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_1": {
+ "name": "PNTOUT_SPEC_1",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_2": {
+ "name": "PNTOUT_SPEC_2",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_3": {
+ "name": "PNTOUT_SPEC_3",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RT_INSPEC": {
+ "name": "RT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UT_INSPEC": {
+ "name": "UT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MT_INSPEC": {
+ "name": "MT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PT_INSPEC": {
+ "name": "PT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_DWG_NO": {
+ "name": "MK_DWG_NO",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CUT_DWG_NO": {
+ "name": "CUT_DWG_NO",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_SPL_NO": {
+ "name": "PIPE_SPL_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_LINE_NO": {
+ "name": "PIPE_LINE_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_CLAS": {
+ "name": "PIPE_CLAS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FLUID_KND": {
+ "name": "FLUID_KND",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_ITM_MATL": {
+ "name": "REP_ITM_MATL",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA": {
+ "name": "REP_DIA",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA_UOM": {
+ "name": "REP_DIA_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_SCH": {
+ "name": "REP_SCH",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA_LTH": {
+ "name": "REP_DIA_LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DBLN_GB": {
+ "name": "DBLN_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_GRD": {
+ "name": "PIPE_GRD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HTRET_YN": {
+ "name": "HTRET_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BA_GALV_SPEC": {
+ "name": "BA_GALV_SPEC",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SSIDE_YN": {
+ "name": "SSIDE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTR_PIPE_YN": {
+ "name": "PNTR_PIPE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UBOLT_YN": {
+ "name": "UBOLT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTLP_PRCD_PNT": {
+ "name": "CTLP_PRCD_PNT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCD_SCV_CTLP": {
+ "name": "PRCD_SCV_CTLP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PMI_INSPEC": {
+ "name": "PMI_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTRPRS": {
+ "name": "WTRPRS",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLV_FIT_NO": {
+ "name": "VLV_FIT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_NO": {
+ "name": "TAG_NO",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_SB_NO": {
+ "name": "TAG_SB_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NM_PLATE_TP": {
+ "name": "NM_PLATE_TP",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NM_PLATE_SVC_NM": {
+ "name": "NM_PLATE_SVC_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VRCS_MAT_NO": {
+ "name": "VRCS_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRSM_FIT_NO": {
+ "name": "TRSM_FIT_NO",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLV_OPT_CD_LIST": {
+ "name": "VLV_OPT_CD_LIST",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_REQ_NO": {
+ "name": "PUR_REQ_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ITM_NO": {
+ "name": "ITM_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MDL_NO": {
+ "name": "MDL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BL_NO": {
+ "name": "BL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_EQP_NO": {
+ "name": "VNDR_EQP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BOX_NO": {
+ "name": "BOX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMT_NO": {
+ "name": "MMT_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INSTL_LOC": {
+ "name": "INSTL_LOC",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_EQP_YN": {
+ "name": "MN_EQP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIXED_MAT_YN": {
+ "name": "FIXED_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRE_YN": {
+ "name": "SPRE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOOL_YN": {
+ "name": "TOOL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CBL_YN": {
+ "name": "CBL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_INSTL_MAT_YN": {
+ "name": "OWN_INSTL_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NONINSTL_MAT_YN": {
+ "name": "NONINSTL_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BLK_NO": {
+ "name": "BLK_NO",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GYEL": {
+ "name": "GYEL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LNK_PTLST_NO": {
+ "name": "LNK_PTLST_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AREA": {
+ "name": "AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STOR_LOC": {
+ "name": "STOR_LOC",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SGUB_WGT": {
+ "name": "SGUB_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DGUB_WGT": {
+ "name": "DGUB_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_SKL": {
+ "name": "DSN_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RMK": {
+ "name": "RMK",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_DT": {
+ "name": "DEL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_STAT": {
+ "name": "MAT_STAT",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_SYS_NO": {
+ "name": "IF_SYS_NO",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_1": {
+ "name": "GLAND_SPEC_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_2": {
+ "name": "GLAND_SPEC_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_3": {
+ "name": "GLAND_SPEC_3",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MCT_MDLE_STD_1": {
+ "name": "MCT_MDLE_STD_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MCT_MDLE_STD_2": {
+ "name": "MCT_MDLE_STD_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BEELE_RISE": {
+ "name": "BEELE_RISE",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAX_DRUM_LTH": {
+ "name": "MAX_DRUM_LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DTM": {
+ "name": "AGR_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISPLN": {
+ "name": "DISPLN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LRG_KWK": {
+ "name": "LRG_KWK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTL_KWK": {
+ "name": "DTL_KWK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SP_INSP_GB": {
+ "name": "SP_INSP_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_4": {
+ "name": "PNTOUT_SPEC_4",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFE_MAT_NO": {
+ "name": "OFE_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFE_CAB_YN": {
+ "name": "OFE_CAB_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INSTL_PSB_CNT": {
+ "name": "INSTL_PSB_CNT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CUTL_ML_GB": {
+ "name": "CUTL_ML_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FCM_INSP": {
+ "name": "FCM_INSP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_DT": {
+ "name": "HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_LIFT_DT": {
+ "name": "HOLD_LIFT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_KND_GB": {
+ "name": "MAT_KND_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BATCH_MNG_ORDR": {
+ "name": "BATCH_MNG_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INPR_ID": {
+ "name": "FS_INPR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INP_DTM": {
+ "name": "FS_INP_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHGR_ID": {
+ "name": "FIN_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHG_DTM": {
+ "name": "FIN_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DWG_FILE_NM": {
+ "name": "DWG_FILE_NM",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_NO_CHG_DT": {
+ "name": "TAG_NO_CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SUB_EQP_YN": {
+ "name": "SUB_EQP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATT_MAT_YN": {
+ "name": "ATT_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_REV_NO": {
+ "name": "DSN_REV_NO",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR1": {
+ "name": "USR_DF_CHAR1",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR2": {
+ "name": "USR_DF_CHAR2",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR3": {
+ "name": "USR_DF_CHAR3",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR4": {
+ "name": "USR_DF_CHAR4",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR5": {
+ "name": "USR_DF_CHAR5",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_clas": {
+ "name": "cmctb_mat_clas",
+ "schema": "nonsap",
+ "columns": {
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CLAS_NM": {
+ "name": "CLAS_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_DTL": {
+ "name": "CLAS_DTL",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRNT_CLAS_CD": {
+ "name": "PRNT_CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_LVL": {
+ "name": "CLAS_LVL",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UOM": {
+ "name": "UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STYPE": {
+ "name": "STYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRD_MATL": {
+ "name": "GRD_MATL",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSE_UOM": {
+ "name": "BSE_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_clas_spchar": {
+ "name": "cmctb_mat_clas_spchar",
+ "schema": "nonsap",
+ "columns": {
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_SEQ": {
+ "name": "SPCHAR_SEQ",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNDT_YN": {
+ "name": "MNDT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_clas_spchar_CLAS_CD_SPCHAR_CD_pk": {
+ "name": "cmctb_mat_clas_spchar_CLAS_CD_SPCHAR_CD_pk",
+ "columns": [
+ "CLAS_CD",
+ "SPCHAR_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_dsc": {
+ "name": "cmctb_mat_dsc",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAT_DTL": {
+ "name": "MAT_DTL",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_plnt": {
+ "name": "cmctb_mat_plnt",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PLNT": {
+ "name": "PLNT",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DELV_UOM": {
+ "name": "DELV_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EA_BTCH_ND_GB": {
+ "name": "EA_BTCH_ND_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_CLF": {
+ "name": "PRCR_CLF",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_CHRGR_CD": {
+ "name": "PUR_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_CHRGR_CD": {
+ "name": "PRCR_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOODS_CHRGR_CD": {
+ "name": "GOODS_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_LT": {
+ "name": "PUR_LT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MRP_TP": {
+ "name": "MRP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_STAT": {
+ "name": "MAT_STAT",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BULK_MAT_ORDR": {
+ "name": "BULK_MAT_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_TP": {
+ "name": "PRCR_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SFTY_STCK_QTY": {
+ "name": "SFTY_STCK_QTY",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SER_PROF": {
+ "name": "SER_PROF",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BATCH_MNG_ORDR": {
+ "name": "BATCH_MNG_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SP_PRCR_TP": {
+ "name": "SP_PRCR_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar": {
+ "name": "cmctb_mat_spchar",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_DTL": {
+ "name": "SPCHAR_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_CD": {
+ "name": "SPCHAR_VAL_CD",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_DTL": {
+ "name": "SPCHAR_VAL_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_NUM": {
+ "name": "SPCHAR_VAL_NUM",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_UOM": {
+ "name": "SPCHAR_VAL_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar_mast": {
+ "name": "cmctb_mat_spchar_mast",
+ "schema": "nonsap",
+ "columns": {
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_DTL": {
+ "name": "SPCHAR_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_TP": {
+ "name": "SPCHAR_TP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_UOM": {
+ "name": "SPCHAR_VAL_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_YN": {
+ "name": "SPCHAR_VAL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_GRP": {
+ "name": "SPCHAR_GRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_spchar_mast_SPCHAR_CD_pk": {
+ "name": "cmctb_mat_spchar_mast_SPCHAR_CD_pk",
+ "columns": [
+ "SPCHAR_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar_val": {
+ "name": "cmctb_mat_spchar_val",
+ "schema": "nonsap",
+ "columns": {
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_VAL_CD": {
+ "name": "SPCHAR_VAL_CD",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_VAL_DTL": {
+ "name": "SPCHAR_VAL_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_spchar_val_SPCHAR_CD_SPCHAR_VAL_CD_pk": {
+ "name": "cmctb_mat_spchar_val_SPCHAR_CD_SPCHAR_VAL_CD_pk",
+ "columns": [
+ "SPCHAR_CD",
+ "SPCHAR_VAL_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_uom": {
+ "name": "cmctb_mat_uom",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SBST_UOM": {
+ "name": "SBST_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CNVRT_FCTR_1": {
+ "name": "CNVRT_FCTR_1",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNVRT_FCTR_2": {
+ "name": "CNVRT_FCTR_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH": {
+ "name": "LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH": {
+ "name": "WTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HGT": {
+ "name": "HGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SZ_UOM": {
+ "name": "SZ_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_bizcls": {
+ "name": "cmctb_proj_bizcls",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_mast": {
+ "name": "cmctb_proj_mast",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MSHIP_NO": {
+ "name": "MSHIP_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_NO": {
+ "name": "SERS_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REF_NO": {
+ "name": "REF_NO",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND": {
+ "name": "SKND",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE": {
+ "name": "SHTYPE",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_CD": {
+ "name": "DOCK_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_1": {
+ "name": "OWN_1",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DT": {
+ "name": "CNRT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DL_DT": {
+ "name": "CNRT_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DSC": {
+ "name": "PROJ_DSC",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_GB": {
+ "name": "PROJ_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_NM": {
+ "name": "OWN_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_SKND2": {
+ "name": "NEW_SKND2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_AB": {
+ "name": "OWN_AB",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHINA_YN": {
+ "name": "CHINA_YN",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DTL_TP": {
+ "name": "PROJ_DTL_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PROF": {
+ "name": "PROJ_PROF",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_NO": {
+ "name": "INQY_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_SEQ": {
+ "name": "INQY_SEQ",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTTP": {
+ "name": "NTTP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RLTD_PROJ": {
+ "name": "RLTD_PROJ",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIGT_PDT_GRP": {
+ "name": "DIGT_PDT_GRP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WP_PROJ_TP": {
+ "name": "WP_PROJ_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_CNRT_CNT": {
+ "name": "TOT_CNRT_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_ETC_TP": {
+ "name": "PROJ_ETC_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRC_SYS_ID": {
+ "name": "SRC_SYS_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRGS_STAT": {
+ "name": "PRGS_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_CSTM_CD": {
+ "name": "DL_CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_LVL_4": {
+ "name": "PDT_LVL_4",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AS_GRNT_PRD": {
+ "name": "AS_GRNT_PRD",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RL_DL_DT": {
+ "name": "RL_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SA_DT": {
+ "name": "SA_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOV": {
+ "name": "GOV",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_BF_PROJ_NM": {
+ "name": "DL_BF_PROJ_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IMO_NO": {
+ "name": "IMO_NO",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZLOC_CD": {
+ "name": "BIZLOC_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNG_ACOT_DMN": {
+ "name": "MNG_ACOT_DMN",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_DMN": {
+ "name": "BIZ_DMN",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_CNTN_YN": {
+ "name": "CNRT_CNTN_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_RESV_YN": {
+ "name": "CNRT_RESV_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PRGS_YN": {
+ "name": "PROJ_PRGS_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_ACOT_CLSD_DT": {
+ "name": "SYS_ACOT_CLSD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_SCP": {
+ "name": "PROJ_SCP",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOA": {
+ "name": "LOA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_ENGN_TP_CD": {
+ "name": "MN_ENGN_TP_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPD": {
+ "name": "SPD",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GT": {
+ "name": "GT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BP_DL_DT": {
+ "name": "BP_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_GRP": {
+ "name": "SHTYPE_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_EMPNO": {
+ "name": "PROJ_CRTE_REQ_EMPNO",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_DT": {
+ "name": "PROJ_CRTE_REQ_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IO_GB": {
+ "name": "IO_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_PO_NO": {
+ "name": "CSTM_PO_NO",
+ "type": "varchar(35)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GENT_CNT": {
+ "name": "GENT_CNT",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_PRD": {
+ "name": "ORDR_GRNT_PRD",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_FN_DT": {
+ "name": "ORDR_GRNT_FN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_CHRGR": {
+ "name": "DSN_CHRGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_PROJ_NM": {
+ "name": "DL_AF_PROJ_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_RL_CLNT": {
+ "name": "DL_AF_RL_CLNT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_SHPSRV_SCP": {
+ "name": "DL_AF_SHPSRV_SCP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_NTTP": {
+ "name": "DL_AF_NTTP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_CLS": {
+ "name": "DL_AF_CLS",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_CALL_SIGN": {
+ "name": "DL_AF_CALL_SIGN",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_TEL_NO": {
+ "name": "DL_AF_TEL_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_FAX_NO": {
+ "name": "DL_AF_FAX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_EMAIL_ADR": {
+ "name": "DL_AF_EMAIL_ADR",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_WBS_TP": {
+ "name": "PROJ_WBS_TP",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHN_PROJ_TP": {
+ "name": "CHN_PROJ_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_GRNT_FN_DT": {
+ "name": "FIN_GRNT_FN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STDT": {
+ "name": "STDT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_YN": {
+ "name": "SERS_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRO_PROJ_NO": {
+ "name": "PRO_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PBSD_PROJ_NO": {
+ "name": "PBSD_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PBSD_SHIP_NM": {
+ "name": "PBSD_SHIP_NM",
+ "type": "varchar(150)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_PLN_DT": {
+ "name": "PROJ_DL_PLN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_RT_DT": {
+ "name": "PROJ_DL_RT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_AREA": {
+ "name": "TOT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXMPT_AREA": {
+ "name": "EXMPT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXMPT_RAT": {
+ "name": "EXMPT_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNCT_PROJ_NO": {
+ "name": "CNCT_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EQP_DTL_YN": {
+ "name": "EQP_DTL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXP_YN": {
+ "name": "EXP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACT_MH_YN": {
+ "name": "ACT_MH_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPEC": {
+ "name": "SPEC",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSGN_LIFE": {
+ "name": "DSGN_LIFE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WK_ENV_WT_VAL_YN": {
+ "name": "WK_ENV_WT_VAL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRNT_STDT": {
+ "name": "GRNT_STDT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TMH_ADPT_YN": {
+ "name": "TMH_ADPT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZV_YN": {
+ "name": "ZV_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SEC_YN": {
+ "name": "SEC_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_wbs": {
+ "name": "cmctb_proj_wbs",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "WBS_ELMT": {
+ "name": "WBS_ELMT",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "WBS_ELMT_NM": {
+ "name": "WBS_ELMT_NM",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_LVL": {
+ "name": "WBS_LVL",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FLAG": {
+ "name": "FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_INSD_ELMT": {
+ "name": "WBS_INSD_ELMT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HGRK_WBS_ELMT": {
+ "name": "HGRK_WBS_ELMT",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_STAT": {
+ "name": "SYS_STAT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_1": {
+ "name": "WBS_ELMT_1",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_2": {
+ "name": "WBS_ELMT_2",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_3": {
+ "name": "WBS_ELMT_3",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_4": {
+ "name": "WBS_ELMT_4",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_5": {
+ "name": "WBS_ELMT_5",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_6": {
+ "name": "WBS_ELMT_6",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_7": {
+ "name": "WBS_ELMT_7",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_8": {
+ "name": "WBS_ELMT_8",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_9": {
+ "name": "WBS_ELMT_9",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_10": {
+ "name": "WBS_ELMT_10",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_addr": {
+ "name": "cmctb_vendor_addr",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAX_JRDT_ZONE_CD": {
+ "name": "TAX_JRDT_ZONE_CD",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_TMZ": {
+ "name": "ADR_TMZ",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_compny": {
+ "name": "cmctb_vendor_compny",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CTL_ACNT": {
+ "name": "CTL_ACNT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLN_GRP": {
+ "name": "PLN_GRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BF_VNDRCD": {
+ "name": "BF_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_INVC_ORDR": {
+ "name": "OVLAP_INVC_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_MTHD": {
+ "name": "SPLY_MTHD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_HOLD_ORDR": {
+ "name": "SPLY_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_BANK_SHRT_KEY": {
+ "name": "TRD_BANK_SHRT_KEY",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NTN_CD": {
+ "name": "SRCE_TX_NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MIN_ORDR": {
+ "name": "MIN_ORDR",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRT_SPLY_ORDR": {
+ "name": "SPRT_SPLY_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_VNDR_CLR_ORDR": {
+ "name": "CSTM_VNDR_CLR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_CD": {
+ "name": "SRCE_TX_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IATA_BIC_GB": {
+ "name": "IATA_BIC_GB",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TP": {
+ "name": "REP_TP",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOGST_VNDR_TP": {
+ "name": "LOGST_VNDR_TP",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_ACNT_NO": {
+ "name": "VNDR_ACNT_NO",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CHRGR_NM": {
+ "name": "VNDR_CHRGR_NM",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_TELNO": {
+ "name": "ACOT_CHRGR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUTH_GRP": {
+ "name": "AUTH_GRP",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_CALC_DT": {
+ "name": "FIN_IR_CALC_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_ACT_DT": {
+ "name": "FIN_IR_ACT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_FAXNO": {
+ "name": "ACOT_CHRGR_FAXNO",
+ "type": "varchar(31)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_CHRGR_EMAIL": {
+ "name": "MK_CHRGR_EMAIL",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEMO": {
+ "name": "MEMO",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MOFFC_ACNT_NO": {
+ "name": "MOFFC_ACNT_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_vendor_compny_VNDRCD_CO_CD_pk": {
+ "name": "cmctb_vendor_compny_VNDRCD_CO_CD_pk",
+ "columns": [
+ "VNDRCD",
+ "CO_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_general": {
+ "name": "cmctb_vendor_general",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP_TP": {
+ "name": "ACNT_GRP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DTM": {
+ "name": "REG_DTM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TEL_NO": {
+ "name": "REP_TEL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_FAX_NO": {
+ "name": "REP_FAX_NO",
+ "type": "varchar(31)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZR_NO": {
+ "name": "BIZR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_REG_NO": {
+ "name": "CO_REG_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_CD_4": {
+ "name": "TX_CD_4",
+ "type": "varchar(54)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_INST_DT": {
+ "name": "CO_INST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TP": {
+ "name": "VNDR_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_CD": {
+ "name": "GBL_TOP_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_NM": {
+ "name": "GBL_TOP_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_CD": {
+ "name": "DMST_TOP_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_NM": {
+ "name": "DMST_TOP_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_CD": {
+ "name": "BIZ_UOM_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_NM": {
+ "name": "BIZ_UOM_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DNS_NO": {
+ "name": "DNS_NO",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VAT_REG_NO": {
+ "name": "VAT_REG_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GIRO_VNDR_ORDR": {
+ "name": "GIRO_VNDR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNT_VNDRCD": {
+ "name": "PTNT_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_NM": {
+ "name": "QLT_CHRGR_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_TELNO": {
+ "name": "QLT_CHRGR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_EMAIL": {
+ "name": "QLT_CHRGR_EMAIL",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SB_WKA_SEQ": {
+ "name": "SB_WKA_SEQ",
+ "type": "varchar(16)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS_CD": {
+ "name": "OVLAP_CAUS_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_TP": {
+ "name": "DOC_TP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTN_DOC": {
+ "name": "PTN_DOC",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_VER": {
+ "name": "DOC_VER",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INB_FLAG": {
+ "name": "INB_FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_HOLD_ORDR": {
+ "name": "DEL_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_LCTN_CHK_NUM": {
+ "name": "INTL_LCTN_CHK_NUM",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCETX_RP_SEX_KEY": {
+ "name": "SRCETX_RP_SEX_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CNRT_CHRGR_1": {
+ "name": "VNDR_CNRT_CHRGR_1",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CNRT_CHRGR_2": {
+ "name": "VNDR_CNRT_CHRGR_2",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_RESNO": {
+ "name": "REPR_RESNO",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_VLM": {
+ "name": "CO_VLM",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_grp": {
+ "name": "cmctb_vendor_grp",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_GRP_CD": {
+ "name": "BIZ_GRP_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER_ID": {
+ "name": "CRTER_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_inco": {
+ "name": "cmctb_vendor_inco",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDRNM": {
+ "name": "VNDRNM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRTNR_GB": {
+ "name": "PRTNR_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_CD": {
+ "name": "INCO_PRTNR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_1": {
+ "name": "INCO_PRTNR_WKA_1",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_2": {
+ "name": "INCO_PRTNR_WKA_2",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_3": {
+ "name": "INCO_PRTNR_WKA_3",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JBTYPE_CD": {
+ "name": "JBTYPE_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JBTYPE_CD_2": {
+ "name": "JBTYPE_CD_2",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDV_CO_GB": {
+ "name": "INDV_CO_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_FOND_YN": {
+ "name": "INCO_FOND_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_NO": {
+ "name": "DOCK_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OCMP_INP_DT": {
+ "name": "OCMP_INP_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_DUSE_DT": {
+ "name": "INCO_DUSE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDST_INS_PMRAT": {
+ "name": "INDST_INS_PMRAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_PFRM_GRAMT": {
+ "name": "CNRT_PFRM_GRAMT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGE_RAT": {
+ "name": "WGE_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_DEPTCD_1": {
+ "name": "CRSPD_DEPTCD_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_DEPTCD_2": {
+ "name": "CRSPD_DEPTCD_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_TEAM_BLNG": {
+ "name": "CRSPD_TEAM_BLNG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_ITM_1": {
+ "name": "INCO_PRTNR_ITM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_ITM_2": {
+ "name": "INCO_PRTNR_ITM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFC_LOC": {
+ "name": "OFC_LOC",
+ "type": "varchar(240)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_OCMP_CARR": {
+ "name": "REP_OCMP_CARR",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_DUSE_CAUS": {
+ "name": "INCO_DUSE_CAUS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_NO": {
+ "name": "TEL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR1": {
+ "name": "ADR1",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR2": {
+ "name": "ADR2",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OLD_VNDRCD": {
+ "name": "OLD_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TREE_NUM": {
+ "name": "TREE_NUM",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_USR_ID": {
+ "name": "CRTE_USR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_USR_ID": {
+ "name": "CHG_USR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UPR_JBTYPE": {
+ "name": "UPR_JBTYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBYBP": {
+ "name": "ZBYBP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RMK": {
+ "name": "RMK",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WDL_PLN_YN": {
+ "name": "WDL_PLN_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGE_DELY_DVL": {
+ "name": "WGE_DELY_DVL",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESCROW_YN": {
+ "name": "ESCROW_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_porg": {
+ "name": "cmctb_vendor_porg",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORD_CUR": {
+ "name": "PUR_ORD_CUR",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CALC_SHM_GRP": {
+ "name": "CALC_SHM_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GR_BSE_INVC_VR": {
+ "name": "GR_BSE_INVC_VR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AT_PUR_ORD_ORDR": {
+ "name": "AT_PUR_ORD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORD_CNFM_REQ_ORDR": {
+ "name": "ORD_CNFM_REQ_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_CHRGR_NM": {
+ "name": "SALE_CHRGR_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TELNO": {
+ "name": "VNDR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNFM_CTL_KEY": {
+ "name": "CNFM_CTL_KEY",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_CAUS": {
+ "name": "PUR_HOLD_CAUS",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_repremail": {
+ "name": "cmctb_vendor_repremail",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprfax": {
+ "name": "cmctb_vendor_reprfax",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprtel": {
+ "name": "cmctb_vendor_reprtel",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprurl": {
+ "name": "cmctb_vendor_reprurl",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_taxnum": {
+ "name": "cmctb_vendor_taxnum",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_vfpn": {
+ "name": "cmctb_vendor_vfpn",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDR_SUB_NO": {
+ "name": "VNDR_SUB_NO",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ETC_REF_VNDRCD": {
+ "name": "ETC_REF_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_whthx": {
+ "name": "cmctb_vendor_whthx",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SRCE_TX_TP": {
+ "name": "SRCE_TX_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SRCE_TX_REL_ORDR": {
+ "name": "SRCE_TX_REL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RECIP_TP": {
+ "name": "RECIP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_IDENT_NO": {
+ "name": "SRCE_TX_IDENT_NO",
+ "type": "varchar(16)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NO": {
+ "name": "SRCE_TX_NO",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CERT_NO": {
+ "name": "DCHAG_CERT_NO",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_RAT": {
+ "name": "DCHAG_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ST_DT": {
+ "name": "DCHAG_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ED_DT": {
+ "name": "DCHAG_ED_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CAUS": {
+ "name": "DCHAG_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.plftb_estm_proj_mast": {
+ "name": "plftb_estm_proj_mast",
+ "schema": "nonsap",
+ "columns": {
+ "ESTM_PROJ_NO": {
+ "name": "ESTM_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AGND_NO": {
+ "name": "AGND_NO",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_PROJ_NM": {
+ "name": "ESTM_PROJ_NM",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_CLS": {
+ "name": "BIZ_CLS",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REV_NO": {
+ "name": "REV_NO",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_TYPE": {
+ "name": "ESTM_TYPE",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWNER_CD": {
+ "name": "OWNER_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_CNT": {
+ "name": "SERS_CNT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND_CD": {
+ "name": "SKND_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_SIZE": {
+ "name": "SHTYPE_SIZE",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHRTR_CD": {
+ "name": "CHRTR_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NATN_CD": {
+ "name": "NATN_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_3": {
+ "name": "CLS_3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATA_CRTE_GB": {
+ "name": "DATA_CRTE_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INPR_ID": {
+ "name": "FS_INPR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INP_DTM": {
+ "name": "FS_INP_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHGR_ID": {
+ "name": "FIN_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHG_DTM": {
+ "name": "FIN_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_1": {
+ "name": "VSL_VAG_1",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_2": {
+ "name": "VSL_VAG_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_3": {
+ "name": "VSL_VAG_3",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_4": {
+ "name": "VSL_VAG_4",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_APP_ID": {
+ "name": "ESTM_AOM_APP_ID",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT": {
+ "name": "ESTM_AOM_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT_CHGR_ID": {
+ "name": "ESTM_AOM_STAT_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT_CHG_DTM": {
+ "name": "ESTM_AOM_STAT_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TRGT_YN": {
+ "name": "IF_TRGT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "plftb_estm_proj_mast_ESTM_PROJ_NO_pk": {
+ "name": "plftb_estm_proj_mast_ESTM_PROJ_NO_pk",
+ "columns": [
+ "ESTM_PROJ_NO"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "ecc.PR_INFORMATION_T_BID_HEADER": {
+ "name": "PR_INFORMATION_T_BID_HEADER",
+ "schema": "ecc",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PR_INFORMATION_T_BID_HEADER_id_seq",
+ "schema": "ecc",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANFNR": {
+ "name": "ANFNR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EKGRP": {
+ "name": "EKGRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EKORG": {
+ "name": "EKORG",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBSART": {
+ "name": "ZBSART",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZRFQ_TRS_DT": {
+ "name": "ZRFQ_TRS_DT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZRFQ_TRS_TM": {
+ "name": "ZRFQ_TRS_TM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "PR_INFORMATION_T_BID_HEADER_ANFNR_unique": {
+ "name": "PR_INFORMATION_T_BID_HEADER_ANFNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ANFNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "ecc.PR_INFORMATION_T_BID_ITEM": {
+ "name": "PR_INFORMATION_T_BID_ITEM",
+ "schema": "ecc",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PR_INFORMATION_T_BID_ITEM_id_seq",
+ "schema": "ecc",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANFNR": {
+ "name": "ANFNR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ANFPS": {
+ "name": "ANFPS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AUFNR": {
+ "name": "AUFNR",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BANFN": {
+ "name": "BANFN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BANPO": {
+ "name": "BANPO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BPRME": {
+ "name": "BPRME",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "numeric(15, 3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISMM": {
+ "name": "DISMM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EBELP": {
+ "name": "EBELP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KNTTP": {
+ "name": "KNTTP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOSTL": {
+ "name": "KOSTL",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LFDAT": {
+ "name": "LFDAT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MENGE": {
+ "name": "MENGE",
+ "type": "numeric(15, 3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PEINH": {
+ "name": "PEINH",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PERNR": {
+ "name": "PERNR",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POSID": {
+ "name": "POSID",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PREIS": {
+ "name": "PREIS",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSPID": {
+ "name": "PSPID",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SAKTO": {
+ "name": "SAKTO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXZ01": {
+ "name": "TXZ01",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS1": {
+ "name": "WAERS1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS2": {
+ "name": "WAERS2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZCON_NO_PO": {
+ "name": "ZCON_NO_PO",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZREQ_FN": {
+ "name": "ZREQ_FN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZREQ_PO": {
+ "name": "ZREQ_PO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZRSLT_AMT": {
+ "name": "ZRSLT_AMT",
+ "type": "numeric(17, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.employee": {
+ "name": "employee",
+ "schema": "knox",
+ "columns": {
+ "ep_id": {
+ "name": "ep_id",
+ "type": "varchar(25)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "employee_number": {
+ "name": "employee_number",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "given_name": {
+ "name": "given_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sir_name": {
+ "name": "sir_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_code": {
+ "name": "title_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_name": {
+ "name": "title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email_address": {
+ "name": "email_address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "employee_status": {
+ "name": "employee_status",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "employee_type": {
+ "name": "employee_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "account_status": {
+ "name": "account_status",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security_level": {
+ "name": "security_level",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_language": {
+ "name": "preferred_language",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "en_company_name": {
+ "name": "en_company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_department_name": {
+ "name": "en_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_discription": {
+ "name": "en_discription",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_full_name": {
+ "name": "en_full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_given_name": {
+ "name": "en_given_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_grade_name": {
+ "name": "en_grade_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_sir_name": {
+ "name": "en_sir_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_title_name": {
+ "name": "en_title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_name": {
+ "name": "grade_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_title_indi_code": {
+ "name": "grade_title_indi_code",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "job_name": {
+ "name": "job_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "real_name_yn": {
+ "name": "real_name_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "server_location": {
+ "name": "server_location",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_sort_order": {
+ "name": "title_sort_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "knox_employee_company_department_idx": {
+ "name": "knox_employee_company_department_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "department_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_number_idx": {
+ "name": "knox_employee_number_idx",
+ "columns": [
+ {
+ "expression": "employee_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_user_id_idx": {
+ "name": "knox_employee_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_email_idx": {
+ "name": "knox_employee_email_idx",
+ "columns": [
+ {
+ "expression": "email_address",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.organization": {
+ "name": "organization",
+ "schema": "knox",
+ "columns": {
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_level": {
+ "name": "department_level",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_order": {
+ "name": "department_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_company_name": {
+ "name": "en_company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_department_name": {
+ "name": "en_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_manager_title": {
+ "name": "en_manager_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_sub_org_code": {
+ "name": "en_sub_org_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "in_department_code": {
+ "name": "in_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "low_department_yn": {
+ "name": "low_department_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_id": {
+ "name": "manager_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_title": {
+ "name": "manager_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_language": {
+ "name": "preferred_language",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_org_code": {
+ "name": "sub_org_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_org_name": {
+ "name": "sub_org_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upr_department_code": {
+ "name": "upr_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_upr_department_name": {
+ "name": "en_upr_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upr_department_name": {
+ "name": "upr_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_department_yn": {
+ "name": "hidden_department_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corp_code": {
+ "name": "corp_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corp_name": {
+ "name": "corp_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_corp_name": {
+ "name": "en_corp_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "knox_org_company_idx": {
+ "name": "knox_org_company_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "organization_company_code_department_code_pk": {
+ "name": "organization_company_code_department_code_pk",
+ "columns": [
+ "company_code",
+ "department_code"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.title": {
+ "name": "title",
+ "schema": "knox",
+ "columns": {
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title_code": {
+ "name": "title_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title_name": {
+ "name": "title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_title_name": {
+ "name": "en_title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "knox_title_company_idx": {
+ "name": "knox_title_company_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "title_company_code_title_code_pk": {
+ "name": "title_company_code_title_code_pk",
+ "columns": [
+ "company_code",
+ "title_code"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_lines": {
+ "name": "approval_lines",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "aplns": {
+ "name": "aplns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_lines_createdBy_users_id_fk": {
+ "name": "approval_lines_createdBy_users_id_fk",
+ "tableFrom": "approval_lines",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_logs": {
+ "name": "approval_logs",
+ "schema": "knox",
+ "columns": {
+ "ap_inf_id": {
+ "name": "ap_inf_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ep_id": {
+ "name": "ep_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_address": {
+ "name": "email_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "aplns": {
+ "name": "aplns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_template_history": {
+ "name": "approval_template_history",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "templateId": {
+ "name": "templateId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "changeDescription": {
+ "name": "changeDescription",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changedBy": {
+ "name": "changedBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_template_history_templateId_approval_templates_id_fk": {
+ "name": "approval_template_history_templateId_approval_templates_id_fk",
+ "tableFrom": "approval_template_history",
+ "tableTo": "approval_templates",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "templateId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "approval_template_history_changedBy_users_id_fk": {
+ "name": "approval_template_history_changedBy_users_id_fk",
+ "tableFrom": "approval_template_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "changedBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_template_variables": {
+ "name": "approval_template_variables",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "approvalTemplateId": {
+ "name": "approvalTemplateId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variableName": {
+ "name": "variableName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variableType": {
+ "name": "variableType",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "defaultValue": {
+ "name": "defaultValue",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_template_variables_approvalTemplateId_approval_templates_id_fk": {
+ "name": "approval_template_variables_approvalTemplateId_approval_templates_id_fk",
+ "tableFrom": "approval_template_variables",
+ "tableTo": "approval_templates",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "approvalTemplateId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "approval_template_variables_createdBy_users_id_fk": {
+ "name": "approval_template_variables_createdBy_users_id_fk",
+ "tableFrom": "approval_template_variables",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_templates": {
+ "name": "approval_templates",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approvalLineId": {
+ "name": "approvalLineId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_templates_approvalLineId_approval_lines_id_fk": {
+ "name": "approval_templates_approvalLineId_approval_lines_id_fk",
+ "tableFrom": "approval_templates",
+ "tableTo": "approval_lines",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "approvalLineId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "approval_templates_createdBy_users_id_fk": {
+ "name": "approval_templates_createdBy_users_id_fk",
+ "tableFrom": "approval_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.user_domain": {
+ "name": "user_domain",
+ "schema": "public",
+ "values": [
+ "pending",
+ "evcp",
+ "procurement",
+ "sales",
+ "engineering",
+ "partners"
+ ]
+ },
+ "public.score_type": {
+ "name": "score_type",
+ "schema": "public",
+ "values": [
+ "fixed",
+ "variable"
+ ]
+ },
+ "public.qna_category": {
+ "name": "qna_category",
+ "schema": "public",
+ "values": [
+ "engineering",
+ "procurement",
+ "technical_sales"
+ ]
+ },
+ "public.gtc_type": {
+ "name": "gtc_type",
+ "schema": "public",
+ "values": [
+ "standard",
+ "project"
+ ]
+ },
+ "public.review_status": {
+ "name": "review_status",
+ "schema": "public",
+ "values": [
+ "draft",
+ "pending",
+ "reviewing",
+ "approved",
+ "rejected",
+ "revised"
+ ]
+ },
+ "public.consent_action": {
+ "name": "consent_action",
+ "schema": "public",
+ "values": [
+ "consent",
+ "revoke",
+ "update"
+ ]
+ },
+ "public.consent_type": {
+ "name": "consent_type",
+ "schema": "public",
+ "values": [
+ "privacy_policy",
+ "terms_of_service",
+ "marketing",
+ "optional"
+ ]
+ },
+ "public.policy_type": {
+ "name": "policy_type",
+ "schema": "public",
+ "values": [
+ "privacy_policy",
+ "terms_of_service"
+ ]
+ },
+ "public.award_count": {
+ "name": "award_count",
+ "schema": "public",
+ "values": [
+ "single",
+ "multiple"
+ ]
+ },
+ "public.bidding_status": {
+ "name": "bidding_status",
+ "schema": "public",
+ "values": [
+ "bidding_generated",
+ "request_for_quotation",
+ "received_quotation",
+ "set_target_price",
+ "bidding_opened",
+ "bidding_closed",
+ "evaluation_of_bidding",
+ "bidding_disposal",
+ "vendor_selected"
+ ]
+ },
+ "public.bidding_type": {
+ "name": "bidding_type",
+ "schema": "public",
+ "values": [
+ "equipment",
+ "construction",
+ "service",
+ "lease",
+ "steel_stock",
+ "piping",
+ "transport",
+ "waste",
+ "sale"
+ ]
+ },
+ "public.contract_type": {
+ "name": "contract_type",
+ "schema": "public",
+ "values": [
+ "unit_price",
+ "general",
+ "sale"
+ ]
+ },
+ "public.document_type": {
+ "name": "document_type",
+ "schema": "public",
+ "values": [
+ "notice",
+ "specification",
+ "specification_meeting",
+ "contract_draft",
+ "company_proposal",
+ "financial_doc",
+ "technical_doc",
+ "certificate",
+ "pr_document",
+ "spec_document",
+ "evaluation_doc",
+ "bid_attachment",
+ "other"
+ ]
+ },
+ "public.invitation_status": {
+ "name": "invitation_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "sent",
+ "accepted",
+ "declined",
+ "submitted"
+ ]
+ },
+ "public.quantity_unit": {
+ "name": "quantity_unit",
+ "schema": "public",
+ "values": [
+ "ea",
+ "set",
+ "kg",
+ "ton",
+ "m",
+ "m2",
+ "m3",
+ "lot",
+ "other"
+ ]
+ },
+ "public.weight_unit": {
+ "name": "weight_unit",
+ "schema": "public",
+ "values": [
+ "kg",
+ "ton",
+ "lb",
+ "g"
+ ]
+ }
+ },
+ "schemas": {
+ "mdg": "mdg",
+ "soap": "soap",
+ "nonsap": "nonsap",
+ "ecc": "ecc",
+ "knox": "knox"
+ },
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {
+ "public.contracts_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contracts_detail_view_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_name": {
+ "name": "contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "end_date": {
+ "name": "end_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "partial_shipping_allowed": {
+ "name": "partial_shipping_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "partial_payment_allowed": {
+ "name": "partial_payment_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"contracts\".\"id\", \"contracts\".\"contract_no\", \"contracts\".\"contract_name\", \"contracts\".\"status\", \"contracts\".\"start_date\", \"contracts\".\"end_date\", \"contracts\".\"project_id\", \"projects\".\"code\", \"projects\".\"name\", \"contracts\".\"vendor_id\", \"vendors\".\"vendor_name\", \"contracts\".\"payment_terms\", \"contracts\".\"delivery_terms\", \"contracts\".\"delivery_date\", \"contracts\".\"delivery_location\", \"contracts\".\"currency\", \"contracts\".\"total_amount\", \"contracts\".\"discount\", \"contracts\".\"tax\", \"contracts\".\"shipping_fee\", \"contracts\".\"net_total\", \"contracts\".\"partial_shipping_allowed\", \"contracts\".\"partial_payment_allowed\", \"contracts\".\"remarks\", \"contracts\".\"version\", \"contracts\".\"created_at\", \"contracts\".\"updated_at\", EXISTS (\n SELECT 1 \n FROM \"contract_envelopes\" \n WHERE \"contract_envelopes\".\"contract_id\" = \"contracts\".\"id\"\n ) as \"has_signature\", COALESCE((\n SELECT json_agg(\n json_build_object(\n 'id', ci.id,\n 'itemId', ci.item_id,\n 'description', ci.description,\n 'quantity', ci.quantity,\n 'unitPrice', ci.unit_price,\n 'taxRate', ci.tax_rate,\n 'taxAmount', ci.tax_amount,\n 'totalLineAmount', ci.total_line_amount,\n 'remark', ci.remark,\n 'createdAt', ci.created_at,\n 'updatedAt', ci.updated_at\n )\n )\n FROM \"contract_items\" AS ci\n WHERE ci.contract_id = \"contracts\".\"id\"\n ), '[]') as \"items\", COALESCE((\n SELECT json_agg(\n json_build_object(\n 'id', ce.id,\n 'envelopeId', ce.envelope_id,\n 'documentId', ce.document_id,\n 'envelopeStatus', ce.envelope_status,\n 'fileName', ce.file_name,\n 'filePath', ce.file_path,\n 'createdAt', ce.created_at,\n 'updatedAt', ce.updated_at,\n 'signers', (\n SELECT json_agg(\n json_build_object(\n 'id', cs.id,\n 'vendorContactId', cs.vendor_contact_id,\n 'signerType', cs.signer_type,\n 'signerEmail', cs.signer_email,\n 'signerName', cs.signer_name,\n 'signerPosition', cs.signer_position,\n 'signerStatus', cs.signer_status,\n 'signedAt', cs.signed_at\n )\n )\n FROM \"contract_signers\" AS cs\n WHERE cs.envelope_id = ce.id\n )\n )\n )\n FROM \"contract_envelopes\" AS ce\n WHERE ce.contract_id = \"contracts\".\"id\"\n ), '[]') as \"envelopes\" from \"contracts\" left join \"projects\" on \"contracts\".\"project_id\" = \"projects\".\"id\" left join \"vendors\" on \"contracts\".\"vendor_id\" = \"vendors\".\"id\"",
+ "name": "contracts_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.poa_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "poa_detail_view_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_status": {
+ "name": "approval_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"poa\".\"id\", \"poa\".\"contract_no\", \"contracts\".\"project_id\", \"contracts\".\"vendor_id\", \"poa\".\"change_reason\", \"poa\".\"approval_status\", \"contracts\".\"contract_name\" as \"original_contract_name\", \"contracts\".\"status\" as \"original_status\", \"contracts\".\"start_date\" as \"original_start_date\", \"contracts\".\"end_date\" as \"original_end_date\", \"poa\".\"delivery_terms\", \"poa\".\"delivery_date\", \"poa\".\"delivery_location\", \"poa\".\"currency\", \"poa\".\"total_amount\", \"poa\".\"discount\", \"poa\".\"tax\", \"poa\".\"shipping_fee\", \"poa\".\"net_total\", \"poa\".\"created_at\", \"poa\".\"updated_at\", EXISTS (\n SELECT 1 \n FROM \"contract_envelopes\" \n WHERE \"contract_envelopes\".\"contract_id\" = \"poa\".\"id\"\n ) as \"has_signature\" from \"poa\" left join \"contracts\" on \"poa\".\"contract_no\" = \"contracts\".\"contract_no\"",
+ "name": "poa_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.project_approved_vendors": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "name_ko": {
+ "name": "name_ko",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_en": {
+ "name": "name_en",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ship'"
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendors\".\"id\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendors\".\"tax_id\", \"vendors\".\"email\", \"vendors\".\"phone\", \"vendors\".\"status\", \"vendor_types\".\"name_ko\", \"vendor_types\".\"name_en\", \"projects\".\"code\", \"projects\".\"name\", \"projects\".\"type\", \"vendor_pq_submissions\".\"submitted_at\", \"vendor_pq_submissions\".\"approved_at\" from \"vendors\" inner join \"vendor_pq_submissions\" on \"vendor_pq_submissions\".\"vendor_id\" = \"vendors\".\"id\" inner join \"projects\" on \"vendor_pq_submissions\".\"project_id\" = \"projects\".\"id\" left join \"vendor_types\" on \"vendors\".\"vendor_type_id\" = \"vendor_types\".\"id\" where \"vendor_pq_submissions\".\"status\" = 'APPROVED'",
+ "name": "project_approved_vendors",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_investigations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pq_submission_id": {
+ "name": "pq_submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "qm_manager_id": {
+ "name": "qm_manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_status": {
+ "name": "investigation_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "investigation_address": {
+ "name": "investigation_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_method": {
+ "name": "investigation_method",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_start_at": {
+ "name": "scheduled_start_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_end_at": {
+ "name": "scheduled_end_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "forecasted_at": {
+ "name": "forecasted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_result": {
+ "name": "evaluation_result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_notes": {
+ "name": "investigation_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pq_items": {
+ "name": "pq_items",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendor_investigations\".\"id\", \"vendor_investigations\".\"vendor_id\", \"vendor_investigations\".\"pq_submission_id\", \"vendor_investigations\".\"requester_id\", \"vendor_investigations\".\"qm_manager_id\", \"vendor_investigations\".\"investigation_status\", \"vendor_investigations\".\"investigation_address\", \"vendor_investigations\".\"investigation_method\", \"vendor_investigations\".\"scheduled_start_at\", \"vendor_investigations\".\"scheduled_end_at\", \"vendor_investigations\".\"forecasted_at\", \"vendor_investigations\".\"requested_at\", \"vendor_investigations\".\"confirmed_at\", \"vendor_investigations\".\"completed_at\", \"vendor_investigations\".\"evaluation_score\", \"vendor_investigations\".\"evaluation_result\", \"vendor_investigations\".\"investigation_notes\", \"vendor_investigations\".\"created_at\", \"vendor_investigations\".\"updated_at\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendor_pq_submissions\".\"pq_items\", requester.name as \"requesterName\", requester.email as \"requesterEmail\", qm_manager.name as \"qmManagerName\", qm_manager.email as \"qmManagerEmail\", (\n CASE \n WHEN EXISTS (\n SELECT 1 FROM vendor_investigation_attachments via \n WHERE via.investigation_id = \"vendor_investigations\".\"id\"\n ) \n THEN true \n ELSE false \n END\n ) as \"hasAttachments\" from \"vendor_investigations\" left join \"vendors\" on \"vendor_investigations\".\"vendor_id\" = \"vendors\".\"id\" left join users AS requester on \"vendor_investigations\".\"requester_id\" = requester.id left join users AS qm_manager on \"vendor_investigations\".\"qm_manager_id\" = qm_manager.id left join \"vendor_pq_submissions\" on \"vendor_investigations\".\"pq_submission_id\" = \"vendor_pq_submissions\".\"id\"",
+ "name": "vendor_investigations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.cbe_view": {
+ "columns": {},
+ "definition": "select \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"rfq_id\" as \"rfq_id\", \"cbe_evaluations\".\"vendor_id\" as \"vendor_id\", \"cbe_evaluations\".\"total_cost\" as \"total_cost\", \"cbe_evaluations\".\"currency\" as \"currency\", \"cbe_evaluations\".\"payment_terms\" as \"payment_terms\", \"cbe_evaluations\".\"incoterms\" as \"incoterms\", \"cbe_evaluations\".\"result\" as \"result\", \"cbe_evaluations\".\"notes\" as \"notes\", \"cbe_evaluations\".\"evaluated_by\" as \"evaluated_by\", \"cbe_evaluations\".\"evaluated_at\" as \"evaluated_at\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"users\".\"name\" as \"evaluator_name\", \"users\".\"email\" as \"evaluator_email\" from \"cbe_evaluations\" inner join \"rfqs\" on \"cbe_evaluations\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"cbe_evaluations\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" on \"cbe_evaluations\".\"evaluated_by\" = \"users\".\"id\"",
+ "name": "cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfqs_view": {
+ "columns": {},
+ "definition": "select \"rfqs\".\"id\" as \"rfq_id\", \"rfqs\".\"status\" as \"status\", \"rfqs\".\"created_at\" as \"created_at\", \"rfqs\".\"updated_at\" as \"updated_at\", \"rfqs\".\"created_by\" as \"created_by\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"rfqs\".\"parent_rfq_id\" as \"parent_rfq_id\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"users\".\"email\" as \"user_email\", \"users\".\"name\" as \"user_name\", (\n SELECT COUNT(*) \n FROM \"rfq_items\" \n WHERE \"rfq_items\".\"rfq_id\" = \"rfqs\".\"id\"\n ) as \"item_count\", (\n SELECT COUNT(*) \n FROM \"rfq_attachments\" \n WHERE \"rfq_attachments\".\"rfq_id\" = \"rfqs\".\"id\"\n ) as \"attachment_count\" from \"rfqs\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" on \"rfqs\".\"created_by\" = \"users\".\"id\"",
+ "name": "rfqs_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_cbe_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"id\" as \"vendor_response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"result\" as \"cbe_result\", \"cbe_evaluations\".\"notes\" as \"cbe_note\", \"cbe_evaluations\".\"updated_at\" as \"cbe_updated\", \"cbe_evaluations\".\"total_cost\" as \"total_cost\", \"cbe_evaluations\".\"currency\" as \"currency\", \"cbe_evaluations\".\"payment_terms\" as \"payment_terms\", \"cbe_evaluations\".\"incoterms\" as \"incoterms\", \"cbe_evaluations\".\"delivery_schedule\" as \"delivery_schedule\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"cbe_evaluations\" on (\"cbe_evaluations\".\"vendor_id\" = \"vendors\".\"id\" and \"cbe_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\")",
+ "name": "vendor_cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_cbe_view": {
+ "columns": {},
+ "definition": "select \"vendor_responses\".\"id\" as \"response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"vendor_id\" as \"vendor_id\", \"vendor_responses\".\"response_status\" as \"response_status\", \"vendor_responses\".\"notes\" as \"response_notes\", \"vendor_responses\".\"responded_by\" as \"responded_by\", \"vendor_responses\".\"responded_at\" as \"responded_at\", \"vendor_responses\".\"updated_at\" as \"response_updated_at\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"rfqs\".\"due_date\" as \"rfq_due_date\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"status\" as \"vendor_status\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"vendor_commercial_responses\".\"id\" as \"commercial_response_id\", \"vendor_commercial_responses\".\"response_status\" as \"commercial_response_status\", \"vendor_commercial_responses\".\"total_price\" as \"total_price\", \"vendor_commercial_responses\".\"currency\" as \"currency\", \"vendor_commercial_responses\".\"payment_terms\" as \"payment_terms\", \"vendor_commercial_responses\".\"incoterms\" as \"incoterms\", \"vendor_commercial_responses\".\"delivery_period\" as \"delivery_period\", \"vendor_commercial_responses\".\"warranty_period\" as \"warranty_period\", \"vendor_commercial_responses\".\"validity_period\" as \"validity_period\", \"vendor_commercial_responses\".\"price_breakdown\" as \"price_breakdown\", \"vendor_commercial_responses\".\"commercial_notes\" as \"commercial_notes\", \"vendor_commercial_responses\".\"created_at\" as \"commercial_created_at\", \"vendor_commercial_responses\".\"updated_at\" as \"commercial_updated_at\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"attachment_count\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"commercial_response_id\" = \"vendor_commercial_responses\".\"id\"\n ) as \"commercial_attachment_count\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n AND \"vendor_response_attachments\".\"attachment_type\" = 'TECHNICAL_SPEC'\n ) as \"technical_attachment_count\", (\n SELECT MAX(\"uploaded_at\") \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"latest_attachment_date\" from \"vendor_responses\" inner join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_commercial_responses\" on \"vendor_commercial_responses\".\"response_id\" = \"vendor_responses\".\"id\"",
+ "name": "vendor_response_cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_responses_view": {
+ "columns": {},
+ "definition": "select \"vendor_responses\".\"id\" as \"response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"vendor_id\" as \"vendor_id\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"rfqs\".\"due_date\" as \"rfq_due_date\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"created_at\" as \"rfq_created_at\", \"rfqs\".\"updated_at\" as \"rfq_updated_at\", \"rfqs\".\"created_by\" as \"rfq_created_by\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendor_responses\".\"response_status\" as \"response_status\", \"vendor_responses\".\"responded_at\" as \"responded_at\", CASE WHEN \"vendor_technical_responses\".\"id\" IS NOT NULL THEN TRUE ELSE FALSE END as \"has_technical_response\", \"vendor_technical_responses\".\"id\" as \"technical_response_id\", CASE WHEN \"vendor_commercial_responses\".\"id\" IS NOT NULL THEN TRUE ELSE FALSE END as \"has_commercial_response\", \"vendor_commercial_responses\".\"id\" as \"commercial_response_id\", \"vendor_commercial_responses\".\"total_price\" as \"total_price\", \"vendor_commercial_responses\".\"currency\" as \"currency\", \"rfq_evaluations\".\"id\" as \"tbe_id\", \"rfq_evaluations\".\"result\" as \"tbe_result\", \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"result\" as \"cbe_result\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"attachment_count\" from \"vendor_responses\" inner join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_technical_responses\" on \"vendor_technical_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"vendor_commercial_responses\" on \"vendor_commercial_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"rfq_evaluations\" on (\"rfq_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\" and \"rfq_evaluations\".\"vendor_id\" = \"vendor_responses\".\"vendor_id\" and \"rfq_evaluations\".\"eval_type\" = 'TBE') left join \"cbe_evaluations\" on (\"cbe_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\" and \"cbe_evaluations\".\"vendor_id\" = \"vendor_responses\".\"vendor_id\")",
+ "name": "vendor_responses_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_rfq_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\"",
+ "name": "vendor_rfq_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_tbe_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"id\" as \"vendor_response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"vendor_technical_responses\".\"id\" as \"technical_response_id\", \"vendor_technical_responses\".\"response_status\" as \"technical_response_status\", \"vendor_technical_responses\".\"summary\" as \"technical_summary\", \"vendor_technical_responses\".\"notes\" as \"technical_notes\", \"vendor_technical_responses\".\"updated_at\" as \"technical_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"rfq_evaluations\".\"id\" as \"tbe_id\", \"rfq_evaluations\".\"result\" as \"tbe_result\", \"rfq_evaluations\".\"notes\" as \"tbe_note\", \"rfq_evaluations\".\"updated_at\" as \"tbe_updated\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_technical_responses\" on \"vendor_technical_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"rfq_evaluations\" on (\"rfq_evaluations\".\"vendor_id\" = \"vendors\".\"id\" and \"rfq_evaluations\".\"eval_type\" = 'TBE' and \"rfq_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\")",
+ "name": "vendor_tbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.role_view": {
+ "columns": {},
+ "definition": "select \"roles\".\"id\" as \"id\", \"roles\".\"name\" as \"name\", \"roles\".\"description\" as \"description\", \"roles\".\"domain\" as \"domain\", \"roles\".\"created_at\" as \"created_at\", \"vendors\".\"id\" as \"company_id\", \"vendors\".\"vendor_name\" as \"company_name\", COUNT(\"users\".\"id\") as \"user_count\" from \"roles\" left join \"user_roles\" on \"user_roles\".\"role_id\" = \"roles\".\"id\" left join \"users\" on \"users\".\"id\" = \"user_roles\".\"user_id\" left join \"vendors\" on \"roles\".\"company_id\" = \"vendors\".\"id\" group by \"roles\".\"id\", \"vendors\".\"id\"",
+ "name": "role_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.user_view": {
+ "columns": {},
+ "definition": "select \"users\".\"id\" as \"user_id\", \"users\".\"name\" as \"user_name\", \"users\".\"phone\" as \"user_phone\", \"users\".\"email\" as \"user_email\", \"users\".\"domain\" as \"user_domain\", \"users\".\"image_url\" as \"user_image\", \"vendors\".\"id\" as \"company_id\", \"vendors\".\"vendor_name\" as \"company_name\", \n array_agg(\"roles\".\"name\")\n as \"roles\", \"users\".\"created_at\" as \"created_at\" from \"users\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"user_roles\" on \"users\".\"id\" = \"user_roles\".\"user_id\" left join \"roles\" on \"user_roles\".\"role_id\" = \"roles\".\"id\" group by \"users\".\"id\", \"vendors\".\"id\"",
+ "name": "user_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.form_lists_view": {
+ "columns": {},
+ "definition": "select \"tag_type_class_form_mappings\".\"id\" as \"id\", \"tag_type_class_form_mappings\".\"project_id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"tag_type_class_form_mappings\".\"tag_type_label\" as \"tag_type_label\", \"tag_type_class_form_mappings\".\"class_label\" as \"class_label\", \"tag_type_class_form_mappings\".\"form_code\" as \"form_code\", \"tag_type_class_form_mappings\".\"form_name\" as \"form_name\", \"tag_type_class_form_mappings\".\"ep\" as \"ep\", \"tag_type_class_form_mappings\".\"remark\" as \"remark\", \"tag_type_class_form_mappings\".\"created_at\" as \"created_at\", \"tag_type_class_form_mappings\".\"updated_at\" as \"updated_at\" from \"tag_type_class_form_mappings\" inner join \"projects\" on \"tag_type_class_form_mappings\".\"project_id\" = \"projects\".\"id\"",
+ "name": "form_lists_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.view_tag_subfields": {
+ "columns": {
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_description": {
+ "name": "attributes_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expression": {
+ "name": "expression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delimiter": {
+ "name": "delimiter",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"tag_subfields\".\"id\" as \"id\", \"tag_subfields\".\"tag_type_code\", \"tag_types\".\"description\", \"tag_subfields\".\"attributes_id\", \"tag_subfields\".\"attributes_description\", \"tag_subfields\".\"expression\", \"tag_subfields\".\"delimiter\", \"tag_subfields\".\"sort_order\", \"tag_subfields\".\"created_at\", \"tag_subfields\".\"updated_at\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\", \"projects\".\"name\" from \"tag_subfields\" inner join \"tag_types\" on (\"tag_subfields\".\"tag_type_code\" = \"tag_types\".\"code\" and \"tag_subfields\".\"project_id\" = \"tag_types\".\"project_id\") inner join \"projects\" on \"tag_subfields\".\"project_id\" = \"projects\".\"id\"",
+ "name": "view_tag_subfields",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.document_stages_only_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n d.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM documents d\n LEFT JOIN issue_stages ist ON d.id = ist.document_id\n GROUP BY d.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n -- 문서별 스테이지 집계 (리비전 제외)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'description', ist.description,\n 'notes', ist.notes,\n 'reminderDays', ist.reminder_days\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.doc_number,\n d.drawing_kind,\n d.vendor_doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n -- 프로젝트 및 벤더 정보\n p.code as project_code,\n v.vendor_name as vendor_name,\n v.vendor_code as vendor_code,\n c.vendor_id as vendor_id,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 전체 스테이지 (리비전 제외)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 메타 정보\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- 프로젝트 및 벤더 정보 JOIN\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN projects p ON c.project_id = p.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n -- 스테이지 관련 정보 JOIN\n LEFT JOIN document_stats ds ON d.id = ds.document_id\n LEFT JOIN current_stage_info csi ON d.id = csi.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "document_stages_only_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.document_stages_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_count": {
+ "name": "stage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_list": {
+ "name": "stage_list",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT\n d.id AS document_id,\n d.doc_number,\n d.title,\n d.status,\n d.issued_date,\n d.contract_id,\n (SELECT COUNT(*) FROM issue_stages WHERE document_id = d.id) AS stage_count,\n COALESCE( \n (SELECT json_agg(i.stage_name) FROM issue_stages i WHERE i.document_id = d.id), \n '[]'\n ) AS stage_list,\n d.created_at,\n d.updated_at\n FROM documents d\n",
+ "name": "document_stages_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.enhanced_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision": {
+ "name": "latest_revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_status": {
+ "name": "latest_revision_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_name": {
+ "name": "latest_revision_uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_submitted_date": {
+ "name": "latest_submitted_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n d.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM documents d\n LEFT JOIN issue_stages ist ON d.id = ist.document_id\n GROUP BY d.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n latest_revision_info AS (\n SELECT DISTINCT ON (ist.document_id)\n ist.document_id,\n r.id as latest_revision_id,\n r.revision as latest_revision,\n r.revision_status as latest_revision_status,\n r.uploader_name as latest_revision_uploader_name,\n r.submitted_date as latest_submitted_date\n FROM revisions r\n JOIN issue_stages ist ON r.issue_stage_id = ist.id\n ORDER BY ist.document_id, r.created_at DESC\n ),\n -- 리비전별 첨부파일 집계\n revision_attachments AS (\n SELECT \n r.id as revision_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', da.id,\n 'revisionId', da.revision_id,\n 'fileName', da.file_name,\n 'filePath', da.file_path,\n 'fileSize', da.file_size,\n 'fileType', da.file_type,\n 'createdAt', da.created_at,\n 'updatedAt', da.updated_at\n ) ORDER BY da.created_at\n ) FILTER (WHERE da.id IS NOT NULL),\n '[]'::json\n ) as attachments\n FROM revisions r\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY r.id\n ),\n -- 스테이지별 리비전 집계 (첨부파일 포함)\n stage_revisions AS (\n SELECT \n ist.id as stage_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', r.id,\n 'issueStageId', r.issue_stage_id,\n 'revision', r.revision,\n 'uploaderType', r.uploader_type,\n 'uploaderId', r.uploader_id,\n 'uploaderName', r.uploader_name,\n 'comment', r.comment,\n 'usage', r.usage,\n 'revisionStatus', r.revision_status,\n 'submittedDate', r.submitted_date,\n 'uploadedAt', r.uploaded_at,\n 'approvedDate', r.approved_date,\n 'reviewStartDate', r.review_start_date,\n 'rejectedDate', r.rejected_date,\n 'reviewerId', r.reviewer_id,\n 'reviewerName', r.reviewer_name,\n 'reviewComments', r.review_comments,\n 'createdAt', r.created_at,\n 'updatedAt', r.updated_at,\n 'attachments', ra.attachments\n ) ORDER BY r.created_at\n ) FILTER (WHERE r.id IS NOT NULL),\n '[]'::json\n ) as revisions\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN revision_attachments ra ON r.id = ra.revision_id\n GROUP BY ist.id\n ),\n -- 문서별 스테이지 집계 (리비전 포함)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'revisions', sr.revisions\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n LEFT JOIN stage_revisions sr ON ist.id = sr.stage_id\n GROUP BY ist.document_id\n ),\n attachment_counts AS (\n SELECT \n ist.document_id,\n COUNT(da.id) as attachment_count\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.doc_number,\n d.drawing_kind,\n d.vendor_doc_number, -- ✅ 벤더 문서 번호 추가\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n\n d.c_gbn,\n d.d_gbn,\n d.degree_gbn,\n d.dept_gbn,\n d.s_gbn,\n d.j_gbn,\n\n\n \n -- ✅ 프로젝트 및 벤더 정보 추가\n c.project_id as project_id,\n p.code as project_code,\n v.vendor_name as vendor_name,\n v.vendor_code as vendor_code,\n c.vendor_id as vendor_id,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 최신 리비전 정보\n lri.latest_revision_id,\n lri.latest_revision,\n lri.latest_revision_status,\n lri.latest_revision_uploader_name,\n lri.latest_submitted_date,\n \n -- 전체 스테이지 (리비전 및 첨부파일 포함)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 기타\n COALESCE(ac.attachment_count, 0) as attachment_count,\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- ✅ contracts, projects, vendors 테이블 JOIN 추가\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN projects p ON c.project_id = p.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n LEFT JOIN document_stats ds ON d.id = ds.document_id\n LEFT JOIN current_stage_info csi ON d.id = csi.document_id\n LEFT JOIN latest_revision_info lri ON d.id = lri.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n LEFT JOIN attachment_counts ac ON d.id = ac.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "enhanced_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.simplified_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_move_gbn": {
+ "name": "drawing_move_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discipline": {
+ "name": "discipline",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_document_id": {
+ "name": "external_document_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_system_type": {
+ "name": "external_system_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_synced_at": {
+ "name": "external_synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_drawing_no": {
+ "name": "shi_drawing_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager": {
+ "name": "manager",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_enm": {
+ "name": "manager_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_no": {
+ "name": "manager_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group": {
+ "name": "register_group",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group_id": {
+ "name": "register_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_no": {
+ "name": "create_user_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_id": {
+ "name": "create_user_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_enm": {
+ "name": "create_user_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_id": {
+ "name": "first_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_name": {
+ "name": "first_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_plan_date": {
+ "name": "first_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_actual_date": {
+ "name": "first_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_id": {
+ "name": "second_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_name": {
+ "name": "second_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_plan_date": {
+ "name": "second_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_actual_date": {
+ "name": "second_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH \n -- 리비전별 첨부파일 집계\n revision_attachments AS (\n SELECT \n r.id as revision_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', da.id,\n 'revisionId', da.revision_id,\n 'fileName', da.file_name,\n 'filePath', da.file_path,\n 'fileSize', da.file_size,\n 'fileType', da.file_type,\n 'createdAt', da.created_at,\n 'updatedAt', da.updated_at\n ) ORDER BY da.created_at\n ) FILTER (WHERE da.id IS NOT NULL),\n '[]'::json\n ) as attachments\n FROM revisions r\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY r.id\n ),\n \n -- 스테이지별 리비전 집계 (첨부파일 포함)\n stage_revisions AS (\n SELECT \n ist.id as stage_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', r.id,\n 'issueStageId', r.issue_stage_id,\n 'revision', r.revision,\n 'uploaderType', r.uploader_type,\n 'uploaderId', r.uploader_id,\n 'uploaderName', r.uploader_name,\n 'comment', r.comment,\n 'usage', r.usage,\n 'usageType', r.usage_type,\n 'revisionStatus', r.revision_status,\n 'submittedDate', r.submitted_date,\n 'uploadedAt', r.uploaded_at,\n 'approvedDate', r.approved_date,\n 'reviewStartDate', r.review_start_date,\n 'rejectedDate', r.rejected_date,\n 'reviewerId', r.reviewer_id,\n 'reviewerName', r.reviewer_name,\n 'reviewComments', r.review_comments,\n 'createdAt', r.created_at,\n 'updatedAt', r.updated_at,\n 'attachments', COALESCE(ra.attachments, '[]'::json)\n ) ORDER BY r.created_at\n ) FILTER (WHERE r.id IS NOT NULL),\n '[]'::json\n ) as revisions\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN revision_attachments ra ON r.id = ra.revision_id\n GROUP BY ist.id\n ),\n \n -- 문서별 스테이지 집계 (리비전 포함)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'revisions', COALESCE(sr.revisions, '[]'::json)\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n LEFT JOIN stage_revisions sr ON ist.id = sr.stage_id\n GROUP BY ist.document_id\n ),\n \n -- 첫 번째 스테이지 정보 (drawingKind에 따라 다른 조건)\n first_stage_info AS (\n SELECT \n document_id,\n first_stage_id,\n first_stage_name,\n first_stage_plan_date,\n first_stage_actual_date\n FROM (\n SELECT \n ist.document_id,\n ist.id as first_stage_id,\n ist.stage_name as first_stage_name,\n ist.plan_date as first_stage_plan_date,\n ist.actual_date as first_stage_actual_date,\n ROW_NUMBER() OVER (PARTITION BY ist.document_id ORDER BY ist.stage_order ASC) as rn\n FROM issue_stages ist\n JOIN documents d ON ist.document_id = d.id\n WHERE \n (d.drawing_kind = 'B4' AND LOWER(ist.stage_name) LIKE '%pre%') OR\n (d.drawing_kind = 'B3' AND LOWER(ist.stage_name) LIKE '%approval%') OR\n (d.drawing_kind = 'B5' AND LOWER(ist.stage_name) LIKE '%first%')\n ) ranked\n WHERE rn = 1\n ),\n \n -- 두 번째 스테이지 정보 (drawingKind에 따라 다른 조건)\n second_stage_info AS (\n SELECT \n document_id,\n second_stage_id,\n second_stage_name,\n second_stage_plan_date,\n second_stage_actual_date\n FROM (\n SELECT \n ist.document_id,\n ist.id as second_stage_id,\n ist.stage_name as second_stage_name,\n ist.plan_date as second_stage_plan_date,\n ist.actual_date as second_stage_actual_date,\n ROW_NUMBER() OVER (PARTITION BY ist.document_id ORDER BY ist.stage_order ASC) as rn\n FROM issue_stages ist\n JOIN documents d ON ist.document_id = d.id\n WHERE \n (d.drawing_kind = 'B4' AND LOWER(ist.stage_name) LIKE '%work%') OR\n (d.drawing_kind = 'B3' AND LOWER(ist.stage_name) LIKE '%work%') OR\n (d.drawing_kind = 'B5' AND LOWER(ist.stage_name) LIKE '%second%')\n ) ranked\n WHERE rn = 1\n ),\n \n -- 첨부파일 수 집계\n attachment_counts AS (\n SELECT \n ist.document_id,\n COUNT(da.id) as attachment_count\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.project_id,\n d.vendor_id,\n d.doc_number,\n d.drawing_kind,\n d.drawing_move_gbn,\n d.discipline,\n d.vendor_doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n -- 외부 시스템 연동 정보\n d.external_document_id,\n d.external_system_type,\n d.external_synced_at,\n \n -- DOLCE 응답의 추가 정보들\n d.shi_drawing_no,\n d.manager,\n d.manager_enm,\n d.manager_no,\n d.register_group,\n d.register_group_id,\n \n -- 생성자 정보\n d.create_user_no,\n d.create_user_id,\n d.create_user_enm,\n \n -- 프로젝트 및 벤더 정보\n p.code as project_code,\n v.vendor_name,\n v.vendor_code,\n \n -- B4 전용 필드들\n d.c_gbn,\n d.d_gbn,\n d.degree_gbn,\n d.dept_gbn,\n d.s_gbn,\n d.j_gbn,\n \n -- 첫 번째 스테이지 정보\n fsi.first_stage_id,\n fsi.first_stage_name,\n fsi.first_stage_plan_date,\n fsi.first_stage_actual_date,\n \n -- 두 번째 스테이지 정보\n ssi.second_stage_id,\n ssi.second_stage_name,\n ssi.second_stage_plan_date,\n ssi.second_stage_actual_date,\n \n -- 전체 스테이지 (리비전 및 첨부파일 포함)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 기타\n COALESCE(ac.attachment_count, 0) as attachment_count,\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- projects, vendors 테이블 JOIN (projectId가 이제 documents에 직접 있음)\n LEFT JOIN projects p ON d.project_id = p.id AND p.type = 'ship'\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n -- 스테이지 정보 JOIN\n LEFT JOIN first_stage_info fsi ON d.id = fsi.document_id\n LEFT JOIN second_stage_info ssi ON d.id = ssi.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n LEFT JOIN attachment_counts ac ON d.id = ac.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "simplified_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.stage_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n sd.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM stage_documents sd\n LEFT JOIN stage_issue_stages ist ON sd.id = ist.document_id\n GROUP BY sd.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM stage_issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n -- 문서별 스테이지 집계 (리비전 제외)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'description', ist.description,\n 'notes', ist.notes,\n 'reminderDays', ist.reminder_days\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM stage_issue_stages ist\n GROUP BY ist.document_id\n )\n \n SELECT \n sd.id as document_id,\n sd.doc_number,\n sd.vendor_doc_number,\n sd.title,\n sd.status,\n sd.issued_date,\n \n -- 프로젝트 및 벤더 정보 (직접 참조로 간소화)\n sd.project_id,\n sd.contract_id,\n p.code as project_code,\n sd.vendor_id,\n v.vendor_name,\n v.vendor_code,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 전체 스테이지 (리비전 제외)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 메타 정보\n sd.created_at,\n sd.updated_at\n \n FROM stage_documents sd\n -- 간소화된 JOIN (vendors는 vendor_id로 직접 조인)\n LEFT JOIN projects p ON sd.project_id = p.id\n LEFT JOIN vendors v ON sd.vendor_id = v.id\n \n -- 스테이지 관련 정보 JOIN\n LEFT JOIN document_stats ds ON sd.id = ds.document_id\n LEFT JOIN current_stage_info csi ON sd.id = csi.document_id\n LEFT JOIN stage_aggregation sa ON sd.id = sa.document_id\n \n ORDER BY sd.created_at DESC\n",
+ "name": "stage_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.sync_status_view": {
+ "columns": {
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_changes": {
+ "name": "total_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pending_changes": {
+ "name": "pending_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "synced_changes": {
+ "name": "synced_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "failed_changes": {
+ "name": "failed_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_sync_at": {
+ "name": "last_sync_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "next_sync_at": {
+ "name": "next_sync_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_enabled": {
+ "name": "sync_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n WITH change_stats AS (\n SELECT \n cl.project_id,\n sc.target_system,\n COUNT(*) as total_changes,\n COUNT(CASE WHEN cl.is_synced = false AND cl.sync_attempts < sc.retry_max_attempts THEN 1 END) as pending_changes,\n COUNT(CASE WHEN cl.is_synced = true THEN 1 END) as synced_changes,\n COUNT(CASE WHEN cl.sync_attempts >= sc.retry_max_attempts AND cl.is_synced = false THEN 1 END) as failed_changes,\n MAX(cl.synced_at) as last_sync_at\n FROM change_logs cl\n CROSS JOIN sync_configs sc \n WHERE cl.project_id = sc.project_id\n AND (cl.target_systems IS NULL OR cl.target_systems @> to_jsonb(ARRAY[sc.target_system]))\n GROUP BY cl.project_id, sc.target_system\n )\n SELECT \n cs.project_id,\n cs.target_system,\n COALESCE(cs.total_changes, 0) as total_changes,\n COALESCE(cs.pending_changes, 0) as pending_changes,\n COALESCE(cs.synced_changes, 0) as synced_changes,\n COALESCE(cs.failed_changes, 0) as failed_changes,\n cs.last_sync_at,\n CASE \n WHEN sc.sync_enabled = true AND sc.last_successful_sync IS NOT NULL \n THEN sc.last_successful_sync + (sc.sync_interval_minutes || ' minutes')::interval\n ELSE NULL\n END as next_sync_at,\n sc.sync_enabled\n FROM sync_configs sc\n LEFT JOIN change_stats cs ON sc.project_id = cs.project_id AND sc.target_system = cs.target_system\n",
+ "name": "sync_status_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_documents_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latest_stage_id": {
+ "name": "latest_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_name": {
+ "name": "latest_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_plan_date": {
+ "name": "latest_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_actual_date": {
+ "name": "latest_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision": {
+ "name": "latest_revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_type": {
+ "name": "latest_revision_uploader_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_name": {
+ "name": "latest_revision_uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT \n d.id, \n d.doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n (SELECT id FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_id,\n (SELECT stage_name FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_name,\n (SELECT plan_date FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_plan_date,\n (SELECT actual_date FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_actual_date,\n \n (SELECT r.id FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_id,\n (SELECT r.revision FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision,\n (SELECT r.uploader_type FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_uploader_type,\n (SELECT r.uploader_name FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_uploader_name,\n \n (SELECT COUNT(*) FROM document_attachments a JOIN revisions r ON a.revision_id = r.id JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id) AS attachment_count,\n \n d.created_at,\n d.updated_at\n FROM documents d\n JOIN contracts c ON d.contract_id = c.id\n ",
+ "name": "vendor_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_candidates_with_vendor_info": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'COLLECTED'"
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendor_candidates\".\"id\", \"vendor_candidates\".\"company_name\", \"vendor_candidates\".\"contact_email\", \"vendor_candidates\".\"contact_phone\", \"vendor_candidates\".\"tax_id\", \"vendor_candidates\".\"address\", \"vendor_candidates\".\"country\", \"vendor_candidates\".\"source\", \"vendor_candidates\".\"status\", \"vendor_candidates\".\"items\", \"vendor_candidates\".\"remark\", \"vendor_candidates\".\"created_at\", \"vendor_candidates\".\"updated_at\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendors\".\"created_at\" as \"vendor_created_at\", (\n SELECT l2.\"created_at\"\n FROM \"vendor_candidate_logs\" l2\n WHERE l2.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l2.\"action\" = 'status_change'\n ORDER BY l2.\"created_at\" DESC\n LIMIT 1\n ) as \"last_status_change_at\", (\n SELECT u.\"name\"\n FROM \"users\" u\n JOIN \"vendor_candidate_logs\" l3\n ON l3.\"user_id\" = u.\"id\"\n WHERE l3.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l3.\"action\" = 'status_change'\n ORDER BY l3.\"created_at\" DESC\n LIMIT 1\n ) as \"last_status_change_by\", (\n SELECT l4.\"created_at\"\n FROM \"vendor_candidate_logs\" l4\n WHERE l4.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l4.\"action\" = 'invite_sent'\n ORDER BY l4.\"created_at\" DESC\n LIMIT 1\n ) as \"last_invitation_at\", (\n SELECT u2.\"name\"\n FROM \"users\" u2\n JOIN \"vendor_candidate_logs\" l5\n ON l5.\"user_id\" = u2.\"id\"\n WHERE l5.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l5.\"action\" = 'invite_sent'\n ORDER BY l5.\"created_at\" DESC\n LIMIT 1\n ) as \"last_invitation_by\" from \"vendor_candidates\" left join \"vendors\" on \"vendor_candidates\".\"vendor_id\" = \"vendors\".\"id\"",
+ "name": "vendor_candidates_with_vendor_info",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "business_size": {
+ "name": "business_size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corporate_registration_number": {
+ "name": "corporate_registration_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_agency": {
+ "name": "credit_agency",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_rating": {
+ "name": "credit_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cash_flow_rating": {
+ "name": "cash_flow_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"id\", \"vendor_name\", \"vendor_code\", \"tax_id\", \"address\", \"business_size\", \"country\", \"phone\", \"email\", \"website\", \"status\", \"representative_name\", \"representative_birth\", \"representative_email\", \"representative_phone\", \"corporate_registration_number\", \"credit_agency\", \"credit_rating\", \"cash_flow_rating\", \"created_at\", \"updated_at\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', c.id,\n 'contactName', c.contact_name,\n 'contactPosition', c.contact_position,\n 'contactEmail', c.contact_email,\n 'contactPhone', c.contact_phone,\n 'isPrimary', c.is_primary\n )\n ),\n '[]'::json\n )\n FROM vendor_contacts c\n WHERE c.vendor_id = vendors.id)\n as \"contacts\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', a.id,\n 'fileName', a.file_name,\n 'filePath', a.file_path,\n 'attachmentType', a.attachment_type,\n 'createdAt', a.created_at\n )\n ORDER BY a.attachment_type, a.created_at DESC\n ),\n '[]'::json\n )\n FROM vendor_attachments a\n WHERE a.vendor_id = vendors.id)\n as \"attachments\", \n (SELECT COUNT(*)\n FROM vendor_attachments a\n WHERE a.vendor_id = vendors.id)\n as \"attachment_count\", \n (SELECT COUNT(*) \n FROM vendor_contacts c\n WHERE c.vendor_id = vendors.id)\n as \"contact_count\" from \"vendors\"",
+ "name": "vendor_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_items_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"vendor_possible_items\".\"id\", \"vendor_possible_items\".\"vendor_id\", \"items\".\"item_name\", \"items\".\"item_code\", \"items\".\"description\", \"vendor_possible_items\".\"created_at\", \"vendor_possible_items\".\"updated_at\" from \"vendor_possible_items\" left join \"items\" on \"vendor_possible_items\".\"item_code\" = \"items\".\"item_code\"",
+ "name": "vendor_items_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_materials_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"vendor_possible_materials\".\"id\", \"vendor_possible_materials\".\"vendor_id\", \"materials\".\"item_name\", \"materials\".\"item_code\", \"materials\".\"description\", \"materials\".\"unit_of_measure\", \"materials\".\"steel_type\", \"materials\".\"grade_material\", \"vendor_possible_materials\".\"created_at\", \"vendor_possible_materials\".\"updated_at\" from \"vendor_possible_materials\" left join \"materials\" on \"vendor_possible_materials\".\"item_code\" = \"materials\".\"item_code\"",
+ "name": "vendor_materials_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendors_with_types": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"tax_id\" as \"tax_id\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"phone\" as \"phone\", \"vendors\".\"email\" as \"email\", \"vendors\".\"business_size\" as \"business_size\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"status\", \"vendors\".\"vendor_type_id\" as \"vendor_type_id\", \"vendors\".\"representative_name\" as \"representative_name\", \"vendors\".\"representative_birth\" as \"representative_birth\", \"vendors\".\"representative_email\" as \"representative_email\", \"vendors\".\"representative_phone\" as \"representative_phone\", \"vendors\".\"corporate_registration_number\" as \"corporate_registration_number\", \"vendors\".\"items\" as \"items\", \"vendors\".\"credit_agency\" as \"credit_agency\", \"vendors\".\"credit_rating\" as \"credit_rating\", \"vendors\".\"cash_flow_rating\" as \"cash_flow_rating\", \"vendors\".\"created_at\" as \"created_at\", \"vendors\".\"updated_at\" as \"updated_at\", \"vendor_types\".\"name_ko\" as \"vendor_type_name\", \"vendor_types\".\"name_en\" as \"vendor_type_name_en\", \"vendor_types\".\"code\" as \"vendor_type_code\", \n CASE\n WHEN \"vendors\".\"status\" = 'ACTIVE' THEN '정규업체'\n WHEN \"vendors\".\"status\" IN ('INACTIVE', 'BLACKLISTED', 'REJECTED') THEN ''\n ELSE '잠재업체'\n END\n as \"vendor_category\" from \"vendors\" left join \"vendor_types\" on \"vendors\".\"vendor_type_id\" = \"vendor_types\".\"id\"",
+ "name": "vendors_with_types",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.basic_contract_view": {
+ "columns": {},
+ "definition": "select \"basic_contract\".\"id\" as \"id\", \"basic_contract\".\"template_id\" as \"template_id\", \"basic_contract\".\"vendor_id\" as \"vendor_id\", \"basic_contract\".\"requested_by\" as \"requested_by\", \"basic_contract\".\"status\" as \"basic_contract_status\", \"basic_contract\".\"created_at\" as \"created_at\", \"basic_contract\".\"updated_at\" as \"updated_at\", \"basic_contract\".\"completed_at\" as \"completed_at\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"email\" as \"vendor_email\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"users\".\"name\" as \"requested_by_name\", \"basic_contract_templates\".\"template_name\" as \"template_name\", \"basic_contract_templates\".\"revision\" as \"template_revision\", \"basic_contract_templates\".\"status\" as \"template_status\", \"basic_contract_templates\".\"validity_period\" as \"validity_period\", \"basic_contract_templates\".\"legal_review_required\" as \"legal_review_required\", \"basic_contract_templates\".\"shipbuilding_applicable\" as \"shipbuilding_applicable\", \"basic_contract_templates\".\"wind_applicable\" as \"wind_applicable\", \"basic_contract_templates\".\"pc_applicable\" as \"pc_applicable\", \"basic_contract_templates\".\"nb_applicable\" as \"nb_applicable\", \"basic_contract_templates\".\"rc_applicable\" as \"rc_applicable\", \"basic_contract_templates\".\"gy_applicable\" as \"gy_applicable\", \"basic_contract_templates\".\"sys_applicable\" as \"sys_applicable\", \"basic_contract_templates\".\"infra_applicable\" as \"infra_applicable\", \"basic_contract_templates\".\"file_path\" as \"template_file_path\", \"basic_contract_templates\".\"file_name\" as \"template_file_name\", \"basic_contract\".\"file_path\" as \"signed_file_path\", \"basic_contract\".\"file_name\" as \"signed_file_name\", \"basic_contract_templates\".\"created_at\" as \"template_created_at\", \"basic_contract_templates\".\"created_by\" as \"template_created_by\", \"basic_contract_templates\".\"updated_at\" as \"template_updated_at\", \"basic_contract_templates\".\"updated_by\" as \"template_updated_by\", \"basic_contract_templates\".\"disposed_at\" as \"template_disposed_at\", \"basic_contract_templates\".\"restored_at\" as \"template_restored_at\" from \"basic_contract\" left join \"vendors\" on \"basic_contract\".\"vendor_id\" = \"vendors\".\"id\" left join \"users\" on \"basic_contract\".\"requested_by\" = \"users\".\"id\" left join \"basic_contract_templates\" on \"basic_contract\".\"template_id\" = \"basic_contract_templates\".\"id\"",
+ "name": "basic_contract_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.pr_items_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_item": {
+ "name": "rfq_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item": {
+ "name": "pr_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_no": {
+ "name": "pr_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_category": {
+ "name": "material_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "acc": {
+ "name": "acc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "size": {
+ "name": "size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gross_weight": {
+ "name": "gross_weight",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "gw_uom": {
+ "name": "gw_uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_no": {
+ "name": "spec_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_url": {
+ "name": "spec_url",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tracking_no": {
+ "name": "tracking_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_yn": {
+ "name": "major_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "project_def": {
+ "name": "project_def",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_sc": {
+ "name": "project_sc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_kl": {
+ "name": "project_kl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_lc": {
+ "name": "project_lc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_dl": {
+ "name": "project_dl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"pr_items\".\"id\", \"pr_items\".\"procurement_rfqs_id\", \"pr_items\".\"rfq_item\", \"pr_items\".\"pr_item\", \"pr_items\".\"pr_no\", \"pr_items\".\"material_code\", \"pr_items\".\"material_category\", \"pr_items\".\"acc\", \"pr_items\".\"material_description\", \"pr_items\".\"size\", \"pr_items\".\"delivery_date\", \"pr_items\".\"quantity\", \"pr_items\".\"uom\", \"pr_items\".\"gross_weight\", \"pr_items\".\"gw_uom\", \"pr_items\".\"spec_no\", \"pr_items\".\"spec_url\", \"pr_items\".\"tracking_no\", \"pr_items\".\"major_yn\", \"pr_items\".\"project_def\", \"pr_items\".\"project_sc\", \"pr_items\".\"project_kl\", \"pr_items\".\"project_lc\", \"pr_items\".\"project_dl\", \"pr_items\".\"remark\", \"procurement_rfqs\".\"rfq_code\", \"procurement_rfqs\".\"item_code\", \"procurement_rfqs\".\"item_name\" from \"pr_items\" left join \"procurement_rfqs\" on \"pr_items\".\"procurement_rfqs_id\" = \"procurement_rfqs\".\"id\"",
+ "name": "pr_items_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.procurement_rfq_details_view": {
+ "columns": {},
+ "definition": "select \"rfq_details\".\"id\" as \"detail_id\", \"rfqs\".\"id\" as \"rfq_id\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"rfqs\".\"item_code\" as \"item_code\", \"rfqs\".\"item_name\" as \"item_name\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"country\" as \"vendor_country\", \"rfq_details\".\"currency\" as \"currency\", \"payment_terms\".\"code\" as \"payment_terms_code\", \"payment_terms\".\"description\" as \"payment_terms_description\", \"incoterms\".\"code\" as \"incoterms_code\", \"incoterms\".\"description\" as \"incoterms_description\", \"rfq_details\".\"incoterms_detail\" as \"incoterms_detail\", \"rfq_details\".\"delivery_date\" as \"delivery_date\", \"rfq_details\".\"tax_code\" as \"tax_code\", \"rfq_details\".\"place_of_shipping\" as \"place_of_shipping\", \"rfq_details\".\"place_of_destination\" as \"place_of_destination\", \"rfq_details\".\"material_price_related_yn\" as \"material_price_related_yn\", \"updated_by_user\".\"name\" as \"updated_by_user_name\", \"rfq_details\".\"updated_at\" as \"updated_at\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"rfqs\".\"id\"\n ) as \"pr_items_count\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"rfqs\".\"id\" \n AND major_yn = true\n ) as \"major_items_count\", (\n SELECT COUNT(*) \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"comment_count\", (\n SELECT created_at \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"last_comment_date\", (\n SELECT created_at \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\" AND is_vendor_comment = true\n ORDER BY created_at DESC LIMIT 1\n ) as \"last_vendor_comment_date\", (\n SELECT COUNT(*) \n FROM procurement_rfq_attachments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"attachment_count\", (\n SELECT COUNT(*) > 0\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"has_quotation\", (\n SELECT status\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"quotation_status\", (\n SELECT total_price\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"quotation_total_price\", (\n SELECT quotation_version\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY quotation_version DESC LIMIT 1\n ) as \"quotation_version\", (\n SELECT COUNT(DISTINCT quotation_version)\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"quotation_version_count\", (\n SELECT created_at\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY quotation_version DESC LIMIT 1\n ) as \"last_quotation_date\" from \"procurement_rfq_details\" \"rfq_details\" left join \"procurement_rfqs\" \"rfqs\" on \"rfq_details\".\"procurement_rfqs_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendors\" on \"rfq_details\".\"vendors_id\" = \"vendors\".\"id\" left join \"payment_terms\" on \"rfq_details\".\"payment_terms_code\" = \"payment_terms\".\"code\" left join \"incoterms\" on \"rfq_details\".\"incoterms_code\" = \"incoterms\".\"code\" left join \"users\" \"updated_by_user\" on \"rfq_details\".\"updated_by\" = \"updated_by_user\".\"id\"",
+ "name": "procurement_rfq_details_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.procurement_rfqs_view": {
+ "columns": {},
+ "definition": "select \"procurement_rfqs\".\"id\" as \"id\", \"procurement_rfqs\".\"rfq_code\" as \"rfq_code\", \"procurement_rfqs\".\"series\" as \"series\", \"procurement_rfqs\".\"rfq_sealed_yn\" as \"rfq_sealed_yn\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"procurement_rfqs\".\"item_code\" as \"item_code\", \"procurement_rfqs\".\"item_name\" as \"item_name\", \"procurement_rfqs\".\"status\" as \"status\", \"procurement_rfqs\".\"pic_code\" as \"pic_code\", \"procurement_rfqs\".\"rfq_send_date\" as \"rfq_send_date\", \"procurement_rfqs\".\"due_date\" as \"due_date\", (\n SELECT MIN(submitted_at)\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"procurement_rfqs\".\"id\"\n AND submitted_at IS NOT NULL\n ) as \"earliest_quotation_submitted_at\", \"created_by_user\".\"name\" as \"created_by_user_name\", \"sent_by_user\".\"name\" as \"sent_by_user_name\", \"procurement_rfqs\".\"updated_at\" as \"updated_at\", \"updated_by_user\".\"name\" as \"updated_by_user_name\", \"procurement_rfqs\".\"remark\" as \"remark\", (\n SELECT material_code \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n AND major_yn = true\n LIMIT 1\n ) as \"major_item_material_code\", (\n SELECT pr_no \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n AND major_yn = true\n LIMIT 1\n ) as \"po_no\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n ) as \"pr_items_count\" from \"procurement_rfqs\" left join \"projects\" on \"procurement_rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" \"created_by_user\" on \"procurement_rfqs\".\"created_by\" = \"created_by_user\".\"id\" left join \"users\" \"updated_by_user\" on \"procurement_rfqs\".\"updated_by\" = \"updated_by_user\".\"id\" left join \"users\" \"sent_by_user\" on \"procurement_rfqs\".\"sent_by\" = \"sent_by_user\".\"id\"",
+ "name": "procurement_rfqs_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.attachment_revision_history": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_id": {
+ "name": "client_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_no": {
+ "name": "client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_name": {
+ "name": "client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_path": {
+ "name": "client_file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_size": {
+ "name": "client_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_comment": {
+ "name": "client_revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_created_at": {
+ "name": "client_revision_created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest_client_revision": {
+ "name": "is_latest_client_revision",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_vendor_responses": {
+ "name": "total_vendor_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_vendors": {
+ "name": "responded_vendors",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pending_vendors": {
+ "name": "pending_vendors",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n ba.id as attachment_id,\n ba.attachment_type,\n ba.serial_no,\n \n -- 발주처 리비전 정보\n rev.id as client_revision_id,\n rev.revision_no as client_revision_no,\n rev.original_file_name as client_file_name,\n rev.file_size as client_file_size,\n rev.file_path as client_file_path,\n rev.revision_comment as client_revision_comment,\n rev.created_at as client_revision_created_at,\n rev.is_latest as is_latest_client_revision,\n \n -- 벤더 응답 통계\n COALESCE(response_stats.total_responses, 0) as total_vendor_responses,\n COALESCE(response_stats.responded_count, 0) as responded_vendors,\n COALESCE(response_stats.pending_count, 0) as pending_vendors,\n COALESCE(response_stats.total_files, 0) as total_response_files\n \n FROM b_rfqs br\n JOIN b_rfq_attachments ba ON br.id = ba.rfq_id\n JOIN b_rfq_attachment_revisions rev ON ba.id = rev.attachment_id\n LEFT JOIN (\n SELECT \n var.attachment_id,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN var.response_status = 'NOT_RESPONDED' THEN 1 END) as pending_count,\n COUNT(vra.id) as total_files\n FROM vendor_attachment_responses var\n LEFT JOIN vendor_response_attachments_b vra ON var.id = vra.vendor_response_id\n GROUP BY var.attachment_id\n ) response_stats ON ba.id = response_stats.attachment_id\n \n ORDER BY ba.id, rev.created_at DESC\n",
+ "name": "attachment_revision_history",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.attachments_with_latest_revision": {
+ "columns": {
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_comment": {
+ "name": "revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n a.id as attachment_id,\n a.attachment_type,\n a.serial_no,\n a.rfq_id,\n a.description,\n a.current_revision,\n \n r.id as revision_id,\n r.file_name,\n r.original_file_name,\n r.file_path,\n r.file_size,\n r.file_type,\n r.revision_comment,\n \n a.created_by,\n u.name as created_by_name,\n a.created_at,\n a.updated_at\n FROM b_rfq_attachments a\n LEFT JOIN b_rfq_attachment_revisions r ON a.latest_revision_id = r.id\n LEFT JOIN users u ON a.created_by = u.id\n ",
+ "name": "attachments_with_latest_revision",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.b_rfqs_master": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_type": {
+ "name": "project_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.description,\n br.status,\n br.due_date,\n br.pic_code,\n br.pic_name,\n br.eng_pic_name,\n br.package_no,\n br.package_name,\n br.project_id,\n p.code as project_code,\n p.name as project_name,\n p.type as project_type,\n br.project_company,\n br.project_flag,\n br.project_site,\n COALESCE(att_count.total_attachments, 0) as total_attachments,\n br.created_at,\n br.updated_at\n FROM b_rfqs br\n LEFT JOIN projects p ON br.project_id = p.id\n LEFT JOIN (\n SELECT rfq_id, COUNT(*) as total_attachments\n FROM b_rfq_attachments\n GROUP BY rfq_id\n ) att_count ON br.id = att_count.rfq_id\n",
+ "name": "b_rfqs_master",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.final_rfq_detail": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_rfq_id": {
+ "name": "final_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_rfq_status": {
+ "name": "final_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_description": {
+ "name": "incoterms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_description": {
+ "name": "payment_terms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "firsttime_yn": {
+ "name": "firsttime_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_remark": {
+ "name": "vendor_remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n fr.id as final_rfq_id,\n fr.final_rfq_status,\n fr.vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n fr.due_date,\n fr.valid_date,\n fr.delivery_date,\n fr.incoterms_code,\n inc.description as incoterms_description,\n fr.payment_terms_code,\n pt.description as payment_terms_description,\n fr.currency,\n fr.tax_code,\n fr.place_of_shipping,\n fr.place_of_destination,\n fr.short_list,\n fr.return_yn,\n fr.cp_request_yn,\n fr.prject_gtc_yn,\n fr.firsttime_yn,\n fr.material_price_related_yn,\n fr.return_revision,\n fr.gtc,\n fr.gtc_valid_date,\n fr.classification,\n fr.sparepart,\n fr.remark,\n fr.vendor_remark,\n fr.created_at,\n fr.updated_at\n FROM b_rfqs br\n JOIN final_rfq fr ON br.id = fr.rfq_id\n LEFT JOIN vendors v ON fr.vendor_id = v.id\n LEFT JOIN incoterms inc ON fr.incoterms_code = inc.code\n LEFT JOIN payment_terms pt ON fr.payment_terms_code = pt.code\n",
+ "name": "final_rfq_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.initial_rfq_detail": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_rfq_id": {
+ "name": "initial_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_rfq_status": {
+ "name": "initial_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_category": {
+ "name": "vendor_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_description": {
+ "name": "incoterms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_revision": {
+ "name": "rfq_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n ir.id as initial_rfq_id,\n ir.initial_rfq_status,\n ir.vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n v.vendor_category as vendor_category,\n ir.due_date,\n ir.valid_date,\n ir.incoterms_code,\n inc.description as incoterms_description,\n ir.short_list,\n ir.return_yn,\n ir.cp_request_yn,\n ir.prject_gtc_yn,\n ir.return_revision,\n ir.rfq_revision,\n ir.gtc,\n ir.gtc_valid_date,\n ir.classification,\n ir.sparepart,\n ir.created_at,\n ir.updated_at\n FROM b_rfqs br\n JOIN initial_rfq ir ON br.id = ir.rfq_id\n LEFT JOIN vendors_with_types v ON ir.vendor_id = v.id\n LEFT JOIN incoterms inc ON ir.incoterms_code = inc.code\n",
+ "name": "initial_rfq_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfq_dashboard": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_vendor_count": {
+ "name": "initial_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_vendor_count": {
+ "name": "final_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_response_rate": {
+ "name": "initial_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_response_rate": {
+ "name": "final_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "overall_progress": {
+ "name": "overall_progress",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_to_deadline": {
+ "name": "days_to_deadline",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by_name": {
+ "name": "updated_by_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by_email": {
+ "name": "updated_by_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n -- ② SELECT 절 확장 -------------------------------------------\n SELECT\n br.id AS rfq_id,\n br.rfq_code,\n br.description,\n br.status,\n br.due_date,\n p.code AS project_code,\n p.name AS project_name,\n br.package_no,\n br.package_name,\n br.pic_code,\n br.pic_name,\n br.eng_pic_name,\n br.project_company,\n br.project_flag,\n br.project_site,\n br.remark,\n \n -- 첨부/벤더 요약 -----------------------\n COALESCE(att_count.total_attachments, 0) AS total_attachments,\n COALESCE(init_summary.vendor_count, 0) AS initial_vendor_count,\n COALESCE(final_summary.vendor_count, 0) AS final_vendor_count,\n COALESCE(init_summary.avg_response_rate, 0) AS initial_response_rate,\n COALESCE(final_summary.avg_response_rate, 0) AS final_response_rate,\n \n -- 진행률·마감까지 일수 --------------\n CASE \n WHEN br.status = 'DRAFT' THEN 0\n WHEN br.status = 'Doc. Received' THEN 10\n WHEN br.status = 'PIC Assigned' THEN 20\n WHEN br.status = 'Doc. Confirmed' THEN 30\n WHEN br.status = 'Init. RFQ Sent' THEN 40\n WHEN br.status = 'Init. RFQ Answered' THEN 50\n WHEN br.status = 'TBE started' THEN 60\n WHEN br.status = 'TBE finished' THEN 70\n WHEN br.status = 'Final RFQ Sent' THEN 80\n WHEN br.status = 'Quotation Received' THEN 90\n WHEN br.status = 'Vendor Selected' THEN 100\n ELSE 0\n END AS overall_progress,\n (br.due_date - CURRENT_DATE) AS days_to_deadline,\n \n br.created_at,\n br.updated_at,\n \n -- 💡 추가되는 컬럼 -------------------\n upd.name AS updated_by_name,\n upd.email AS updated_by_email\n FROM b_rfqs br\n LEFT JOIN projects p ON br.project_id = p.id\n \n -- ③ 사용자 정보 조인 --------------------\n LEFT JOIN users upd ON br.updated_by = upd.id\n \n -- (나머지 이미 있던 JOIN 들은 그대로) -----\n LEFT JOIN (\n SELECT rfq_id, COUNT(*) AS total_attachments\n FROM b_rfq_attachments\n GROUP BY rfq_id\n ) att_count ON br.id = att_count.rfq_id\n \n LEFT JOIN (\n SELECT \n rfq_id, \n COUNT(DISTINCT vendor_id) AS vendor_count,\n AVG(response_rate) AS avg_response_rate\n FROM vendor_response_summary\n WHERE rfq_type = 'INITIAL'\n GROUP BY rfq_id\n ) init_summary ON br.id = init_summary.rfq_id\n \n LEFT JOIN (\n SELECT \n rfq_id, \n COUNT(DISTINCT vendor_id) AS vendor_count,\n AVG(response_rate) AS avg_response_rate\n FROM vendor_response_summary\n WHERE rfq_type = 'FINAL'\n GROUP BY rfq_id\n ) final_summary ON br.id = final_summary.rfq_id\n ",
+ "name": "rfq_dashboard",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfq_progress_summary": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_to_deadline": {
+ "name": "days_to_deadline",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachments_with_multiple_revisions": {
+ "name": "attachments_with_multiple_revisions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_client_revisions": {
+ "name": "total_client_revisions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_vendor_count": {
+ "name": "initial_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_total_responses": {
+ "name": "initial_total_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_responded_count": {
+ "name": "initial_responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_up_to_date_count": {
+ "name": "initial_up_to_date_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_version_mismatch_count": {
+ "name": "initial_version_mismatch_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_response_rate": {
+ "name": "initial_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_version_match_rate": {
+ "name": "initial_version_match_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_vendor_count": {
+ "name": "final_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_total_responses": {
+ "name": "final_total_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_responded_count": {
+ "name": "final_responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_up_to_date_count": {
+ "name": "final_up_to_date_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_version_mismatch_count": {
+ "name": "final_version_mismatch_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_response_rate": {
+ "name": "final_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_version_match_rate": {
+ "name": "final_version_match_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n br.due_date,\n (br.due_date - CURRENT_DATE) as days_to_deadline,\n \n -- 첨부파일 통계\n attachment_stats.total_attachments,\n attachment_stats.attachments_with_multiple_revisions,\n attachment_stats.total_client_revisions,\n \n -- Initial RFQ 통계\n COALESCE(initial_stats.vendor_count, 0) as initial_vendor_count,\n COALESCE(initial_stats.total_responses, 0) as initial_total_responses,\n COALESCE(initial_stats.responded_count, 0) as initial_responded_count,\n COALESCE(initial_stats.up_to_date_count, 0) as initial_up_to_date_count,\n COALESCE(initial_stats.version_mismatch_count, 0) as initial_version_mismatch_count,\n COALESCE(initial_stats.response_rate, 0) as initial_response_rate,\n COALESCE(initial_stats.version_match_rate, 0) as initial_version_match_rate,\n \n -- Final RFQ 통계\n COALESCE(final_stats.vendor_count, 0) as final_vendor_count,\n COALESCE(final_stats.total_responses, 0) as final_total_responses,\n COALESCE(final_stats.responded_count, 0) as final_responded_count,\n COALESCE(final_stats.up_to_date_count, 0) as final_up_to_date_count,\n COALESCE(final_stats.version_mismatch_count, 0) as final_version_mismatch_count,\n COALESCE(final_stats.response_rate, 0) as final_response_rate,\n COALESCE(final_stats.version_match_rate, 0) as final_version_match_rate,\n \n COALESCE(file_stats.total_files, 0) as total_response_files\n \n FROM b_rfqs br\n LEFT JOIN (\n SELECT \n ba.rfq_id,\n COUNT(*) as total_attachments,\n COUNT(CASE WHEN rev_count.total_revisions > 1 THEN 1 END) as attachments_with_multiple_revisions,\n SUM(rev_count.total_revisions) as total_client_revisions\n FROM b_rfq_attachments ba\n LEFT JOIN (\n SELECT \n attachment_id,\n COUNT(*) as total_revisions\n FROM b_rfq_attachment_revisions\n GROUP BY attachment_id\n ) rev_count ON ba.id = rev_count.attachment_id\n GROUP BY ba.rfq_id\n ) attachment_stats ON br.id = attachment_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(DISTINCT var.vendor_id) as vendor_count,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) as up_to_date_count,\n COUNT(CASE WHEN vrd.effective_status = 'VERSION_MISMATCH' THEN 1 END) as version_mismatch_count,\n ROUND(\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(*), 0), 2\n ) as response_rate,\n ROUND(\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END), 0), 2\n ) as version_match_rate\n FROM b_rfqs br\n JOIN vendor_response_detail vrd ON br.id = vrd.rfq_id\n JOIN vendor_attachment_responses var ON vrd.response_id = var.id\n WHERE var.rfq_type = 'INITIAL'\n GROUP BY br.id\n ) initial_stats ON br.id = initial_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(DISTINCT var.vendor_id) as vendor_count,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) as up_to_date_count,\n COUNT(CASE WHEN vrd.effective_status = 'VERSION_MISMATCH' THEN 1 END) as version_mismatch_count,\n ROUND(\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(*), 0), 2\n ) as response_rate,\n ROUND(\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END), 0), 2\n ) as version_match_rate\n FROM b_rfqs br\n JOIN vendor_response_detail vrd ON br.id = vrd.rfq_id\n JOIN vendor_attachment_responses var ON vrd.response_id = var.id\n WHERE var.rfq_type = 'FINAL'\n GROUP BY br.id\n ) final_stats ON br.id = final_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(vra.id) as total_files\n FROM b_rfqs br\n JOIN b_rfq_attachments ba ON br.id = ba.rfq_id\n JOIN vendor_attachment_responses var ON ba.id = var.attachment_id\n LEFT JOIN vendor_response_attachments_b vra ON var.id = vra.vendor_response_id\n GROUP BY br.id\n ) file_stats ON br.id = file_stats.rfq_id\n",
+ "name": "rfq_progress_summary",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_attachments_enhanced": {
+ "columns": {
+ "response_attachment_id": {
+ "name": "response_attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_id": {
+ "name": "latest_client_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_no": {
+ "name": "latest_client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_name": {
+ "name": "latest_client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_version_matched": {
+ "name": "is_version_matched",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version_lag": {
+ "name": "version_lag",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "needs_update": {
+ "name": "needs_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_sequence": {
+ "name": "file_sequence",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest_response_file": {
+ "name": "is_latest_response_file",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n vra.id as response_attachment_id,\n vra.vendor_response_id,\n vra.file_name,\n vra.original_file_name,\n vra.file_path,\n vra.file_size,\n vra.file_type,\n vra.description,\n vra.uploaded_at,\n \n -- 응답 기본 정보\n var.attachment_id,\n var.vendor_id,\n var.rfq_type,\n var.rfq_record_id,\n var.response_status,\n var.current_revision,\n var.responded_revision,\n \n -- 코멘트 (새로 추가된 필드 포함)\n var.response_comment,\n var.vendor_comment,\n var.revision_request_comment,\n \n -- 날짜 (새로 추가된 필드 포함)\n var.requested_at,\n var.responded_at,\n var.revision_requested_at,\n \n -- 첨부파일 정보\n ba.attachment_type,\n ba.serial_no,\n ba.rfq_id,\n \n -- 벤더 정보\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n \n -- 발주처 현재 리비전 정보\n latest_rev.id as latest_client_revision_id,\n latest_rev.revision_no as latest_client_revision_no,\n latest_rev.original_file_name as latest_client_file_name,\n \n -- 리비전 비교\n CASE \n WHEN var.responded_revision = ba.current_revision THEN true \n ELSE false \n END as is_version_matched,\n \n -- 버전 차이 계산 (Rev.0, Rev.1 형태 가정)\n CASE \n WHEN var.responded_revision IS NULL THEN NULL\n WHEN ba.current_revision IS NULL THEN NULL\n ELSE CAST(SUBSTRING(ba.current_revision FROM '[0-9]+') AS INTEGER) - \n CAST(SUBSTRING(var.responded_revision FROM '[0-9]+') AS INTEGER)\n END as version_lag,\n \n CASE \n WHEN var.response_status = 'RESPONDED' \n AND var.responded_revision != ba.current_revision THEN true \n ELSE false \n END as needs_update,\n \n -- 파일 순서\n ROW_NUMBER() OVER (\n PARTITION BY var.id \n ORDER BY vra.uploaded_at DESC\n ) as file_sequence,\n \n -- 최신 응답 파일 여부\n CASE \n WHEN ROW_NUMBER() OVER (\n PARTITION BY var.id \n ORDER BY vra.uploaded_at DESC\n ) = 1 THEN true \n ELSE false \n END as is_latest_response_file\n \n FROM vendor_response_attachments_b vra\n JOIN vendor_attachment_responses var ON vra.vendor_response_id = var.id\n JOIN b_rfq_attachments ba ON var.attachment_id = ba.id\n LEFT JOIN vendors v ON var.vendor_id = v.id\n LEFT JOIN b_rfq_attachment_revisions latest_rev ON ba.latest_revision_id = latest_rev.id\n",
+ "name": "vendor_response_attachments_enhanced",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_detail": {
+ "columns": {
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_description": {
+ "name": "attachment_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_no": {
+ "name": "latest_client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_name": {
+ "name": "latest_client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_size": {
+ "name": "latest_client_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_comment": {
+ "name": "latest_client_revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_version_matched": {
+ "name": "is_version_matched",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version_lag": {
+ "name": "version_lag",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "needs_update": {
+ "name": "needs_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_multiple_revisions": {
+ "name": "has_multiple_revisions",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_file_name": {
+ "name": "latest_response_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_file_size": {
+ "name": "latest_response_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_uploaded_at": {
+ "name": "latest_response_uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "effective_status": {
+ "name": "effective_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n var.id as response_id,\n ba.rfq_id,\n br.rfq_code,\n var.rfq_type,\n var.rfq_record_id,\n \n -- 첨부파일 정보\n ba.id as attachment_id,\n ba.attachment_type,\n ba.serial_no,\n ba.description as attachment_description,\n \n -- 벤더 정보\n v.id as vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n \n -- 응답 상태\n var.response_status,\n var.current_revision,\n var.responded_revision,\n \n -- 코멘트 (새로 추가된 필드 포함)\n var.response_comment,\n var.vendor_comment,\n var.revision_request_comment,\n \n -- 날짜 (새로 추가된 필드 포함)\n var.requested_at,\n var.responded_at,\n var.revision_requested_at,\n \n -- 발주처 최신 리비전\n latest_rev.revision_no as latest_client_revision_no,\n latest_rev.original_file_name as latest_client_file_name,\n latest_rev.file_size as latest_client_file_size,\n latest_rev.revision_comment as latest_client_revision_comment,\n \n -- 리비전 분석\n CASE \n WHEN var.responded_revision = ba.current_revision THEN true \n ELSE false \n END as is_version_matched,\n \n CASE \n WHEN var.responded_revision IS NULL OR ba.current_revision IS NULL THEN NULL\n ELSE CAST(SUBSTRING(ba.current_revision FROM '[0-9]+') AS INTEGER) - \n CAST(SUBSTRING(var.responded_revision FROM '[0-9]+') AS INTEGER)\n END as version_lag,\n \n CASE \n WHEN var.response_status = 'RESPONDED' \n AND var.responded_revision != ba.current_revision THEN true \n ELSE false \n END as needs_update,\n \n CASE \n WHEN revision_count.total_revisions > 1 THEN true \n ELSE false \n END as has_multiple_revisions,\n \n -- 응답 파일 정보\n COALESCE(file_stats.total_files, 0) as total_response_files,\n file_stats.latest_file_name as latest_response_file_name,\n file_stats.latest_file_size as latest_response_file_size,\n file_stats.latest_uploaded_at as latest_response_uploaded_at,\n \n -- 효과적인 상태\n CASE \n WHEN var.response_status = 'NOT_RESPONDED' THEN 'NOT_RESPONDED'\n WHEN var.response_status = 'WAIVED' THEN 'WAIVED'\n WHEN var.response_status = 'REVISION_REQUESTED' THEN 'REVISION_REQUESTED'\n WHEN var.response_status = 'RESPONDED' AND var.responded_revision = ba.current_revision THEN 'UP_TO_DATE'\n WHEN var.response_status = 'RESPONDED' AND var.responded_revision != ba.current_revision THEN 'VERSION_MISMATCH'\n ELSE var.response_status\n END as effective_status\n \n FROM vendor_attachment_responses var\n JOIN b_rfq_attachments ba ON var.attachment_id = ba.id\n JOIN b_rfqs br ON ba.rfq_id = br.id\n LEFT JOIN vendors v ON var.vendor_id = v.id\n LEFT JOIN b_rfq_attachment_revisions latest_rev ON ba.latest_revision_id = latest_rev.id\n LEFT JOIN (\n SELECT \n attachment_id,\n COUNT(*) as total_revisions\n FROM b_rfq_attachment_revisions\n GROUP BY attachment_id\n ) revision_count ON ba.id = revision_count.attachment_id\n LEFT JOIN (\n SELECT \n vendor_response_id,\n COUNT(*) as total_files,\n MAX(original_file_name) as latest_file_name,\n MAX(file_size) as latest_file_size,\n MAX(uploaded_at) as latest_uploaded_at\n FROM vendor_response_attachments_b\n GROUP BY vendor_response_id\n ) file_stats ON var.id = file_stats.vendor_response_id\n",
+ "name": "vendor_response_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_summary": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_count": {
+ "name": "responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pending_count": {
+ "name": "pending_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "waived_count": {
+ "name": "waived_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_count": {
+ "name": "revision_requested_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_rate": {
+ "name": "response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completion_rate": {
+ "name": "completion_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n v.id as vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n var.rfq_type,\n COUNT(var.id) as total_attachments,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN var.response_status = 'NOT_RESPONDED' THEN 1 END) as pending_count,\n COUNT(CASE WHEN var.response_status = 'WAIVED' THEN 1 END) as waived_count,\n COUNT(CASE WHEN var.response_status = 'REVISION_REQUESTED' THEN 1 END) as revision_requested_count,\n ROUND(\n (COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status != 'WAIVED' THEN 1 END), 0)), \n 2\n ) as response_rate,\n ROUND(\n ((COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) + \n COUNT(CASE WHEN var.response_status = 'WAIVED' THEN 1 END)) * 100.0 / COUNT(var.id)), \n 2\n ) as completion_rate\n FROM b_rfqs br\n JOIN b_rfq_attachments bra ON br.id = bra.rfq_id\n JOIN vendor_attachment_responses var ON bra.id = var.attachment_id\n JOIN vendors v ON var.vendor_id = v.id\n GROUP BY br.id, br.rfq_code, br.status, v.id, v.vendor_code, v.vendor_name, v.country, v.business_size, var.rfq_type\n",
+ "name": "vendor_response_summary",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.tech_vendor_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_eng": {
+ "name": "country_eng",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_fab": {
+ "name": "country_fab",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_name": {
+ "name": "agent_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_phone": {
+ "name": "agent_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_email": {
+ "name": "agent_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "tech_vendor_type": {
+ "name": "tech_vendor_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"id\", \"vendor_name\", \"vendor_code\", \"tax_id\", \"address\", \"country\", \"country_eng\", \"country_fab\", \"agent_name\", \"agent_phone\", \"agent_email\", \"phone\", \"email\", \"website\", \"status\", \"tech_vendor_type\", \"representative_name\", \"representative_email\", \"representative_phone\", \"representative_birth\", \"created_at\", \"updated_at\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', c.id,\n 'contactName', c.contact_name,\n 'contactPosition', c.contact_position,\n 'contactTitle', c.contact_title,\n 'contactEmail', c.contact_email,\n 'contactPhone', c.contact_phone,\n 'isPrimary', c.is_primary\n )\n ),\n '[]'::json\n )\n FROM tech_vendor_contacts c\n WHERE c.vendor_id = tech_vendors.id)\n as \"contacts\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', a.id,\n 'fileName', a.file_name,\n 'filePath', a.file_path,\n 'attachmentType', a.attachment_type,\n 'createdAt', a.created_at\n )\n ORDER BY a.attachment_type, a.created_at DESC\n ),\n '[]'::json\n )\n FROM tech_vendor_attachments a\n WHERE a.vendor_id = tech_vendors.id)\n as \"attachments\", \n (SELECT COUNT(*)\n FROM tech_vendor_attachments a\n WHERE a.vendor_id = tech_vendors.id)\n as \"attachment_count\", \n (SELECT COUNT(*) \n FROM vendor_contacts c\n WHERE c.vendor_id = tech_vendors.id)\n as \"contact_count\", \n (SELECT COUNT(*) \n FROM tech_vendor_possible_items i\n WHERE i.vendor_id = tech_vendors.id)\n as \"item_count\" from \"tech_vendors\"",
+ "name": "tech_vendor_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.esg_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"esg_evaluations\".\"id\", \"esg_evaluations\".\"serial_number\", \"esg_evaluations\".\"category\", \"esg_evaluations\".\"inspection_item\", \"esg_evaluations\".\"is_active\", \"esg_evaluations\".\"created_at\", \"esg_evaluations\".\"updated_at\", count(distinct \"esg_evaluation_items\".\"id\") as \"total_evaluation_items\", count(\"esg_answer_options\".\"id\") as \"total_answer_options\", coalesce(sum(\"esg_answer_options\".\"score\"), 0) as \"max_possible_score\", \n (\n SELECT array_agg(evaluation_item order by order_index) \n FROM esg_evaluation_items \n WHERE esg_evaluation_id = \"esg_evaluations\".\"id\" \n AND is_active = true \n AND evaluation_item is not null\n )\n as \"evaluation_items_list\" from \"esg_evaluations\" left join \"esg_evaluation_items\" on \"esg_evaluations\".\"id\" = \"esg_evaluation_items\".\"esg_evaluation_id\" AND \"esg_evaluation_items\".\"is_active\" = true left join \"esg_answer_options\" on \"esg_evaluation_items\".\"id\" = \"esg_answer_options\".\"esg_evaluation_item_id\" AND \"esg_answer_options\".\"is_active\" = true group by \"esg_evaluations\".\"id\", \"esg_evaluations\".\"serial_number\", \"esg_evaluations\".\"category\", \"esg_evaluations\".\"inspection_item\", \"esg_evaluations\".\"is_active\", \"esg_evaluations\".\"created_at\", \"esg_evaluations\".\"updated_at\"",
+ "name": "esg_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.evaluation_targets_with_departments": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"evaluation_targets\".\"id\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"evaluation_targets\".\"status\", \"evaluation_targets\".\"consensus_status\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"confirmed_at\", \"evaluation_targets\".\"confirmed_by\", \"evaluation_targets\".\"ld_claim_count\", \"evaluation_targets\".\"ld_claim_amount\", \"evaluation_targets\".\"ld_claim_currency\", \"evaluation_targets\".\"created_at\", \"evaluation_targets\".\"updated_at\", order_reviewer.name as \"order_reviewer_name\", order_reviewer.email as \"order_reviewer_email\", order_etr.department_name_from as \"order_department_name\", order_review.is_approved as \"order_is_approved\", order_review.reviewed_at as \"order_reviewed_at\", procurement_reviewer.name as \"procurement_reviewer_name\", procurement_reviewer.email as \"procurement_reviewer_email\", procurement_etr.department_name_from as \"procurement_department_name\", procurement_review.is_approved as \"procurement_is_approved\", procurement_review.reviewed_at as \"procurement_reviewed_at\", quality_reviewer.name as \"quality_reviewer_name\", quality_reviewer.email as \"quality_reviewer_email\", quality_etr.department_name_from as \"quality_department_name\", quality_review.is_approved as \"quality_is_approved\", quality_review.reviewed_at as \"quality_reviewed_at\", design_reviewer.name as \"design_reviewer_name\", design_reviewer.email as \"design_reviewer_email\", design_etr.department_name_from as \"design_department_name\", design_review.is_approved as \"design_is_approved\", design_review.reviewed_at as \"design_reviewed_at\", cs_reviewer.name as \"cs_reviewer_name\", cs_reviewer.email as \"cs_reviewer_email\", cs_etr.department_name_from as \"cs_department_name\", cs_review.is_approved as \"cs_is_approved\", cs_review.reviewed_at as \"cs_reviewed_at\" from \"evaluation_targets\" left join evaluation_target_reviewers order_etr on \"evaluation_targets\".\"id\" = order_etr.evaluation_target_id AND order_etr.department_code = 'ORDER_EVAL' left join users order_reviewer on order_etr.reviewer_user_id = order_reviewer.id left join evaluation_target_reviews order_review on \"evaluation_targets\".\"id\" = order_review.evaluation_target_id \n AND order_review.reviewer_user_id = order_reviewer.id \n AND order_review.department_code = 'ORDER_EVAL' left join evaluation_target_reviewers procurement_etr on \"evaluation_targets\".\"id\" = procurement_etr.evaluation_target_id AND procurement_etr.department_code = 'PROCUREMENT_EVAL' left join users procurement_reviewer on procurement_etr.reviewer_user_id = procurement_reviewer.id left join evaluation_target_reviews procurement_review on \"evaluation_targets\".\"id\" = procurement_review.evaluation_target_id \n AND procurement_review.reviewer_user_id = procurement_reviewer.id \n AND procurement_review.department_code = 'PROCUREMENT_EVAL' left join evaluation_target_reviewers quality_etr on \"evaluation_targets\".\"id\" = quality_etr.evaluation_target_id AND quality_etr.department_code = 'QUALITY_EVAL' left join users quality_reviewer on quality_etr.reviewer_user_id = quality_reviewer.id left join evaluation_target_reviews quality_review on \"evaluation_targets\".\"id\" = quality_review.evaluation_target_id \n AND quality_review.reviewer_user_id = quality_reviewer.id \n AND quality_review.department_code = 'QUALITY_EVAL' left join evaluation_target_reviewers design_etr on \"evaluation_targets\".\"id\" = design_etr.evaluation_target_id AND design_etr.department_code = 'DESIGN_EVAL' left join users design_reviewer on design_etr.reviewer_user_id = design_reviewer.id left join evaluation_target_reviews design_review on \"evaluation_targets\".\"id\" = design_review.evaluation_target_id \n AND design_review.reviewer_user_id = design_reviewer.id \n AND design_review.department_code = 'DESIGN_EVAL' left join evaluation_target_reviewers cs_etr on \"evaluation_targets\".\"id\" = cs_etr.evaluation_target_id AND cs_etr.department_code = 'CS_EVAL' left join users cs_reviewer on cs_etr.reviewer_user_id = cs_reviewer.id left join evaluation_target_reviews cs_review on \"evaluation_targets\".\"id\" = cs_review.evaluation_target_id \n AND cs_review.reviewer_user_id = cs_reviewer.id \n AND cs_review.department_code = 'CS_EVAL'",
+ "name": "evaluation_targets_with_departments",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.periodic_evaluations_aggregated_view": {
+ "columns": {
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select CONCAT(\"evaluation_year\", '_', \"vendor_id\") as \"id\", \"evaluation_year\", \"vendor_id\", \"vendor_code\", \"vendor_name\", \"domestic_foreign\", \"material_type\", ROUND(AVG(NULLIF(\"process_score\", 0)), 1) as \"process_score\", ROUND(AVG(NULLIF(\"price_score\", 0)), 1) as \"price_score\", ROUND(AVG(NULLIF(\"delivery_score\", 0)), 1) as \"delivery_score\", ROUND(AVG(NULLIF(\"self_evaluation_score\", 0)), 1) as \"self_evaluation_score\", ROUND(AVG(NULLIF(\"participation_bonus\", 0)), 1) as \"participation_bonus\", ROUND(AVG(NULLIF(\"quality_deduction\", 0)), 1) as \"quality_deduction\", ROUND(AVG(NULLIF(\"final_score\", 0)), 1) as \"final_score\", \n CASE \n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 90 THEN 'S'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 80 THEN 'A'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 70 THEN 'B'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 60 THEN 'C'\n ELSE 'D'\n END\n as \"evaluation_grade\", \n CASE \n WHEN AVG(NULLIF(\"final_score\", 0)) >= 90 THEN 'S'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 80 THEN 'A'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 70 THEN 'B'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 60 THEN 'C'\n ELSE 'D'\n END\n as \"final_grade\", \n CASE \n WHEN COUNT(CASE WHEN \"status\" = 'FINALIZED' THEN 1 END) = COUNT(*) THEN 'FINALIZED'\n WHEN COUNT(CASE WHEN \"status\" IN ('REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) = COUNT(*) THEN 'REVIEW_COMPLETED'\n WHEN COUNT(CASE WHEN \"status\" IN ('IN_REVIEW', 'REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) > 0 THEN 'IN_REVIEW'\n WHEN COUNT(CASE WHEN \"status\" IN ('SUBMITTED', 'IN_REVIEW', 'REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) > 0 THEN 'SUBMITTED'\n ELSE 'PENDING_SUBMISSION'\n END\n as \"status\", \n CASE \n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"order_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"procurement_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"quality_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"design_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"cs_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"admin_eval_status\", \n BOOL_AND(\"documents_submitted\")\n as \"documents_submitted\", MAX(\"submission_date\") as \"submission_date\", MAX(\"submission_deadline\") as \"submission_deadline\", MAX(\"review_completed_at\") as \"review_completed_at\", MAX(\"finalized_at\") as \"finalized_at\", \n CASE \n WHEN COUNT(DISTINCT \"division\") > 1 THEN 'BOTH'\n ELSE MAX(\"division\")\n END\n as \"division\", COUNT(*)::int as \"evaluation_count\", STRING_AGG(DISTINCT \"division\", ',') as \"divisions\", SUM(\"total_reviewers\")::int as \"total_reviewers\", SUM(\"completed_reviewers\")::int as \"completed_reviewers\", SUM(\"pending_reviewers\")::int as \"pending_reviewers\", MAX(\"evaluation_period\") as \"evaluation_period\", STRING_AGG(\"evaluation_note\", ' | ') as \"evaluation_note\", (ARRAY_AGG(\"periodic_evaluations_view\".\"finalized_by\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by\", (ARRAY_AGG(\"periodic_evaluations_view\".\"name\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by_user_name\", (ARRAY_AGG(\"periodic_evaluations_view\".\"email\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by_user_email\", MIN(\"created_at\") as \"created_at\", MAX(\"updated_at\") as \"updated_at\", (ARRAY_AGG(\"periodic_evaluations_view\".\"evaluation_target_id\"))[1] as \"evaluation_target_id\", \n STRING_AGG(DISTINCT \"admin_comment\", ' | ')\n as \"evaluation_target_admin_comment\", \n STRING_AGG(DISTINCT \"consolidated_comment\", ' | ')\n as \"evaluation_target_consolidated_comment\", (ARRAY_AGG(\"periodic_evaluations_view\".\"consensus_status\" ORDER BY \"periodic_evaluations_view\".\"updated_at\" DESC NULLS LAST))[1] as \"evaluation_target_consensus_status\", \n MAX(\"confirmed_at\")\n as \"evaluation_target_confirmed_at\" from \"periodic_evaluations_view\" group by \"periodic_evaluations_view\".\"evaluation_year\", \"periodic_evaluations_view\".\"vendor_id\", \"periodic_evaluations_view\".\"vendor_code\", \"periodic_evaluations_view\".\"vendor_name\", \"periodic_evaluations_view\".\"domestic_foreign\", \"periodic_evaluations_view\".\"material_type\"",
+ "name": "periodic_evaluations_aggregated_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.periodic_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"periodic_evaluations\".\"id\", \"periodic_evaluations\".\"evaluation_target_id\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_id\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"periodic_evaluations\".\"evaluation_period\", \"periodic_evaluations\".\"documents_submitted\", \"periodic_evaluations\".\"submission_date\", \"periodic_evaluations\".\"submission_deadline\", \"periodic_evaluations\".\"final_score\", \"periodic_evaluations\".\"final_grade\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'processScore'\n AND re.is_completed = true\n ) as \"process_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'priceScore'\n AND re.is_completed = true\n ) as \"price_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'deliveryScore'\n AND re.is_completed = true\n ) as \"delivery_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'selfEvaluationScore'\n AND re.is_completed = true\n ) as \"self_evaluation_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'bonus'\n AND re.is_completed = true\n ) as \"participation_bonus\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'penalty'\n AND re.is_completed = true\n ) as \"quality_deduction\", \"periodic_evaluations\".\"status\", \"periodic_evaluations\".\"review_completed_at\", \"periodic_evaluations\".\"finalized_at\", \"periodic_evaluations\".\"finalized_by\", \"periodic_evaluations\".\"evaluation_note\", \"periodic_evaluations\".\"created_at\", \"periodic_evaluations\".\"updated_at\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"consensus_status\", \"evaluation_targets\".\"confirmed_at\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'ORDER_EVAL'\n LIMIT 1\n ) as \"order_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'PROCUREMENT_EVAL'\n LIMIT 1\n ) as \"procurement_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'QUALITY_EVAL'\n LIMIT 1\n ) as \"quality_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'DESIGN_EVAL'\n LIMIT 1\n ) as \"design_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'CS_EVAL'\n LIMIT 1\n ) as \"cs_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'admin'\n LIMIT 1\n ) as \"admin_eval_status\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n ) as \"total_reviewers\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND re.is_completed = true\n ) as \"completed_reviewers\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND re.is_completed = false\n ) as \"pending_reviewers\", \"users\".\"name\", \"users\".\"email\" from \"periodic_evaluations\" left join \"evaluation_targets\" on \"periodic_evaluations\".\"evaluation_target_id\" = \"evaluation_targets\".\"id\" left join \"users\" on \"periodic_evaluations\".\"finalized_by\" = \"users\".\"id\" order by \"periodic_evaluations\".\"created_at\"",
+ "name": "periodic_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.reviewer_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_target_reviewer_id": {
+ "name": "evaluation_target_reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_completed": {
+ "name": "is_completed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_grade": {
+ "name": "evaluation_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name_from": {
+ "name": "department_name_from",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "assigned_by": {
+ "name": "assigned_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"reviewer_evaluations\".\"id\", \"reviewer_evaluations\".\"periodic_evaluation_id\", \"reviewer_evaluations\".\"evaluation_target_reviewer_id\", \"reviewer_evaluations\".\"is_completed\", \"reviewer_evaluations\".\"completed_at\", \"reviewer_evaluations\".\"reviewer_comment\", \"reviewer_evaluations\".\"created_at\", \"reviewer_evaluations\".\"updated_at\", \"periodic_evaluations\".\"evaluation_period\", \"reviewer_evaluations\".\"submitted_at\", \"periodic_evaluations\".\"documents_submitted\", \"periodic_evaluations\".\"submission_date\", \"periodic_evaluations\".\"submission_deadline\", \"periodic_evaluations\".\"final_score\", \"periodic_evaluations\".\"final_grade\", \"periodic_evaluations\".\"evaluation_score\", \"periodic_evaluations\".\"evaluation_grade\", \"periodic_evaluations\".\"status\", \"periodic_evaluations\".\"review_completed_at\", \"periodic_evaluations\".\"finalized_at\", \"periodic_evaluations\".\"finalized_by\", \"periodic_evaluations\".\"evaluation_note\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_id\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"confirmed_at\", \"evaluation_targets\".\"confirmed_by\", \"evaluation_targets\".\"ld_claim_count\", \"evaluation_targets\".\"ld_claim_amount\", \"evaluation_targets\".\"ld_claim_currency\", \"evaluation_target_reviewers\".\"department_code\", \"evaluation_target_reviewers\".\"department_name_from\", \"evaluation_target_reviewers\".\"reviewer_user_id\", reviewer_user.name as \"reviewer_name\", reviewer_user.email as \"reviewer_email\", \"evaluation_target_reviewers\".\"assigned_at\", \"evaluation_target_reviewers\".\"assigned_by\", assigned_by_user.name as \"assigned_by_user_name\", finalized_by_user.name as \"finalized_by_user_name\", finalized_by_user.email as \"finalized_by_user_email\", \n CASE \n WHEN \"reviewer_evaluations\".\"is_completed\" = true THEN 'COMPLETED'\n ELSE 'NOT_STARTED'\n END\n as \"evaluation_progress\" from \"reviewer_evaluations\" left join \"periodic_evaluations\" on \"reviewer_evaluations\".\"periodic_evaluation_id\" = \"periodic_evaluations\".\"id\" left join \"evaluation_targets\" on \"periodic_evaluations\".\"evaluation_target_id\" = \"evaluation_targets\".\"id\" left join \"evaluation_target_reviewers\" on \"reviewer_evaluations\".\"evaluation_target_reviewer_id\" = \"evaluation_target_reviewers\".\"id\" left join users reviewer_user on \"evaluation_target_reviewers\".\"reviewer_user_id\" = reviewer_user.id left join users assigned_by_user on \"evaluation_target_reviewers\".\"assigned_by\" = assigned_by_user.id left join users finalized_by_user on \"periodic_evaluations\".\"finalized_by\" = finalized_by_user.id order by \"reviewer_evaluations\".\"is_completed\" ASC, \"reviewer_evaluations\".\"updated_at\" DESC",
+ "name": "reviewer_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.reg_eval_criteria_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "category2": {
+ "name": "category2",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'processScore'"
+ },
+ "item": {
+ "name": "item",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "range": {
+ "name": "range",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score_equip_ship": {
+ "name": "score_equip_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_equip_marine": {
+ "name": "score_equip_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_ship": {
+ "name": "score_bulk_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_marine": {
+ "name": "score_bulk_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"reg_eval_criteria_details\".\"id\", \"reg_eval_criteria_details\".\"criteria_id\", \"reg_eval_criteria\".\"category\", \"reg_eval_criteria\".\"category2\", \"reg_eval_criteria\".\"item\", \"reg_eval_criteria\".\"classification\", \"reg_eval_criteria\".\"range\", \"reg_eval_criteria_details\".\"detail\", \"reg_eval_criteria_details\".\"order_index\", \"reg_eval_criteria_details\".\"score_equip_ship\", \"reg_eval_criteria_details\".\"score_equip_marine\", \"reg_eval_criteria_details\".\"score_bulk_ship\", \"reg_eval_criteria_details\".\"score_bulk_marine\", \"reg_eval_criteria\".\"remarks\" from \"reg_eval_criteria\" left join \"reg_eval_criteria_details\" on \"reg_eval_criteria\".\"id\" = \"reg_eval_criteria_details\".\"criteria_id\" order by \"reg_eval_criteria\".\"id\", \"reg_eval_criteria_details\".\"order_index\"",
+ "name": "reg_eval_criteria_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.project_gtc_view": {
+ "columns": {},
+ "definition": "select \"projects\".\"id\" as \"id\", \"projects\".\"code\" as \"code\", \"projects\".\"name\" as \"name\", \"projects\".\"type\" as \"type\", \"projects\".\"created_at\" as \"project_created_at\", \"projects\".\"updated_at\" as \"project_updated_at\", \"project_gtc_files\".\"id\" as \"gtc_file_id\", \"project_gtc_files\".\"file_name\" as \"fileName\", \"project_gtc_files\".\"file_path\" as \"filePath\", \"project_gtc_files\".\"original_file_name\" as \"originalFileName\", \"project_gtc_files\".\"file_size\" as \"fileSize\", \"project_gtc_files\".\"mime_type\" as \"mimeType\", \"project_gtc_files\".\"created_at\" as \"gtcCreatedAt\", \"project_gtc_files\".\"updated_at\" as \"gtcUpdatedAt\" from \"projects\" left join \"project_gtc_files\" on \"projects\".\"id\" = \"project_gtc_files\".\"project_id\"",
+ "name": "project_gtc_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_answer_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "qna_id": {
+ "name": "qna_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"qna_answer\".\"id\", \"qna_answer\".\"qna_id\", \"qna_answer\".\"content\", \"qna_answer\".\"author\", \"qna_answer\".\"created_at\" as \"created_at\", \"qna_answer\".\"updated_at\" as \"updated_at\", \"qna_answer\".\"is_deleted\" as \"is_deleted\", \"qna_answer\".\"deleted_at\" as \"deleted_at\", \"qna\".\"title\" as \"question_title\", \"qna\".\"category\" as \"question_category\", \"qna\".\"author\" as \"question_author\", \"qna\".\"created_at\" as \"question_created_at\", \"users\".\"name\" as \"author_name\", \"users\".\"email\" as \"author_email\", \"users\".\"domain\" as \"author_domain\", \"users\".\"phone\" as \"author_phone\", \"users\".\"image_url\" as \"author_image_url\", \"users\".\"language\" as \"author_language\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", \"tech_vendors\".\"vendor_code\" as \"tech_vendor_code\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", COALESCE(\"vendors\".\"vendor_code\", \"tech_vendors\".\"vendor_code\") as \"company_code\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"total_comments\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"comment_count\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.parent_comment_id IS NULL\n AND qc.is_deleted = false\n ) as \"parent_comments_count\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.parent_comment_id IS NOT NULL\n AND qc.is_deleted = false\n ) as \"child_comments_count\", (\n SELECT MAX(qc.created_at)\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"last_commented_at\", (\n SELECT ROW_NUMBER() OVER (\n PARTITION BY qa2.qna_id \n ORDER BY qa2.created_at ASC\n )\n FROM \"qna_answer\" qa2\n WHERE qa2.id = \"qna_answer\".\"id\"\n AND qa2.is_deleted = false\n ) as \"answer_order\", (\n \"qna_answer\".\"id\" = (\n SELECT qa2.id\n FROM \"qna_answer\" qa2\n WHERE qa2.qna_id = \"qna_answer\".\"qna_id\"\n AND qa2.is_deleted = false\n ORDER BY qa2.created_at ASC\n LIMIT 1\n )\n ) as \"is_first_answer\", (\n \"qna_answer\".\"id\" = (\n SELECT qa2.id\n FROM \"qna_answer\" qa2\n WHERE qa2.qna_id = \"qna_answer\".\"qna_id\"\n AND qa2.is_deleted = false\n ORDER BY qa2.created_at DESC\n LIMIT 1\n )\n ) as \"is_latest_answer\" from \"qna_answer\" left join \"qna\" on \"qna_answer\".\"qna_id\" = \"qna\".\"id\" left join \"users\" on \"qna_answer\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna_answer\".\"is_deleted\" = false order by \"qna_answer\".\"created_at\"",
+ "name": "qna_answer_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_comment_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_id": {
+ "name": "answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"qna_comments\".\"id\", \"qna_comments\".\"content\", \"qna_comments\".\"author\", \"qna_comments\".\"answer_id\", \"qna_comments\".\"parent_comment_id\", \"qna_comments\".\"created_at\" as \"created_at\", \"qna_comments\".\"updated_at\" as \"updated_at\", \"qna_comments\".\"is_deleted\" as \"is_deleted\", \"qna_comments\".\"deleted_at\" as \"deleted_at\", \"qna_answer\".\"content\" as \"answer_content\", \"qna_answer\".\"author\" as \"answer_author\", \"qna_answer\".\"created_at\" as \"answer_created_at\", \"qna_answer\".\"qna_id\" as \"qna_id\", \"qna\".\"title\" as \"question_title\", \"qna\".\"category\" as \"question_category\", \"qna\".\"author\" as \"question_author\", \"users\".\"name\" as \"author_name\", \"users\".\"email\" as \"author_email\", \"users\".\"domain\" as \"author_domain\", \"users\".\"image_url\" as \"author_image_url\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", \"qna_comments\".\"parent_comment_id\" IS NULL as \"is_parent_comment\", \"qna_comments\".\"parent_comment_id\" IS NOT NULL as \"is_child_comment\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc2\n WHERE qc2.parent_comment_id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"child_comments_count\", (\n SELECT COUNT(*) > 0\n FROM \"qna_comments\" qc2\n WHERE qc2.parent_comment_id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"has_child_comments\", \n CASE \n WHEN \"qna_comments\".\"parent_comment_id\" IS NULL THEN 0\n ELSE 1\n END\n as \"comment_depth\", (\n SELECT ROW_NUMBER() OVER (\n PARTITION BY qc2.answer_id, qc2.parent_comment_id\n ORDER BY qc2.created_at ASC\n )\n FROM \"qna_comments\" qc2\n WHERE qc2.id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"comment_order\" from \"qna_comments\" left join \"qna_answer\" on \"qna_comments\".\"answer_id\" = \"qna_answer\".\"id\" left join \"qna\" on \"qna_answer\".\"qna_id\" = \"qna\".\"id\" left join \"users\" on \"qna_comments\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna_comments\".\"is_deleted\" = false order by \"qna_comments\".\"created_at\"",
+ "name": "qna_comment_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "qna_category",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'partners'"
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'en'"
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "last_login_at": {
+ "name": "last_login_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"qna\".\"id\", \"qna\".\"title\", \"qna\".\"content\", \"qna\".\"author\", \"qna\".\"category\", \"qna\".\"created_at\", \"qna\".\"updated_at\", \"qna\".\"is_deleted\", \"qna\".\"deleted_at\", \"users\".\"name\", \"users\".\"email\", \"users\".\"domain\", \"users\".\"phone\", \"users\".\"image_url\", \"users\".\"language\", \"users\".\"is_active\", \"users\".\"last_login_at\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"status\" as \"vendor_status\", \"vendors\".\"country\" as \"vendor_country\", \"vendors\".\"business_size\" as \"vendor_business_size\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", \"tech_vendors\".\"vendor_code\" as \"tech_vendor_code\", \"tech_vendors\".\"status\" as \"tech_vendor_status\", \"tech_vendors\".\"country\" as \"tech_vendor_country\", \"tech_vendors\".\"tech_vendor_type\" as \"tech_vendor_type\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", COALESCE(\"vendors\".\"vendor_code\", \"tech_vendors\".\"vendor_code\") as \"company_code\", COALESCE(\"vendors\".\"country\", \"tech_vendors\".\"country\") as \"company_country\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", (\n SELECT COUNT(*)::int\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"total_answers\", (\n SELECT COUNT(*)::int\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"answer_count\", (\n SELECT MAX(qa.created_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"last_answered_at\", (\n SELECT MIN(qa.created_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"first_answered_at\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qc.is_deleted = false\n AND qa.is_deleted = false\n ) as \"total_comments\", (\n SELECT GREATEST(\n \"qna\".\"updated_at\",\n COALESCE((\n SELECT MAX(qa.updated_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ), \"qna\".\"updated_at\"),\n COALESCE((\n SELECT MAX(qc.updated_at)\n FROM \"qna_comments\" qc\n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qc.is_deleted = false\n AND qa.is_deleted = false\n ), \"qna\".\"updated_at\")\n )\n ) as \"last_activity_at\", (\n SELECT COUNT(*) > 0\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"has_answers\", (\n SELECT COUNT(*) > 0\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"is_answered\", (\n (SELECT COUNT(*) FROM \"qna_answer\" qa WHERE qa.qna_id = \"qna\".\"id\" AND qa.is_deleted = false) >= 3\n OR\n (SELECT COUNT(*) FROM \"qna_comments\" qc \n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id \n WHERE qa.qna_id = \"qna\".\"id\" AND qc.is_deleted = false AND qa.is_deleted = false) >= 5\n ) as \"is_popular\" from \"qna\" left join \"users\" on \"qna\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna\".\"is_deleted\" = false order by \"qna\".\"created_at\"",
+ "name": "qna_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.template_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sample_data": {
+ "name": "sample_data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_email": {
+ "name": "created_by_email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variables": {
+ "name": "variables",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.content,\n t.description,\n t.category,\n t.sample_data,\n t.is_active,\n t.version,\n t.created_by,\n u.name AS created_by_name,\n u.email AS created_by_email,\n t.created_at,\n t.updated_at,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', v.id,\n 'variableName', v.variable_name,\n 'variableType', v.variable_type,\n 'defaultValue', v.default_value,\n 'isRequired', v.is_required,\n 'description', v.description,\n 'displayOrder', v.display_order\n ) ORDER BY v.display_order\n ) FILTER (WHERE v.id IS NOT NULL),\n '[]'::json\n ) AS variables\n FROM \"templates\" t\n LEFT JOIN \"users\" u ON t.created_by = u.id\n LEFT JOIN \"template_variables\" v ON t.id = v.template_id\n GROUP BY\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.content,\n t.description,\n t.category,\n t.sample_data,\n t.is_active,\n t.version,\n t.created_by,\n u.name,\n u.email,\n t.created_at,\n t.updated_at\n",
+ "name": "template_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.template_list_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_email": {
+ "name": "created_by_email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_count": {
+ "name": "variable_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "required_variable_count": {
+ "name": "required_variable_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.description,\n t.category,\n t.is_active,\n t.version,\n t.created_by,\n u.name AS created_by_name,\n u.email AS created_by_email,\n t.created_at,\n t.updated_at,\n COALESCE(v.variable_count, 0) AS variable_count,\n COALESCE(v.required_variable_count, 0) AS required_variable_count\n FROM \"templates\" t\n LEFT JOIN \"users\" u ON t.created_by = u.id\n LEFT JOIN (\n SELECT\n template_id,\n COUNT(*) AS variable_count,\n COUNT(*) FILTER (WHERE is_required) AS required_variable_count\n FROM \"template_variables\"\n GROUP BY template_id\n ) v ON t.id = v.template_id\n",
+ "name": "template_list_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_clauses_tree_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"gtc_clauses\".\"id\", \"gtc_clauses\".\"document_id\", \"gtc_clauses\".\"parent_id\", \"gtc_clauses\".\"item_number\", \"gtc_clauses\".\"category\", \"gtc_clauses\".\"subtitle\", \"gtc_clauses\".\"content\", \"gtc_clauses\".\"sort_order\", \"gtc_clauses\".\"depth\", \"gtc_clauses\".\"full_path\", \"gtc_clauses\".\"images\", \"gtc_clauses\".\"is_active\", \"gtc_clauses\".\"created_at\", \"gtc_clauses\".\"created_by_id\", \"gtc_clauses\".\"updated_at\", \"gtc_clauses\".\"updated_by_id\", \"gtc_clauses\".\"edit_reason\", \"gtc_documents\".\"type\", \"gtc_documents\".\"file_name\", \"gtc_documents\".\"revision\", \"gtc_documents\".\"project_id\", created_by_user.name as \"created_by_name\", created_by_user.email as \"created_by_email\", updated_by_user.name as \"updated_by_name\", updated_by_user.email as \"updated_by_email\", parent_clause.item_number as \"parent_item_number\", parent_clause.subtitle as \"parent_subtitle\", \n (\n SELECT count(*)\n FROM gtc_clauses children\n WHERE children.parent_id = \"gtc_clauses\".\"id\"\n AND children.is_active = true\n )\n as \"children_count\", \n (\n SELECT count(*)\n FROM gtc_clauses siblings\n WHERE siblings.parent_id = \"gtc_clauses\".\"parent_id\"\n AND siblings.is_active = true\n )\n as \"siblings_count\", \n \"gtc_clauses\".\"created_by_id\" != \"gtc_clauses\".\"updated_by_id\" OR \n \"gtc_clauses\".\"created_at\" != \"gtc_clauses\".\"updated_at\"\n as \"has_edit_history\" from \"gtc_clauses\" left join \"gtc_documents\" on \"gtc_clauses\".\"document_id\" = \"gtc_documents\".\"id\" left join users created_by_user on \"gtc_clauses\".\"created_by_id\" = created_by_user.id left join users updated_by_user on \"gtc_clauses\".\"updated_by_id\" = updated_by_user.id left join gtc_clauses parent_clause on \"gtc_clauses\".\"parent_id\" = parent_clause.id",
+ "name": "gtc_clauses_tree_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_documents_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"gtc_documents\".\"id\", \"gtc_documents\".\"type\", \"gtc_documents\".\"project_id\", \"gtc_documents\".\"revision\", \"gtc_documents\".\"title\", \"gtc_documents\".\"file_name\", \"gtc_documents\".\"file_path\", \"gtc_documents\".\"file_size\", \"gtc_documents\".\"created_at\", \"gtc_documents\".\"created_by_id\", \"gtc_documents\".\"updated_at\", \"gtc_documents\".\"updated_by_id\", \"gtc_documents\".\"edit_reason\", \"gtc_documents\".\"is_active\", \"projects\".\"code\", \"projects\".\"name\", created_by_user.name as \"created_by_name\", created_by_user.email as \"created_by_email\", updated_by_user.name as \"updated_by_name\", updated_by_user.email as \"updated_by_email\", \n (\n SELECT count(*)\n FROM gtc_documents gd2\n WHERE gd2.type = \"gtc_documents\".\"type\"\n AND gd2.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd2.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd2.project_id IS NULL)\n )\n )\n as \"total_documents_in_group\", \n (\n SELECT max(revision)\n FROM gtc_documents gd3\n WHERE gd3.type = \"gtc_documents\".\"type\"\n AND gd3.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd3.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd3.project_id IS NULL)\n )\n )\n as \"latest_revision\", \n \"gtc_documents\".\"revision\" = (\n SELECT max(revision)\n FROM gtc_documents gd4\n WHERE gd4.type = \"gtc_documents\".\"type\"\n AND gd4.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd4.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd4.project_id IS NULL)\n )\n )\n as \"is_latest_revision\", \n (\n SELECT id\n FROM gtc_documents gd5\n WHERE gd5.type = \"gtc_documents\".\"type\"\n AND gd5.is_active = true\n AND gd5.revision < \"gtc_documents\".\"revision\"\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd5.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd5.project_id IS NULL)\n )\n ORDER BY gd5.revision DESC\n LIMIT 1\n )\n as \"previous_revision_id\", \n (\n SELECT id\n FROM gtc_documents gd6\n WHERE gd6.type = \"gtc_documents\".\"type\"\n AND gd6.is_active = true\n AND gd6.revision > \"gtc_documents\".\"revision\"\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd6.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd6.project_id IS NULL)\n )\n ORDER BY gd6.revision ASC\n LIMIT 1\n )\n as \"next_revision_id\", \n CASE \n WHEN \"gtc_documents\".\"file_size\" IS NULL THEN NULL\n WHEN \"gtc_documents\".\"file_size\" < 1024 THEN \"gtc_documents\".\"file_size\" || ' B'\n WHEN \"gtc_documents\".\"file_size\" < 1024 * 1024 THEN round(\"gtc_documents\".\"file_size\" / 1024.0, 1) || ' KB'\n WHEN \"gtc_documents\".\"file_size\" < 1024 * 1024 * 1024 THEN round(\"gtc_documents\".\"file_size\" / (1024.0 * 1024), 1) || ' MB'\n ELSE round(\"gtc_documents\".\"file_size\" / (1024.0 * 1024 * 1024), 1) || ' GB'\n END\n as \"file_size_formatted\", \n CASE \n WHEN \"gtc_documents\".\"project_id\" IS NOT NULL THEN (\n SELECT count(*)\n FROM gtc_documents gd7\n WHERE gd7.project_id = \"gtc_documents\".\"project_id\"\n AND gd7.is_active = true\n )\n ELSE NULL\n END\n as \"project_total_documents\", \n (\n SELECT array_agg(revision ORDER BY revision)\n FROM gtc_documents gd8\n WHERE gd8.type = \"gtc_documents\".\"type\"\n AND gd8.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd8.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd8.project_id IS NULL)\n )\n )\n as \"revision_history\", \n \"gtc_documents\".\"created_by_id\" != \"gtc_documents\".\"updated_by_id\" OR \n \"gtc_documents\".\"created_at\" != \"gtc_documents\".\"updated_at\"\n as \"has_edit_history\" from \"gtc_documents\" left join \"projects\" on \"gtc_documents\".\"project_id\" = \"projects\".\"id\" left join users created_by_user on \"gtc_documents\".\"created_by_id\" = created_by_user.id left join users updated_by_user on \"gtc_documents\".\"updated_by_id\" = updated_by_user.id",
+ "name": "gtc_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_vendor_clauses_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_document_id": {
+ "name": "vendor_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_clause_id": {
+ "name": "base_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_number_modified": {
+ "name": "is_number_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_category_modified": {
+ "name": "is_category_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_subtitle_modified": {
+ "name": "is_subtitle_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_content_modified": {
+ "name": "is_content_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_document_id": {
+ "name": "base_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_note": {
+ "name": "negotiation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_excluded": {
+ "name": "is_excluded",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"gtc_vendor_clauses\".\"id\", \"gtc_vendor_clauses\".\"vendor_document_id\", \"gtc_vendor_clauses\".\"base_clause_id\", \"gtc_vendor_clauses\".\"parent_id\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_item_number\", \"gtc_clauses\".\"item_number\")\n as \"effective_item_number\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_category\", \"gtc_clauses\".\"category\")\n as \"effective_category\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_subtitle\", \"gtc_clauses\".\"subtitle\")\n as \"effective_subtitle\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_content\", \"gtc_clauses\".\"content\")\n as \"effective_content\", \"gtc_vendor_clauses\".\"is_number_modified\", \"gtc_vendor_clauses\".\"is_category_modified\", \"gtc_vendor_clauses\".\"is_subtitle_modified\", \"gtc_vendor_clauses\".\"is_content_modified\", \"gtc_clauses\".\"item_number\", \"gtc_clauses\".\"category\", \"gtc_clauses\".\"subtitle\", \"gtc_clauses\".\"content\", \"gtc_vendor_documents\".\"vendor_id\", \"vendors\".\"vendor_code\", \"vendors\".\"vendor_name\", \"gtc_vendor_documents\".\"base_document_id\", \"gtc_documents\".\"type\", \"gtc_documents\".\"file_name\", \"gtc_vendor_clauses\".\"review_status\", \"gtc_vendor_clauses\".\"negotiation_note\", \"gtc_vendor_clauses\".\"is_excluded\", \"gtc_vendor_clauses\".\"sort_order\", \"gtc_vendor_clauses\".\"depth\", \"gtc_vendor_clauses\".\"full_path\", \n \"gtc_vendor_clauses\".\"is_number_modified\" OR \n \"gtc_vendor_clauses\".\"is_category_modified\" OR \n \"gtc_vendor_clauses\".\"is_subtitle_modified\" OR \n \"gtc_vendor_clauses\".\"is_content_modified\"\n as \"has_modifications\", \"gtc_vendor_clauses\".\"created_at\", \"gtc_vendor_clauses\".\"updated_at\" from \"gtc_vendor_clauses\" left join \"gtc_clauses\" on \"gtc_vendor_clauses\".\"base_clause_id\" = \"gtc_clauses\".\"id\" left join \"gtc_vendor_documents\" on \"gtc_vendor_clauses\".\"vendor_document_id\" = \"gtc_vendor_documents\".\"id\" left join \"vendors\" on \"gtc_vendor_documents\".\"vendor_id\" = \"vendors\".\"id\" left join \"gtc_documents\" on \"gtc_vendor_documents\".\"base_document_id\" = \"gtc_documents\".\"id\"",
+ "name": "gtc_vendor_clauses_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.legal_works_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_urgent": {
+ "name": "is_urgent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "request_date": {
+ "name": "request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consultation_date": {
+ "name": "consultation_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expected_answer_date": {
+ "name": "expected_answer_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_completion_date": {
+ "name": "legal_completion_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer": {
+ "name": "reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_responder": {
+ "name": "legal_responder",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachment": {
+ "name": "has_attachment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "review_department": {
+ "name": "review_department",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inquiry_type": {
+ "name": "inquiry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "request_content": {
+ "name": "request_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "contract_project_name": {
+ "name": "contract_project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_amount": {
+ "name": "contract_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"legal_works\".\"id\", \"legal_works\".\"category\", \"legal_works\".\"status\", \"legal_works\".\"company_id\", \"legal_works\".\"vendor_code\", \"legal_works\".\"vendor_name\", \"legal_works\".\"is_urgent\", \"legal_works\".\"request_date\", \"legal_works\".\"consultation_date\", \"legal_works\".\"expected_answer_date\", \"legal_works\".\"legal_completion_date\", \"legal_works\".\"reviewer\", \"legal_works\".\"legal_responder\", \"legal_works\".\"has_attachment\", \"legal_works\".\"created_at\", \"legal_works\".\"updated_at\", \"legal_work_requests\".\"review_department\", \"legal_work_requests\".\"inquiry_type\", \"legal_work_requests\".\"title\", \"legal_work_requests\".\"request_content\", \"legal_work_requests\".\"is_public\", \"legal_work_requests\".\"contract_project_name\", \"legal_work_requests\".\"contract_type\", \"legal_work_requests\".\"contract_amount\", (\n SELECT response_content \n FROM legal_work_responses lwr_latest \n WHERE lwr_latest.legal_work_id = \"legal_works\".\"id\" \n ORDER BY lwr_latest.created_at DESC \n LIMIT 1\n ) as \"response_content\", (\n SELECT COUNT(*)::integer \n FROM legal_work_attachments lwa \n WHERE lwa.legal_work_id = \"legal_works\".\"id\"\n ) as \"attachment_count\" from \"legal_works\" left join \"legal_work_requests\" on \"legal_works\".\"id\" = \"legal_work_requests\".\"legal_work_id\" left join \"vendors\" on \"legal_works\".\"company_id\" = \"vendors\".\"id\"",
+ "name": "legal_works_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.bidding_list_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_number": {
+ "name": "bidding_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "contract_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bidding_type": {
+ "name": "bidding_type",
+ "type": "bidding_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "award_count": {
+ "name": "award_count",
+ "type": "award_count",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'single'"
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_date": {
+ "name": "pre_quote_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_registration_date": {
+ "name": "bidding_registration_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_start_date": {
+ "name": "submission_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_end_date": {
+ "name": "submission_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_date": {
+ "name": "evaluation_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_specification_meeting": {
+ "name": "has_specification_meeting",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "has_pr_document": {
+ "name": "has_pr_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "budget": {
+ "name": "budget",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_price": {
+ "name": "target_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_bid_price": {
+ "name": "final_bid_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "bidding_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bidding_generated'"
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_email": {
+ "name": "manager_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_phone": {
+ "name": "manager_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "meeting_date": {
+ "name": "meeting_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "location": {
+ "name": "location",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "definition": "select \"biddings\".\"id\", \"biddings\".\"bidding_number\", \"biddings\".\"revision\", \"biddings\".\"project_name\", \"biddings\".\"item_name\", \"biddings\".\"title\", \"biddings\".\"description\", \"biddings\".\"content\", \"biddings\".\"contract_type\", \"biddings\".\"bidding_type\", \"biddings\".\"award_count\", \"biddings\".\"contract_period\", \"biddings\".\"pre_quote_date\", \"biddings\".\"bidding_registration_date\", \"biddings\".\"submission_start_date\", \"biddings\".\"submission_end_date\", \"biddings\".\"evaluation_date\", \"biddings\".\"has_specification_meeting\", \"biddings\".\"has_pr_document\", \"biddings\".\"pr_number\", \"biddings\".\"currency\", \"biddings\".\"budget\", \"biddings\".\"target_price\", \"biddings\".\"final_bid_price\", \"biddings\".\"status\", \"biddings\".\"is_public\", \"biddings\".\"manager_name\", \"biddings\".\"manager_email\", \"biddings\".\"manager_phone\", \"biddings\".\"remarks\", \"biddings\".\"created_by\", \"biddings\".\"created_at\", \"biddings\".\"updated_at\", \"biddings\".\"updated_by\", \"specification_meetings\".\"id\" IS NOT NULL as \"has_specification_meeting_details\", \"specification_meetings\".\"meeting_date\", \"specification_meetings\".\"location\", \"specification_meetings\".\"contact_person\", \"specification_meetings\".\"is_required\", \n COALESCE((\n SELECT count(*) \n FROM pr_documents \n WHERE bidding_id = \"biddings\".\"id\"\n ), 0)\n as \"pr_document_count\", \n (\n SELECT array_agg(document_name ORDER BY registered_at DESC)\n FROM pr_documents \n WHERE bidding_id = \"biddings\".\"id\"\n LIMIT 5\n )\n as \"pr_document_names\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ), 0)\n as \"participant_expected\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'submitted'\n ), 0)\n as \"participant_participated\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'declined'\n ), 0)\n as \"participant_declined\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status IN ('pending', 'sent')\n ), 0)\n as \"participant_pending\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'accepted'\n ), 0)\n as \"participant_accepted\", \n CASE \n WHEN (\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ) > 0 \n THEN ROUND(\n (\n SELECT count(*)::decimal \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'submitted'\n ) / (\n SELECT count(*)::decimal \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ) * 100, 1\n )\n ELSE 0 \n END\n as \"participation_rate\", \n (\n SELECT AVG(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"avg_pre_quote_amount\", \n (\n SELECT MIN(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"min_pre_quote_amount\", \n (\n SELECT MAX(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"max_pre_quote_amount\", \n (\n SELECT AVG(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"avg_final_quote_amount\", \n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"min_final_quote_amount\", \n (\n SELECT MAX(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"max_final_quote_amount\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND is_pre_quote_selected = true\n ), 0)\n as \"selected_for_final_bid_count\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND is_winner = true\n ), 0)\n as \"winner_count\", \n (\n SELECT array_agg(v.vendor_name ORDER BY v.vendor_name)\n FROM bidding_companies bc\n JOIN vendors v ON bc.company_id = v.id\n WHERE bc.bidding_id = \"biddings\".\"id\" \n AND bc.is_winner = true\n )\n as \"winner_company_names\", \n CASE \n WHEN \"biddings\".\"submission_start_date\" IS NULL OR \"biddings\".\"submission_end_date\" IS NULL \n THEN 'not_scheduled'\n WHEN NOW() < \"biddings\".\"submission_start_date\" \n THEN 'scheduled'\n WHEN NOW() BETWEEN \"biddings\".\"submission_start_date\" AND \"biddings\".\"submission_end_date\" \n THEN 'active'\n WHEN NOW() > \"biddings\".\"submission_end_date\" \n THEN 'closed'\n ELSE 'unknown'\n END\n as \"submission_status\", \n CASE \n WHEN \"biddings\".\"submission_end_date\" IS NOT NULL \n AND NOW() < \"biddings\".\"submission_end_date\" \n THEN EXTRACT(DAYS FROM (\"biddings\".\"submission_end_date\" - NOW()))::integer\n ELSE NULL \n END\n as \"days_until_deadline\", \n CASE \n WHEN \"biddings\".\"submission_start_date\" IS NOT NULL \n AND NOW() < \"biddings\".\"submission_start_date\" \n THEN EXTRACT(DAYS FROM (\"biddings\".\"submission_start_date\" - NOW()))::integer\n ELSE NULL \n END\n as \"days_until_start\", \n CASE \n WHEN \"biddings\".\"budget\" IS NOT NULL AND \"biddings\".\"budget\" > 0\n AND (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) IS NOT NULL\n THEN ROUND(\n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) / \"biddings\".\"budget\" * 100, 1\n )\n ELSE NULL \n END\n as \"budget_efficiency_rate\", \n CASE \n WHEN \"biddings\".\"target_price\" IS NOT NULL AND \"biddings\".\"target_price\" > 0\n AND (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) IS NOT NULL\n THEN ROUND(\n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) / \"biddings\".\"target_price\" * 100, 1\n )\n ELSE NULL \n END\n as \"target_price_efficiency_rate\", \n CASE \"biddings\".\"status\"\n WHEN 'bidding_generated' THEN 10\n WHEN 'request_for_quotation' THEN 20\n WHEN 'received_quotation' THEN 40\n WHEN 'set_target_price' THEN 60\n WHEN 'bidding_opened' THEN 70\n WHEN 'bidding_closed' THEN 80\n WHEN 'evaluation_of_bidding' THEN 90\n WHEN 'vendor_selected' THEN 100\n WHEN 'bidding_disposal' THEN 0\n ELSE 0\n END\n as \"progress_score\", \n GREATEST(\n \"biddings\".\"updated_at\",\n COALESCE((\n SELECT MAX(updated_at) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ), \"biddings\".\"updated_at\")\n )\n as \"last_activity_date\" from \"biddings\" left join \"specification_meetings\" on \"biddings\".\"id\" = \"specification_meetings\".\"bidding_id\"",
+ "name": "bidding_list_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ }
+ },
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/db/migrations/meta/0288_snapshot.json b/db/migrations/meta/0288_snapshot.json
new file mode 100644
index 00000000..01c43206
--- /dev/null
+++ b/db/migrations/meta/0288_snapshot.json
@@ -0,0 +1,48206 @@
+{
+ "id": "bd44fd60-9bb3-4324-9363-225e2259d1d1",
+ "prevId": "2d2c96e8-07f9-4aba-a96a-825789b6e8ff",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.companies": {
+ "name": "companies",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "companies_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "taxID": {
+ "name": "taxID",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_envelopes": {
+ "name": "contract_envelopes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_envelopes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "envelope_id": {
+ "name": "envelope_id",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "envelope_status": {
+ "name": "envelope_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contract_envelopes_contract_id_contracts_id_fk": {
+ "name": "contract_envelopes_contract_id_contracts_id_fk",
+ "tableFrom": "contract_envelopes",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_items": {
+ "name": "contract_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_items_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_id": {
+ "name": "item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "unit_price": {
+ "name": "unit_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_rate": {
+ "name": "tax_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_amount": {
+ "name": "tax_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_line_amount": {
+ "name": "total_line_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "contract_items_contract_item_idx": {
+ "name": "contract_items_contract_item_idx",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "item_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "contract_items_contract_id_contracts_id_fk": {
+ "name": "contract_items_contract_id_contracts_id_fk",
+ "tableFrom": "contract_items",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contract_items_item_id_items_id_fk": {
+ "name": "contract_items_item_id_items_id_fk",
+ "tableFrom": "contract_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contract_items_contract_id_item_id_unique": {
+ "name": "contract_items_contract_id_item_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_id",
+ "item_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_signers": {
+ "name": "contract_signers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_signers_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "envelope_id": {
+ "name": "envelope_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_contact_id": {
+ "name": "vendor_contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "signer_type": {
+ "name": "signer_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'VENDOR'"
+ },
+ "signer_email": {
+ "name": "signer_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "signer_name": {
+ "name": "signer_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "signer_position": {
+ "name": "signer_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "signer_status": {
+ "name": "signer_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "signed_at": {
+ "name": "signed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contract_signers_envelope_id_contract_envelopes_id_fk": {
+ "name": "contract_signers_envelope_id_contract_envelopes_id_fk",
+ "tableFrom": "contract_signers",
+ "tableTo": "contract_envelopes",
+ "columnsFrom": [
+ "envelope_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contract_signers_vendor_contact_id_vendor_contacts_id_fk": {
+ "name": "contract_signers_vendor_contact_id_vendor_contacts_id_fk",
+ "tableFrom": "contract_signers",
+ "tableTo": "vendor_contacts",
+ "columnsFrom": [
+ "vendor_contact_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contracts": {
+ "name": "contracts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contracts_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_name": {
+ "name": "contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "end_date": {
+ "name": "end_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "partial_shipping_allowed": {
+ "name": "partial_shipping_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "partial_payment_allowed": {
+ "name": "partial_payment_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contracts_project_id_projects_id_fk": {
+ "name": "contracts_project_id_projects_id_fk",
+ "tableFrom": "contracts",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contracts_vendor_id_vendors_id_fk": {
+ "name": "contracts_vendor_id_vendors_id_fk",
+ "tableFrom": "contracts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contracts_contract_no_unique": {
+ "name": "contracts_contract_no_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_no"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.poa": {
+ "name": "poa",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "poa_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_contract_no": {
+ "name": "original_contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_contract_name": {
+ "name": "original_contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_status": {
+ "name": "original_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_status": {
+ "name": "approval_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "poa_original_contract_no_contracts_contract_no_fk": {
+ "name": "poa_original_contract_no_contracts_contract_no_fk",
+ "tableFrom": "poa",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "original_contract_no"
+ ],
+ "columnsTo": [
+ "contract_no"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "poa_project_id_projects_id_fk": {
+ "name": "poa_project_id_projects_id_fk",
+ "tableFrom": "poa",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "poa_vendor_id_vendors_id_fk": {
+ "name": "poa_vendor_id_vendors_id_fk",
+ "tableFrom": "poa",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_offshore_hull": {
+ "name": "item_offshore_hull",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_item_list": {
+ "name": "sub_item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_offshore_top": {
+ "name": "item_offshore_top",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_item_list": {
+ "name": "sub_item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_shipbuilding": {
+ "name": "item_shipbuilding",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ship_types": {
+ "name": "ship_types",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'OPTION'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.items": {
+ "name": "items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_no": {
+ "name": "project_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "package_code": {
+ "name": "package_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sm_code": {
+ "name": "sm_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_item_code": {
+ "name": "parent_item_code",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_level": {
+ "name": "item_level",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delete_flag": {
+ "name": "delete_flag",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_date": {
+ "name": "change_date",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "base_unit_of_measure": {
+ "name": "base_unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_item_unique": {
+ "name": "project_item_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_no",
+ "item_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.materials": {
+ "name": "materials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_item_code": {
+ "name": "parent_item_code",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_level": {
+ "name": "item_level",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delete_flag": {
+ "name": "delete_flag",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_date": {
+ "name": "change_date",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "base_unit_of_measure": {
+ "name": "base_unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "materials_item_code_unique": {
+ "name": "materials_item_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "item_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pq_criterias": {
+ "name": "pq_criterias",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_point": {
+ "name": "check_point",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_group_name": {
+ "name": "sub_group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pq_list_id": {
+ "name": "pq_list_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "input_format": {
+ "name": "input_format",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'TEXT'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pq_criterias_pq_list_id_pq_lists_id_fk": {
+ "name": "pq_criterias_pq_list_id_pq_lists_id_fk",
+ "tableFrom": "pq_criterias",
+ "tableTo": "pq_lists",
+ "columnsFrom": [
+ "pq_list_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pq_lists": {
+ "name": "pq_lists",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_to": {
+ "name": "valid_to",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pq_lists_project_id_projects_id_fk": {
+ "name": "pq_lists_project_id_projects_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "pq_lists_created_by_users_id_fk": {
+ "name": "pq_lists_created_by_users_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "pq_lists_updated_by_users_id_fk": {
+ "name": "pq_lists_updated_by_users_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.site_visit_request_attachments": {
+ "name": "site_visit_request_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "site_visit_request_id": {
+ "name": "site_visit_request_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_site_visit_info_id": {
+ "name": "vendor_site_visit_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "site_visit_request_attachments_site_visit_request_id_site_visit_requests_id_fk": {
+ "name": "site_visit_request_attachments_site_visit_request_id_site_visit_requests_id_fk",
+ "tableFrom": "site_visit_request_attachments",
+ "tableTo": "site_visit_requests",
+ "columnsFrom": [
+ "site_visit_request_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "site_visit_request_attachments_vendor_site_visit_info_id_vendor_site_visit_info_id_fk": {
+ "name": "site_visit_request_attachments_vendor_site_visit_info_id_vendor_site_visit_info_id_fk",
+ "tableFrom": "site_visit_request_attachments",
+ "tableTo": "vendor_site_visit_info",
+ "columnsFrom": [
+ "vendor_site_visit_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.site_visit_requests": {
+ "name": "site_visit_requests",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "investigation_id": {
+ "name": "investigation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "inspection_duration": {
+ "name": "inspection_duration",
+ "type": "numeric(4, 1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_start_date": {
+ "name": "requested_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_end_date": {
+ "name": "requested_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_attendees": {
+ "name": "shi_attendees",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "vendor_requests": {
+ "name": "vendor_requests",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "additional_requests": {
+ "name": "additional_requests",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REQUESTED'"
+ },
+ "sent_at": {
+ "name": "sent_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "site_visit_requests_investigation_id_vendor_investigations_id_fk": {
+ "name": "site_visit_requests_investigation_id_vendor_investigations_id_fk",
+ "tableFrom": "site_visit_requests",
+ "tableTo": "vendor_investigations",
+ "columnsFrom": [
+ "investigation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "site_visit_requests_requester_id_users_id_fk": {
+ "name": "site_visit_requests_requester_id_users_id_fk",
+ "tableFrom": "site_visit_requests",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_criteria_attachments": {
+ "name": "vendor_criteria_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_criteria_answer_id": {
+ "name": "vendor_criteria_answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_criteria_attachments_vendor_criteria_answer_id_vendor_pq_criteria_answers_id_fk": {
+ "name": "vendor_criteria_attachments_vendor_criteria_answer_id_vendor_pq_criteria_answers_id_fk",
+ "tableFrom": "vendor_criteria_attachments",
+ "tableTo": "vendor_pq_criteria_answers",
+ "columnsFrom": [
+ "vendor_criteria_answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_investigation_attachments": {
+ "name": "vendor_investigation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "investigation_id": {
+ "name": "investigation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'REPORT'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_investigation_attachments_investigation_id_vendor_investigations_id_fk": {
+ "name": "vendor_investigation_attachments_investigation_id_vendor_investigations_id_fk",
+ "tableFrom": "vendor_investigation_attachments",
+ "tableTo": "vendor_investigations",
+ "columnsFrom": [
+ "investigation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_investigations": {
+ "name": "vendor_investigations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pq_submission_id": {
+ "name": "pq_submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "qm_manager_id": {
+ "name": "qm_manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_status": {
+ "name": "investigation_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "investigation_address": {
+ "name": "investigation_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_method": {
+ "name": "investigation_method",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_start_at": {
+ "name": "scheduled_start_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_end_at": {
+ "name": "scheduled_end_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "forecasted_at": {
+ "name": "forecasted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_result": {
+ "name": "evaluation_result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_notes": {
+ "name": "investigation_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "purchase_comment": {
+ "name": "purchase_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_investigations_vendor_id_vendors_id_fk": {
+ "name": "vendor_investigations_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_investigations_pq_submission_id_vendor_pq_submissions_id_fk": {
+ "name": "vendor_investigations_pq_submission_id_vendor_pq_submissions_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "vendor_pq_submissions",
+ "columnsFrom": [
+ "pq_submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "cascade"
+ },
+ "vendor_investigations_requester_id_users_id_fk": {
+ "name": "vendor_investigations_requester_id_users_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_investigations_qm_manager_id_users_id_fk": {
+ "name": "vendor_investigations_qm_manager_id_users_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "qm_manager_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_submissions": {
+ "name": "vendor_pq_submissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "pq_number": {
+ "name": "pq_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REQUESTED'"
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agreements": {
+ "name": "agreements",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "pq_items": {
+ "name": "pq_items",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejected_at": {
+ "name": "rejected_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reject_reason": {
+ "name": "reject_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_pq_submission": {
+ "name": "unique_pq_submission",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_pq_submissions_requester_id_users_id_fk": {
+ "name": "vendor_pq_submissions_requester_id_users_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_pq_submissions_vendor_id_vendors_id_fk": {
+ "name": "vendor_pq_submissions_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_submissions_project_id_projects_id_fk": {
+ "name": "vendor_pq_submissions_project_id_projects_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_pq_submissions_pq_number_unique": {
+ "name": "vendor_pq_submissions_pq_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pq_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_criteria_answers": {
+ "name": "vendor_pq_criteria_answers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "answer": {
+ "name": "answer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_comment": {
+ "name": "shi_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_reply": {
+ "name": "vendor_reply",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_pq_criteria_answers_vendor_id_vendors_id_fk": {
+ "name": "vendor_pq_criteria_answers_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_criteria_answers_criteria_id_pq_criterias_id_fk": {
+ "name": "vendor_pq_criteria_answers_criteria_id_pq_criterias_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "pq_criterias",
+ "columnsFrom": [
+ "criteria_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_criteria_answers_project_id_projects_id_fk": {
+ "name": "vendor_pq_criteria_answers_project_id_projects_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_review_logs": {
+ "name": "vendor_pq_review_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_pq_criteria_answer_id": {
+ "name": "vendor_pq_criteria_answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_name": {
+ "name": "reviewer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_pq_review_logs_vendor_pq_criteria_answer_id_vendor_pq_criteria_answers_id_fk": {
+ "name": "vendor_pq_review_logs_vendor_pq_criteria_answer_id_vendor_pq_criteria_answers_id_fk",
+ "tableFrom": "vendor_pq_review_logs",
+ "tableTo": "vendor_pq_criteria_answers",
+ "columnsFrom": [
+ "vendor_pq_criteria_answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_site_visit_info": {
+ "name": "vendor_site_visit_info",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "site_visit_request_id": {
+ "name": "site_visit_request_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_name": {
+ "name": "factory_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_location": {
+ "name": "factory_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_address": {
+ "name": "factory_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_name": {
+ "name": "factory_pic_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_phone": {
+ "name": "factory_pic_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_email": {
+ "name": "factory_pic_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_directions": {
+ "name": "factory_directions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_procedure": {
+ "name": "access_procedure",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachments": {
+ "name": "has_attachments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "other_info": {
+ "name": "other_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "submitted_by": {
+ "name": "submitted_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_site_visit_info_site_visit_request_id_site_visit_requests_id_fk": {
+ "name": "vendor_site_visit_info_site_visit_request_id_site_visit_requests_id_fk",
+ "tableFrom": "vendor_site_visit_info",
+ "tableTo": "site_visit_requests",
+ "columnsFrom": [
+ "site_visit_request_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_site_visit_info_submitted_by_users_id_fk": {
+ "name": "vendor_site_visit_info_submitted_by_users_id_fk",
+ "tableFrom": "vendor_site_visit_info",
+ "tableTo": "users",
+ "columnsFrom": [
+ "submitted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_projects": {
+ "name": "bidding_projects",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "proj_nm": {
+ "name": "proj_nm",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sector": {
+ "name": "sector",
+ "type": "char(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proj_msrm": {
+ "name": "proj_msrm",
+ "type": "numeric(3, 0)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kunnr": {
+ "name": "kunnr",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kunnr_nm": {
+ "name": "kunnr_nm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cls_1": {
+ "name": "cls_1",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cls1_nm": {
+ "name": "cls1_nm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ptype": {
+ "name": "ptype",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ptype_nm": {
+ "name": "ptype_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_cd": {
+ "name": "pmodel_cd",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_nm": {
+ "name": "pmodel_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_sz": {
+ "name": "pmodel_sz",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_uom": {
+ "name": "pmodel_uom",
+ "type": "char(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "txt04": {
+ "name": "txt04",
+ "type": "char(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "txt30": {
+ "name": "txt30",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "estm_pm": {
+ "name": "estm_pm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pjt_type": {
+ "name": "pjt_type",
+ "type": "varchar",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "bidding_projects_pspid_unique": {
+ "name": "bidding_projects_pspid_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pspid"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_series": {
+ "name": "project_series",
+ "schema": "",
+ "columns": {
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sers_no": {
+ "name": "sers_no",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sc_dt": {
+ "name": "sc_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kl_dt": {
+ "name": "kl_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "lc_dt": {
+ "name": "lc_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dl_dt": {
+ "name": "dl_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dock_no": {
+ "name": "dock_no",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dock_nm": {
+ "name": "dock_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proj_no": {
+ "name": "proj_no",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "post1": {
+ "name": "post1",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "project_sersNo_unique": {
+ "name": "project_sersNo_unique",
+ "columns": [
+ {
+ "expression": "pspid",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "sers_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_series_pspid_bidding_projects_pspid_fk": {
+ "name": "project_series_pspid_bidding_projects_pspid_fk",
+ "tableFrom": "project_series",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "pspid"
+ ],
+ "columnsTo": [
+ "pspid"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.projects": {
+ "name": "projects",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ship'"
+ },
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "projects_pspid_unique": {
+ "name": "projects_pspid_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pspid"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.cbe_evaluations": {
+ "name": "cbe_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluated_by": {
+ "name": "evaluated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluated_at": {
+ "name": "evaluated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "result": {
+ "name": "result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_cost": {
+ "name": "total_cost",
+ "type": "numeric(18, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_schedule": {
+ "name": "delivery_schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cbe_evaluations_rfq_id_rfqs_id_fk": {
+ "name": "cbe_evaluations_rfq_id_rfqs_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "cbe_evaluations_vendor_id_vendors_id_fk": {
+ "name": "cbe_evaluations_vendor_id_vendors_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "cbe_evaluations_evaluated_by_users_id_fk": {
+ "name": "cbe_evaluations_evaluated_by_users_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "evaluated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_attachments": {
+ "name": "rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_id": {
+ "name": "evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cbe_id": {
+ "name": "cbe_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_attachments_rfq_id_rfqs_id_fk": {
+ "name": "rfq_attachments_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_vendor_id_vendors_id_fk": {
+ "name": "rfq_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_evaluation_id_rfq_evaluations_id_fk": {
+ "name": "rfq_attachments_evaluation_id_rfq_evaluations_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfq_evaluations",
+ "columnsFrom": [
+ "evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_cbe_id_cbe_evaluations_id_fk": {
+ "name": "rfq_attachments_cbe_id_cbe_evaluations_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "cbe_evaluations",
+ "columnsFrom": [
+ "cbe_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_comment_id_rfq_comments_id_fk": {
+ "name": "rfq_attachments_comment_id_rfq_comments_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_comments": {
+ "name": "rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment_text": {
+ "name": "comment_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "commented_by": {
+ "name": "commented_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_id": {
+ "name": "evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cbe_id": {
+ "name": "cbe_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_comments_rfq_id_rfqs_id_fk": {
+ "name": "rfq_comments_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_vendor_id_vendors_id_fk": {
+ "name": "rfq_comments_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_commented_by_users_id_fk": {
+ "name": "rfq_comments_commented_by_users_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "commented_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_evaluation_id_rfq_evaluations_id_fk": {
+ "name": "rfq_comments_evaluation_id_rfq_evaluations_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "rfq_evaluations",
+ "columnsFrom": [
+ "evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_cbe_id_vendor_responses_id_fk": {
+ "name": "rfq_comments_cbe_id_vendor_responses_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "cbe_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_evaluations": {
+ "name": "rfq_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "eval_type": {
+ "name": "eval_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "result": {
+ "name": "result",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_evaluations_rfq_id_rfqs_id_fk": {
+ "name": "rfq_evaluations_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_evaluations",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_evaluations_vendor_id_vendors_id_fk": {
+ "name": "rfq_evaluations_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_evaluations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_items": {
+ "name": "rfq_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_items_rfq_id_rfqs_id_fk": {
+ "name": "rfq_items_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_items",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "rfq_items_item_code_items_item_code_fk": {
+ "name": "rfq_items_item_code_items_item_code_fk",
+ "tableFrom": "rfq_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfqs": {
+ "name": "rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_project_id": {
+ "name": "bid_project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PURCHASE'"
+ },
+ "parent_rfq_id": {
+ "name": "parent_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfqs_project_id_projects_id_fk": {
+ "name": "rfqs_project_id_projects_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_bid_project_id_bidding_projects_id_fk": {
+ "name": "rfqs_bid_project_id_bidding_projects_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "bid_project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_created_by_users_id_fk": {
+ "name": "rfqs_created_by_users_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_parent_rfq_id_rfqs_id_fk": {
+ "name": "rfqs_parent_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "parent_rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "rfqs_rfq_code_unique": {
+ "name": "rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_commercial_responses": {
+ "name": "vendor_commercial_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric(18, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_period": {
+ "name": "delivery_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "warranty_period": {
+ "name": "warranty_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validity_period": {
+ "name": "validity_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "price_breakdown": {
+ "name": "price_breakdown",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commercial_notes": {
+ "name": "commercial_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_commercial_responses_response_id_vendor_responses_id_fk": {
+ "name": "vendor_commercial_responses_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_commercial_responses",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_attachments": {
+ "name": "vendor_response_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "technical_response_id": {
+ "name": "technical_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commercial_response_id": {
+ "name": "commercial_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_attachments_response_id_vendor_responses_id_fk": {
+ "name": "vendor_response_attachments_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_technical_response_id_vendor_technical_responses_id_fk": {
+ "name": "vendor_response_attachments_technical_response_id_vendor_technical_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_technical_responses",
+ "columnsFrom": [
+ "technical_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_commercial_response_id_vendor_commercial_responses_id_fk": {
+ "name": "vendor_response_attachments_commercial_response_id_vendor_commercial_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_commercial_responses",
+ "columnsFrom": [
+ "commercial_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_responses": {
+ "name": "vendor_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REVIEWING'"
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_by": {
+ "name": "responded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "vendor_response_unique": {
+ "name": "vendor_response_unique",
+ "columns": [
+ {
+ "expression": "rfq_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_responses_rfq_id_rfqs_id_fk": {
+ "name": "vendor_responses_rfq_id_rfqs_id_fk",
+ "tableFrom": "vendor_responses",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_responses_vendor_id_vendors_id_fk": {
+ "name": "vendor_responses_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_responses",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_technical_responses": {
+ "name": "vendor_technical_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_technical_responses_response_id_vendor_responses_id_fk": {
+ "name": "vendor_technical_responses_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_technical_responses",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.departments": {
+ "name": "departments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "departments_department_code_unique": {
+ "name": "departments_department_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.login_attempts": {
+ "name": "login_attempts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "login_attempts_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "failure_reason": {
+ "name": "failure_reason",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attempted_at": {
+ "name": "attempted_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "login_attempts_email_idx": {
+ "name": "login_attempts_email_idx",
+ "columns": [
+ {
+ "expression": "email",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "login_attempts_attempted_at_idx": {
+ "name": "login_attempts_attempted_at_idx",
+ "columns": [
+ {
+ "expression": "attempted_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "login_attempts_ip_address_idx": {
+ "name": "login_attempts_ip_address_idx",
+ "columns": [
+ {
+ "expression": "ip_address",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "login_attempts_user_id_users_id_fk": {
+ "name": "login_attempts_user_id_users_id_fk",
+ "tableFrom": "login_attempts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mfa_tokens": {
+ "name": "mfa_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "mfa_tokens_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "phone_number": {
+ "name": "phone_number",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attempts": {
+ "name": "attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "mfa_tokens_user_id_idx": {
+ "name": "mfa_tokens_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "mfa_tokens_token_idx": {
+ "name": "mfa_tokens_token_idx",
+ "columns": [
+ {
+ "expression": "token",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "mfa_tokens_expires_at_idx": {
+ "name": "mfa_tokens_expires_at_idx",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "mfa_tokens_user_id_users_id_fk": {
+ "name": "mfa_tokens_user_id_users_id_fk",
+ "tableFrom": "mfa_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.otps": {
+ "name": "otps",
+ "schema": "",
+ "columns": {
+ "email": {
+ "name": "email",
+ "type": "varchar(256)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "otpToken": {
+ "name": "otpToken",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "otp_expires": {
+ "name": "otp_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.password_history": {
+ "name": "password_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "password_history_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "salt": {
+ "name": "salt",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "replaced_at": {
+ "name": "replaced_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "password_history_user_id_idx": {
+ "name": "password_history_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "password_history_created_at_idx": {
+ "name": "password_history_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "password_history_user_id_users_id_fk": {
+ "name": "password_history_user_id_users_id_fk",
+ "tableFrom": "password_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.passwords": {
+ "name": "passwords",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "passwords_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "salt": {
+ "name": "salt",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "strength": {
+ "name": "strength",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_uppercase": {
+ "name": "has_uppercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_lowercase": {
+ "name": "has_lowercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_numbers": {
+ "name": "has_numbers",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_symbols": {
+ "name": "has_symbols",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "length": {
+ "name": "length",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "passwords_user_id_idx": {
+ "name": "passwords_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "passwords_active_idx": {
+ "name": "passwords_active_idx",
+ "columns": [
+ {
+ "expression": "is_active",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "passwords_user_id_users_id_fk": {
+ "name": "passwords_user_id_users_id_fk",
+ "tableFrom": "passwords",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.permissions": {
+ "name": "permissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "permissions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_key": {
+ "name": "permission_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.role_permissions": {
+ "name": "role_permissions",
+ "schema": "",
+ "columns": {
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_id": {
+ "name": "permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "role_permissions_role_id_roles_id_fk": {
+ "name": "role_permissions_role_id_roles_id_fk",
+ "tableFrom": "role_permissions",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "role_permissions_permission_id_permissions_id_fk": {
+ "name": "role_permissions_permission_id_permissions_id_fk",
+ "tableFrom": "role_permissions",
+ "tableTo": "permissions",
+ "columnsFrom": [
+ "permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "roles_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "roles_company_id_vendors_id_fk": {
+ "name": "roles_company_id_vendors_id_fk",
+ "tableFrom": "roles",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security_settings": {
+ "name": "security_settings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "security_settings_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "min_password_length": {
+ "name": "min_password_length",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 8
+ },
+ "require_uppercase": {
+ "name": "require_uppercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_lowercase": {
+ "name": "require_lowercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_numbers": {
+ "name": "require_numbers",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_symbols": {
+ "name": "require_symbols",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "password_expiry_days": {
+ "name": "password_expiry_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 90
+ },
+ "password_history_count": {
+ "name": "password_history_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "max_failed_attempts": {
+ "name": "max_failed_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "lockout_duration_minutes": {
+ "name": "lockout_duration_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 30
+ },
+ "require_mfa_for_partners": {
+ "name": "require_mfa_for_partners",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "sms_token_expiry_minutes": {
+ "name": "sms_token_expiry_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "max_sms_attempts_per_day": {
+ "name": "max_sms_attempts_per_day",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 10
+ },
+ "session_timeout_minutes": {
+ "name": "session_timeout_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 480
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "epId": {
+ "name": "epId",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deptCode": {
+ "name": "deptCode",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deptName": {
+ "name": "deptName",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tech_company_id": {
+ "name": "tech_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'partners'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'en'"
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mfa_enabled": {
+ "name": "mfa_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "mfa_secret": {
+ "name": "mfa_secret",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_locked": {
+ "name": "is_locked",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "lockout_until": {
+ "name": "lockout_until",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "failed_login_attempts": {
+ "name": "failed_login_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_login_at": {
+ "name": "last_login_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password_change_required": {
+ "name": "password_change_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "deactivated_at": {
+ "name": "deactivated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deactivation_reason": {
+ "name": "deactivation_reason",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_consent_update": {
+ "name": "last_consent_update",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consent_version": {
+ "name": "consent_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requires_consent_update": {
+ "name": "requires_consent_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "users_email_idx": {
+ "name": "users_email_idx",
+ "columns": [
+ {
+ "expression": "email",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "users_phone_idx": {
+ "name": "users_phone_idx",
+ "columns": [
+ {
+ "expression": "phone",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "users_company_id_vendors_id_fk": {
+ "name": "users_company_id_vendors_id_fk",
+ "tableFrom": "users",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "users_tech_company_id_tech_vendors_id_fk": {
+ "name": "users_tech_company_id_tech_vendors_id_fk",
+ "tableFrom": "users",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "tech_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "users_email_unique": {
+ "name": "users_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.form_entries": {
+ "name": "form_entries",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "form_entries_contract_item_id_contract_items_id_fk": {
+ "name": "form_entries_contract_item_id_contract_items_id_fk",
+ "tableFrom": "form_entries",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.form_metas": {
+ "name": "form_metas",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "columns": {
+ "name": "columns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "form_metas_project_id_projects_id_fk": {
+ "name": "form_metas_project_id_projects_id_fk",
+ "tableFrom": "form_metas",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "form_code_project_unique": {
+ "name": "form_code_project_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "form_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.forms": {
+ "name": "forms",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "forms_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "eng": {
+ "name": "eng",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "im": {
+ "name": "im",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "contract_item_form_code_unique": {
+ "name": "contract_item_form_code_unique",
+ "columns": [
+ {
+ "expression": "contract_item_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "form_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "forms_contract_item_id_contract_items_id_fk": {
+ "name": "forms_contract_item_id_contract_items_id_fk",
+ "tableFrom": "forms",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_class_attributes": {
+ "name": "tag_class_attributes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tag_class_attributes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_class_id": {
+ "name": "tag_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "att_id": {
+ "name": "att_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "def_val": {
+ "name": "def_val",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uom_id": {
+ "name": "uom_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "seq": {
+ "name": "seq",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "tag_class_attributes_seq_idx": {
+ "name": "tag_class_attributes_seq_idx",
+ "columns": [
+ {
+ "expression": "seq",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "tag_class_attributes_tag_class_id_tag_classes_id_fk": {
+ "name": "tag_class_attributes_tag_class_id_tag_classes_id_fk",
+ "tableFrom": "tag_class_attributes",
+ "tableTo": "tag_classes",
+ "columnsFrom": [
+ "tag_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_att_id_in_tag_class": {
+ "name": "uniq_att_id_in_tag_class",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_class_id",
+ "att_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_classes": {
+ "name": "tag_classes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tag_classes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subclasses": {
+ "name": "subclasses",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'[]'::json"
+ },
+ "subclass_remark": {
+ "name": "subclass_remark",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{}'::json"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_classes_project_id_projects_id_fk": {
+ "name": "tag_classes_project_id_projects_id_fk",
+ "tableFrom": "tag_classes",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tag_classes_tag_type_code_project_id_tag_types_code_project_id_fk": {
+ "name": "tag_classes_tag_type_code_project_id_tag_types_code_project_id_fk",
+ "tableFrom": "tag_classes",
+ "tableTo": "tag_types",
+ "columnsFrom": [
+ "tag_type_code",
+ "project_id"
+ ],
+ "columnsTo": [
+ "code",
+ "project_id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_code_in_project": {
+ "name": "uniq_code_in_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_subfield_options": {
+ "name": "tag_subfield_options",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_subfield_options_project_id_projects_id_fk": {
+ "name": "tag_subfield_options_project_id_projects_id_fk",
+ "tableFrom": "tag_subfield_options",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_attribute_project_code": {
+ "name": "uniq_attribute_project_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "attributes_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_subfields": {
+ "name": "tag_subfields",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_description": {
+ "name": "attributes_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expression": {
+ "name": "expression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delimiter": {
+ "name": "delimiter",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_subfields_project_id_projects_id_fk": {
+ "name": "tag_subfields_project_id_projects_id_fk",
+ "tableFrom": "tag_subfields",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_tag_type_attribute": {
+ "name": "uniq_tag_type_attribute",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "tag_type_code",
+ "attributes_id"
+ ]
+ },
+ "uniq_attribute_id_project": {
+ "name": "uniq_attribute_id_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "attributes_id",
+ "project_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_type_class_form_mappings": {
+ "name": "tag_type_class_form_mappings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_label": {
+ "name": "tag_type_label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "class_label": {
+ "name": "class_label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ep": {
+ "name": "ep",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_mapping_in_project": {
+ "name": "uniq_mapping_in_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "tag_type_label",
+ "class_label",
+ "form_code",
+ "remark"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_types": {
+ "name": "tag_types",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_types_project_id_projects_id_fk": {
+ "name": "tag_types_project_id_projects_id_fk",
+ "tableFrom": "tag_types",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tag_types_code_project_id_pk": {
+ "name": "tag_types_code_project_id_pk",
+ "columns": [
+ "code",
+ "project_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tags": {
+ "name": "tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tags_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_id": {
+ "name": "form_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_idx": {
+ "name": "tag_idx",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_no": {
+ "name": "tag_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type": {
+ "name": "tag_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "class": {
+ "name": "class",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_class_id": {
+ "name": "tag_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tags_contract_item_id_contract_items_id_fk": {
+ "name": "tags_contract_item_id_contract_items_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tags_form_id_forms_id_fk": {
+ "name": "tags_form_id_forms_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "forms",
+ "columnsFrom": [
+ "form_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tags_tag_class_id_tag_classes_id_fk": {
+ "name": "tags_tag_class_id_tag_classes_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "tag_classes",
+ "columnsFrom": [
+ "tag_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contract_item_tag_idx_unique": {
+ "name": "contract_item_tag_idx_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_item_id",
+ "tag_idx"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_items": {
+ "name": "template_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "form_mapping_id": {
+ "name": "form_mapping_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tmpl_id": {
+ "name": "tmpl_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tmpl_type": {
+ "name": "tmpl_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "spr_lst_setup": {
+ "name": "spr_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "grd_lst_setup": {
+ "name": "grd_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "spr_itm_lst_setup": {
+ "name": "spr_itm_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_items_form_mapping_id_tag_type_class_form_mappings_id_fk": {
+ "name": "template_items_form_mapping_id_tag_type_class_form_mappings_id_fk",
+ "tableFrom": "template_items",
+ "tableTo": "tag_type_class_form_mappings",
+ "columnsFrom": [
+ "form_mapping_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_tmpl_in_form_mapping": {
+ "name": "uniq_tmpl_in_form_mapping",
+ "nullsNotDistinct": false,
+ "columns": [
+ "form_mapping_id",
+ "tmpl_id"
+ ]
+ },
+ "uniq_name_in_form_mapping": {
+ "name": "uniq_name_in_form_mapping",
+ "nullsNotDistinct": false,
+ "columns": [
+ "form_mapping_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_data_report_temps": {
+ "name": "vendor_data_report_temps",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_id": {
+ "name": "form_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_data_report_temps_contract_item_id_contract_items_id_fk": {
+ "name": "vendor_data_report_temps_contract_item_id_contract_items_id_fk",
+ "tableFrom": "vendor_data_report_temps",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_data_report_temps_form_id_forms_id_fk": {
+ "name": "vendor_data_report_temps_form_id_forms_id_fk",
+ "tableFrom": "vendor_data_report_temps",
+ "tableTo": "forms",
+ "columnsFrom": [
+ "form_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.change_logs": {
+ "name": "change_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_id": {
+ "name": "entity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "changed_fields": {
+ "name": "changed_fields",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "old_values": {
+ "name": "old_values",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_values": {
+ "name": "new_values",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_name": {
+ "name": "user_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_synced": {
+ "name": "is_synced",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "sync_attempts": {
+ "name": "sync_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "last_sync_error": {
+ "name": "last_sync_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "synced_at": {
+ "name": "synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_systems": {
+ "name": "target_systems",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'[]'::jsonb"
+ }
+ },
+ "indexes": {
+ "idx_change_logs_vendor_synced": {
+ "name": "idx_change_logs_vendor_synced",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_synced",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_created_at": {
+ "name": "idx_change_logs_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_entity": {
+ "name": "idx_change_logs_entity",
+ "columns": [
+ {
+ "expression": "entity_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "entity_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_sync_attempts": {
+ "name": "idx_change_logs_sync_attempts",
+ "columns": [
+ {
+ "expression": "sync_attempts",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_attachments": {
+ "name": "document_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "document_attachments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upload_id": {
+ "name": "upload_id",
+ "type": "varchar(36)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "varchar(36)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dolce_file_path": {
+ "name": "dolce_file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_attachments_revision_id_revisions_id_fk": {
+ "name": "document_attachments_revision_id_revisions_id_fk",
+ "tableFrom": "document_attachments",
+ "tableTo": "revisions",
+ "columnsFrom": [
+ "revision_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.documents": {
+ "name": "documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "documents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_move_gbn": {
+ "name": "drawing_move_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discipline": {
+ "name": "discipline",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_document_id": {
+ "name": "external_document_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_system_type": {
+ "name": "external_system_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_synced_at": {
+ "name": "external_synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_drawing_no": {
+ "name": "shi_drawing_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager": {
+ "name": "manager",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_enm": {
+ "name": "manager_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_no": {
+ "name": "manager_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group": {
+ "name": "register_group",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group_id": {
+ "name": "register_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_no": {
+ "name": "create_user_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_id": {
+ "name": "create_user_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_enm": {
+ "name": "create_user_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_contract_doc_status": {
+ "name": "unique_contract_doc_status",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_contract_vendor_doc": {
+ "name": "unique_contract_vendor_doc",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"vendor_doc_number\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_external_doc": {
+ "name": "unique_external_doc",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_system_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"external_document_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_project_doc_status": {
+ "name": "unique_project_doc_status",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_external_doc_project": {
+ "name": "unique_external_doc_project",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_system_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"external_document_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "drawing_kind_idx": {
+ "name": "drawing_kind_idx",
+ "columns": [
+ {
+ "expression": "drawing_kind",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "documents_project_id_projects_id_fk": {
+ "name": "documents_project_id_projects_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "documents_contract_id_contracts_id_fk": {
+ "name": "documents_contract_id_contracts_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "documents_vendor_id_vendors_id_fk": {
+ "name": "documents_vendor_id_vendors_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_stages": {
+ "name": "issue_stages",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "issue_stages_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_name": {
+ "name": "stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "plan_date": {
+ "name": "plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actual_date": {
+ "name": "actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stage_status": {
+ "name": "stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "stage_order": {
+ "name": "stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'MEDIUM'"
+ },
+ "assignee_id": {
+ "name": "assignee_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assignee_name": {
+ "name": "assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reminder_days": {
+ "name": "reminder_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_document_stage": {
+ "name": "unique_document_stage",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "document_stage_order": {
+ "name": "document_stage_order",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_order",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_stages_document_id_documents_id_fk": {
+ "name": "issue_stages_document_id_documents_id_fk",
+ "tableFrom": "issue_stages",
+ "tableTo": "documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.revisions": {
+ "name": "revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "revisions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "issue_stage_id": {
+ "name": "issue_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "uploader_type": {
+ "name": "uploader_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'vendor'"
+ },
+ "uploader_id": {
+ "name": "uploader_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploader_name": {
+ "name": "uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage": {
+ "name": "usage",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_type": {
+ "name": "usage_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_status": {
+ "name": "revision_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'SUBMITTED'"
+ },
+ "submitted_date": {
+ "name": "submitted_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_start_date": {
+ "name": "review_start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_date": {
+ "name": "approved_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejected_date": {
+ "name": "rejected_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_id": {
+ "name": "reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_name": {
+ "name": "reviewer_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_upload_id": {
+ "name": "external_upload_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "register_id": {
+ "name": "register_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "unique_stage_revision_usage": {
+ "name": "unique_stage_revision_usage",
+ "columns": [
+ {
+ "expression": "issue_stage_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "usage",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "COALESCE(\"usage_type\", '')",
+ "asc": true,
+ "isExpression": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.stage_documents": {
+ "name": "stage_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "stage_documents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_project_doc": {
+ "name": "unique_project_doc",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_project_vendor_doc": {
+ "name": "unique_project_vendor_doc",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"stage_documents\".\"vendor_doc_number\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_doc_vendor_id_idx": {
+ "name": "stage_doc_vendor_id_idx",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_doc_status_idx": {
+ "name": "stage_doc_status_idx",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "stage_documents_project_id_projects_id_fk": {
+ "name": "stage_documents_project_id_projects_id_fk",
+ "tableFrom": "stage_documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.stage_issue_stages": {
+ "name": "stage_issue_stages",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "stage_issue_stages_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_name": {
+ "name": "stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "plan_date": {
+ "name": "plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actual_date": {
+ "name": "actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stage_status": {
+ "name": "stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "stage_order": {
+ "name": "stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'MEDIUM'"
+ },
+ "assignee_id": {
+ "name": "assignee_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assignee_name": {
+ "name": "assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reminder_days": {
+ "name": "reminder_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_stage_document_stage": {
+ "name": "unique_stage_document_stage",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_document_stage_order": {
+ "name": "stage_document_stage_order",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_order",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "stage_issue_stages_document_id_stage_documents_id_fk": {
+ "name": "stage_issue_stages_document_id_stage_documents_id_fk",
+ "tableFrom": "stage_issue_stages",
+ "tableTo": "stage_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_batches": {
+ "name": "sync_batches",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "batch_size": {
+ "name": "batch_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "retry_count": {
+ "name": "retry_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "change_log_ids": {
+ "name": "change_log_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "success_count": {
+ "name": "success_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "failure_count": {
+ "name": "failure_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_metadata": {
+ "name": "sync_metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_sync_batches_project_system": {
+ "name": "idx_sync_batches_project_system",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_system",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sync_batches_status": {
+ "name": "idx_sync_batches_status",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sync_batches_created_at": {
+ "name": "idx_sync_batches_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_configs": {
+ "name": "sync_configs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_enabled": {
+ "name": "sync_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "sync_interval_minutes": {
+ "name": "sync_interval_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 30
+ },
+ "last_successful_sync": {
+ "name": "last_successful_sync",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_sync_attempt": {
+ "name": "last_sync_attempt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpoint_url": {
+ "name": "endpoint_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_token": {
+ "name": "auth_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_version": {
+ "name": "api_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'v1'"
+ },
+ "max_batch_size": {
+ "name": "max_batch_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 100
+ },
+ "retry_max_attempts": {
+ "name": "retry_max_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_sync_configs_contract_system": {
+ "name": "idx_sync_configs_contract_system",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_system",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_attachments": {
+ "name": "vendor_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'GENERAL'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_attachments_vendor_id_vendors_id_fk": {
+ "name": "vendor_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_candidates": {
+ "name": "vendor_candidates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'COLLECTED'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_candidates_vendor_id_vendors_id_fk": {
+ "name": "vendor_candidates_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_candidates",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_contacts": {
+ "name": "vendor_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_position": {
+ "name": "contact_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_department": {
+ "name": "contact_department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_task": {
+ "name": "contact_task",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_primary": {
+ "name": "is_primary",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_contacts_vendor_id_vendors_id_fk": {
+ "name": "vendor_contacts_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_contacts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_possible_items": {
+ "name": "vendor_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_possible_items_vendor_id_vendors_id_fk": {
+ "name": "vendor_possible_items_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_possible_items",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_possible_items_item_code_items_item_code_fk": {
+ "name": "vendor_possible_items_item_code_items_item_code_fk",
+ "tableFrom": "vendor_possible_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_possible_materials": {
+ "name": "vendor_possible_materials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_possible_materials_vendor_id_vendors_id_fk": {
+ "name": "vendor_possible_materials_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_possible_materials",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_possible_materials_item_code_materials_item_code_fk": {
+ "name": "vendor_possible_materials_item_code_materials_item_code_fk",
+ "tableFrom": "vendor_possible_materials",
+ "tableTo": "materials",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_types": {
+ "name": "vendor_types",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_ko": {
+ "name": "name_ko",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_en": {
+ "name": "name_en",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_types_code_unique": {
+ "name": "vendor_types_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendors": {
+ "name": "vendors",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "vendor_type_id": {
+ "name": "vendor_type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_work_expirence": {
+ "name": "representative_work_expirence",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "corporate_registration_number": {
+ "name": "corporate_registration_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_agency": {
+ "name": "credit_agency",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_rating": {
+ "name": "credit_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cash_flow_rating": {
+ "name": "cash_flow_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "business_size": {
+ "name": "business_size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendors_vendor_type_id_vendor_types_id_fk": {
+ "name": "vendors_vendor_type_id_vendor_types_id_fk",
+ "tableFrom": "vendors",
+ "tableTo": "vendor_types",
+ "columnsFrom": [
+ "vendor_type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tasks": {
+ "name": "tasks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(30)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'todo'"
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bug'"
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'low'"
+ },
+ "archived": {
+ "name": "archived",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "current_timestamp"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "tasks_code_unique": {
+ "name": "tasks_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_candidate_logs": {
+ "name": "vendor_candidate_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_candidate_id": {
+ "name": "vendor_candidate_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_candidate_logs_vendor_candidate_id_vendor_candidates_id_fk": {
+ "name": "vendor_candidate_logs_vendor_candidate_id_vendor_candidates_id_fk",
+ "tableFrom": "vendor_candidate_logs",
+ "tableTo": "vendor_candidates",
+ "columnsFrom": [
+ "vendor_candidate_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_candidate_logs_user_id_users_id_fk": {
+ "name": "vendor_candidate_logs_user_id_users_id_fk",
+ "tableFrom": "vendor_candidate_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendors_logs": {
+ "name": "vendors_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendors_logs_vendor_id_vendors_id_fk": {
+ "name": "vendors_logs_vendor_id_vendors_id_fk",
+ "tableFrom": "vendors_logs",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendors_logs_user_id_users_id_fk": {
+ "name": "vendors_logs_user_id_users_id_fk",
+ "tableFrom": "vendors_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.basic_contract": {
+ "name": "basic_contract",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "basic_contract_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_by": {
+ "name": "requested_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "basic_contract_template_id_basic_contract_templates_id_fk": {
+ "name": "basic_contract_template_id_basic_contract_templates_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "basic_contract_templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_vendor_id_vendors_id_fk": {
+ "name": "basic_contract_vendor_id_vendors_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_requested_by_users_id_fk": {
+ "name": "basic_contract_requested_by_users_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requested_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.basic_contract_templates": {
+ "name": "basic_contract_templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "basic_contract_templates_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "template_name": {
+ "name": "template_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validity_period": {
+ "name": "validity_period",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_review_required": {
+ "name": "legal_review_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "shipbuilding_applicable": {
+ "name": "shipbuilding_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "wind_applicable": {
+ "name": "wind_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "pc_applicable": {
+ "name": "pc_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "nb_applicable": {
+ "name": "nb_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "rc_applicable": {
+ "name": "rc_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "gy_applicable": {
+ "name": "gy_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sys_applicable": {
+ "name": "sys_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "infra_applicable": {
+ "name": "infra_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disposed_at": {
+ "name": "disposed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restored_at": {
+ "name": "restored_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "basic_contract_templates_created_by_users_id_fk": {
+ "name": "basic_contract_templates_created_by_users_id_fk",
+ "tableFrom": "basic_contract_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_templates_updated_by_users_id_fk": {
+ "name": "basic_contract_templates_updated_by_users_id_fk",
+ "tableFrom": "basic_contract_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "template_name_revision_unique": {
+ "name": "template_name_revision_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "template_name",
+ "revision"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.incoterms": {
+ "name": "incoterms",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(20)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.payment_terms": {
+ "name": "payment_terms",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.place_of_shipping": {
+ "name": "place_of_shipping",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(20)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_items": {
+ "name": "pr_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_item": {
+ "name": "rfq_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item": {
+ "name": "pr_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_no": {
+ "name": "pr_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_category": {
+ "name": "material_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "acc": {
+ "name": "acc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "size": {
+ "name": "size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gross_weight": {
+ "name": "gross_weight",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "gw_uom": {
+ "name": "gw_uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_no": {
+ "name": "spec_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_url": {
+ "name": "spec_url",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tracking_no": {
+ "name": "tracking_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_yn": {
+ "name": "major_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "project_def": {
+ "name": "project_def",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_sc": {
+ "name": "project_sc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_kl": {
+ "name": "project_kl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_lc": {
+ "name": "project_lc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_dl": {
+ "name": "project_dl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_items_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "pr_items_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "pr_items",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_attachments": {
+ "name": "procurement_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "procurement_rfq_details_id": {
+ "name": "procurement_rfq_details_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_attachments_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "procurement_attachments_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_attachments_procurement_rfq_details_id_procurement_rfq_details_id_fk": {
+ "name": "procurement_attachments_procurement_rfq_details_id_procurement_rfq_details_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "procurement_rfq_details",
+ "columnsFrom": [
+ "procurement_rfq_details_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_attachments_created_by_users_id_fk": {
+ "name": "procurement_attachments_created_by_users_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "attachment_type_check": {
+ "name": "attachment_type_check",
+ "value": "\"procurement_attachments\".\"procurement_rfqs_id\" IS NOT NULL OR \"procurement_attachments\".\"procurement_rfq_details_id\" IS NOT NULL"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.procurement_quotation_items": {
+ "name": "procurement_quotation_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_price": {
+ "name": "unit_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "vendor_material_code": {
+ "name": "vendor_material_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_material_description": {
+ "name": "vendor_material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "lead_time_in_days": {
+ "name": "lead_time_in_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_rate": {
+ "name": "tax_rate",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_amount": {
+ "name": "tax_amount",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount_rate": {
+ "name": "discount_rate",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount_amount": {
+ "name": "discount_amount",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_alternative": {
+ "name": "is_alternative",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_recommended": {
+ "name": "is_recommended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_quotation_items_quotation_id_procurement_vendor_quotations_id_fk": {
+ "name": "procurement_quotation_items_quotation_id_procurement_vendor_quotations_id_fk",
+ "tableFrom": "procurement_quotation_items",
+ "tableTo": "procurement_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_quotation_items_pr_item_id_pr_items_id_fk": {
+ "name": "procurement_quotation_items_pr_item_id_pr_items_id_fk",
+ "tableFrom": "procurement_quotation_items",
+ "tableTo": "pr_items",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_attachments": {
+ "name": "procurement_rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_attachments_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_attachments_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_comment_id_procurement_rfq_comments_id_fk": {
+ "name": "procurement_rfq_attachments_comment_id_procurement_rfq_comments_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_quotation_id_procurement_vendor_quotations_id_fk": {
+ "name": "procurement_rfq_attachments_quotation_id_procurement_vendor_quotations_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_uploaded_by_users_id_fk": {
+ "name": "procurement_rfq_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_vendor_id_vendors_id_fk": {
+ "name": "procurement_rfq_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_comments": {
+ "name": "procurement_rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_comment": {
+ "name": "is_vendor_comment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_comments_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_comments_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_vendor_id_vendors_id_fk": {
+ "name": "procurement_rfq_comments_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_user_id_users_id_fk": {
+ "name": "procurement_rfq_comments_user_id_users_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_parent_comment_id_procurement_rfq_comments_id_fk": {
+ "name": "procurement_rfq_comments_parent_comment_id_procurement_rfq_comments_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "procurement_rfq_comments",
+ "columnsFrom": [
+ "parent_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_details": {
+ "name": "procurement_rfq_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendors_id": {
+ "name": "vendors_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_detail": {
+ "name": "incoterms_detail",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'VV'"
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_details_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_details_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_vendors_id_vendors_id_fk": {
+ "name": "procurement_rfq_details_vendors_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendors_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_payment_terms_code_payment_terms_code_fk": {
+ "name": "procurement_rfq_details_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_incoterms_code_incoterms_code_fk": {
+ "name": "procurement_rfq_details_incoterms_code_incoterms_code_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_updated_by_users_id_fk": {
+ "name": "procurement_rfq_details_updated_by_users_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfqs": {
+ "name": "procurement_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "series": {
+ "name": "series",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_send_date": {
+ "name": "rfq_send_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'RFQ Created'"
+ },
+ "rfq_sealed_yn": {
+ "name": "rfq_sealed_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sent_by": {
+ "name": "sent_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfqs_sent_by_users_id_fk": {
+ "name": "procurement_rfqs_sent_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "sent_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfqs_created_by_users_id_fk": {
+ "name": "procurement_rfqs_created_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfqs_updated_by_users_id_fk": {
+ "name": "procurement_rfqs_updated_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "procurement_rfqs_rfq_code_unique": {
+ "name": "procurement_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_vendor_quotations": {
+ "name": "procurement_vendor_quotations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quotation_code": {
+ "name": "quotation_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_version": {
+ "name": "quotation_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "total_items_count": {
+ "name": "total_items_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sub_total": {
+ "name": "sub_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "tax_total": {
+ "name": "tax_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "discount_total": {
+ "name": "discount_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "valid_until": {
+ "name": "valid_until",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "estimated_delivery_date": {
+ "name": "estimated_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_detail": {
+ "name": "incoterms_detail",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Draft'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejection_reason": {
+ "name": "rejection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accepted_at": {
+ "name": "accepted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_vendor_quotations_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_vendor_quotations_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_vendor_id_vendors_id_fk": {
+ "name": "procurement_vendor_quotations_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_payment_terms_code_payment_terms_code_fk": {
+ "name": "procurement_vendor_quotations_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_incoterms_code_incoterms_code_fk": {
+ "name": "procurement_vendor_quotations_incoterms_code_incoterms_code_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preset_shares": {
+ "name": "preset_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "preset_id": {
+ "name": "preset_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "shared_with_user_id": {
+ "name": "shared_with_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission": {
+ "name": "permission",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preset_shares_preset_id_table_presets_id_fk": {
+ "name": "preset_shares_preset_id_table_presets_id_fk",
+ "tableFrom": "preset_shares",
+ "tableTo": "table_presets",
+ "columnsFrom": [
+ "preset_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.table_presets": {
+ "name": "table_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "table_id": {
+ "name": "table_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "settings": {
+ "name": "settings",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_shared": {
+ "name": "is_shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_attachments": {
+ "name": "tech_sales_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tech_sales_rfq_id": {
+ "name": "tech_sales_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_attachments_tech_sales_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_attachments_tech_sales_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_attachments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "tech_sales_rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_attachments_created_by_users_id_fk": {
+ "name": "tech_sales_attachments_created_by_users_id_fk",
+ "tableFrom": "tech_sales_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_contact_possible_items": {
+ "name": "tech_sales_contact_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "contact_id": {
+ "name": "contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_possible_item_id": {
+ "name": "vendor_possible_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_contact_possible_items_contact_id_tech_vendor_contacts_id_fk": {
+ "name": "tech_sales_contact_possible_items_contact_id_tech_vendor_contacts_id_fk",
+ "tableFrom": "tech_sales_contact_possible_items",
+ "tableTo": "tech_vendor_contacts",
+ "columnsFrom": [
+ "contact_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_contact_possible_items_vendor_possible_item_id_tech_vendor_possible_items_id_fk": {
+ "name": "tech_sales_contact_possible_items_vendor_possible_item_id_tech_vendor_possible_items_id_fk",
+ "tableFrom": "tech_sales_contact_possible_items",
+ "tableTo": "tech_vendor_possible_items",
+ "columnsFrom": [
+ "vendor_possible_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_comment_attachments": {
+ "name": "tech_sales_rfq_comment_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_comment_attachments_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_comment_id_tech_sales_rfq_comments_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_comment_id_tech_sales_rfq_comments_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_uploaded_by_users_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_comments": {
+ "name": "tech_sales_rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_comment": {
+ "name": "is_vendor_comment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_comments_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_comments_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_rfq_comments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_user_id_users_id_fk": {
+ "name": "tech_sales_rfq_comments_user_id_users_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_parent_comment_id_tech_sales_rfq_comments_id_fk": {
+ "name": "tech_sales_rfq_comments_parent_comment_id_tech_sales_rfq_comments_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_sales_rfq_comments",
+ "columnsFrom": [
+ "parent_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_items": {
+ "name": "tech_sales_rfq_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_shipbuilding_id": {
+ "name": "item_shipbuilding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_offshore_top_id": {
+ "name": "item_offshore_top_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_offshore_hull_id": {
+ "name": "item_offshore_hull_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_type": {
+ "name": "item_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_items_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_items_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_shipbuilding_id_item_shipbuilding_id_fk": {
+ "name": "tech_sales_rfq_items_item_shipbuilding_id_item_shipbuilding_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_shipbuilding",
+ "columnsFrom": [
+ "item_shipbuilding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_offshore_top_id_item_offshore_top_id_fk": {
+ "name": "tech_sales_rfq_items_item_offshore_top_id_item_offshore_top_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_offshore_top",
+ "columnsFrom": [
+ "item_offshore_top_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_offshore_hull_id_item_offshore_hull_id_fk": {
+ "name": "tech_sales_rfq_items_item_offshore_hull_id_item_offshore_hull_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_offshore_hull",
+ "columnsFrom": [
+ "item_offshore_hull_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfqs": {
+ "name": "tech_sales_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_project_id": {
+ "name": "bidding_project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_send_date": {
+ "name": "rfq_send_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'RFQ Created'"
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sent_by": {
+ "name": "sent_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'SHIP'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfqs_bidding_project_id_bidding_projects_id_fk": {
+ "name": "tech_sales_rfqs_bidding_project_id_bidding_projects_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "bidding_project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_sent_by_users_id_fk": {
+ "name": "tech_sales_rfqs_sent_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "sent_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_created_by_users_id_fk": {
+ "name": "tech_sales_rfqs_created_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_updated_by_users_id_fk": {
+ "name": "tech_sales_rfqs_updated_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "tech_sales_rfqs_rfq_code_unique": {
+ "name": "tech_sales_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_attachments": {
+ "name": "tech_sales_vendor_quotation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_vendor_quotation_attachments_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotation_attachments_uploaded_by_users_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotation_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_contacts": {
+ "name": "tech_sales_vendor_quotation_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_id": {
+ "name": "contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_revisions": {
+ "name": "tech_sales_vendor_quotation_revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "snapshot": {
+ "name": "snapshot",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_note": {
+ "name": "revision_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revised_by": {
+ "name": "revised_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revised_at": {
+ "name": "revised_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "tech_sales_quotation_revisions_quotation_version_idx": {
+ "name": "tech_sales_quotation_revisions_quotation_version_idx",
+ "columns": [
+ {
+ "expression": "quotation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "tech_sales_vendor_quotation_revisions_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_vendor_quotation_revisions_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_revisions",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotations": {
+ "name": "tech_sales_vendor_quotations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quotation_code": {
+ "name": "quotation_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_version": {
+ "name": "quotation_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_until": {
+ "name": "valid_until",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_flags": {
+ "name": "vendor_flags",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Assigned'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejection_reason": {
+ "name": "rejection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accepted_at": {
+ "name": "accepted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_vendor_quotations_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_vendor_quotations_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_vendor_quotations",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotations_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_vendor_quotations_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_vendor_quotations",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_rotation_attempts": {
+ "name": "ocr_rotation_attempts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rotation": {
+ "name": "rotation",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "confidence": {
+ "name": "confidence",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tables_found": {
+ "name": "tables_found",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "text_quality": {
+ "name": "text_quality",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "keyword_count": {
+ "name": "keyword_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "extracted_rows_count": {
+ "name": "extracted_rows_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ocr_rotation_attempts_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_rotation_attempts_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_rotation_attempts",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_rows": {
+ "name": "ocr_rows",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "table_id": {
+ "name": "table_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "row_index": {
+ "name": "row_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "report_no": {
+ "name": "report_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "inspection_date": {
+ "name": "inspection_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "no": {
+ "name": "no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identification_no": {
+ "name": "identification_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_no": {
+ "name": "tag_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joint_no": {
+ "name": "joint_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joint_type": {
+ "name": "joint_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "welding_date": {
+ "name": "welding_date",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confidence": {
+ "name": "confidence",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source_table": {
+ "name": "source_table",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source_row": {
+ "name": "source_row",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_ocr_report_no_unique": {
+ "name": "idx_ocr_report_no_unique",
+ "columns": [
+ {
+ "expression": "report_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "tag_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "joint_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "joint_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ocr_rows_table_id_ocr_tables_id_fk": {
+ "name": "ocr_rows_table_id_ocr_tables_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "ocr_tables",
+ "columnsFrom": [
+ "table_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ocr_rows_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_rows_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ocr_rows_user_id_users_id_fk": {
+ "name": "ocr_rows_user_id_users_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_sessions": {
+ "name": "ocr_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "processing_time": {
+ "name": "processing_time",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "best_rotation": {
+ "name": "best_rotation",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_tables": {
+ "name": "total_tables",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_rows": {
+ "name": "total_rows",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "image_enhanced": {
+ "name": "image_enhanced",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "pdf_converted": {
+ "name": "pdf_converted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "warnings": {
+ "name": "warnings",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_tables": {
+ "name": "ocr_tables",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "table_index": {
+ "name": "table_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "row_count": {
+ "name": "row_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ocr_tables_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_tables_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_tables",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfq_attachment_revisions": {
+ "name": "b_rfq_attachment_revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_no": {
+ "name": "revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_comment": {
+ "name": "revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest": {
+ "name": "is_latest",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "latest_revision_idx": {
+ "name": "latest_revision_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_latest",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"b_rfq_attachment_revisions\".\"is_latest\" = $1",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "attachment_revision_idx": {
+ "name": "attachment_revision_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "b_rfq_attachment_revisions_attachment_id_b_rfq_attachments_id_fk": {
+ "name": "b_rfq_attachment_revisions_attachment_id_b_rfq_attachments_id_fk",
+ "tableFrom": "b_rfq_attachment_revisions",
+ "tableTo": "b_rfq_attachments",
+ "columnsFrom": [
+ "attachment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "b_rfq_attachment_revisions_created_by_users_id_fk": {
+ "name": "b_rfq_attachment_revisions_created_by_users_id_fk",
+ "tableFrom": "b_rfq_attachment_revisions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfqs": {
+ "name": "b_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "b_rfqs_project_id_projects_id_fk": {
+ "name": "b_rfqs_project_id_projects_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "b_rfqs_created_by_users_id_fk": {
+ "name": "b_rfqs_created_by_users_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "b_rfqs_updated_by_users_id_fk": {
+ "name": "b_rfqs_updated_by_users_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "b_rfqs_rfq_code_unique": {
+ "name": "b_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfq_attachments": {
+ "name": "b_rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Rev.0'"
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "b_rfq_attachments_rfq_id_b_rfqs_id_fk": {
+ "name": "b_rfq_attachments_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "b_rfq_attachments",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "b_rfq_attachments_created_by_users_id_fk": {
+ "name": "b_rfq_attachments_created_by_users_id_fk",
+ "tableFrom": "b_rfq_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.final_rfq": {
+ "name": "final_rfq",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "final_rfq_status": {
+ "name": "final_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'VV'"
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "firsttime_yn": {
+ "name": "firsttime_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_remark": {
+ "name": "vendor_remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "final_rfq_rfq_id_b_rfqs_id_fk": {
+ "name": "final_rfq_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "final_rfq_vendor_id_vendors_id_fk": {
+ "name": "final_rfq_vendor_id_vendors_id_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "final_rfq_incoterms_code_incoterms_code_fk": {
+ "name": "final_rfq_incoterms_code_incoterms_code_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "final_rfq_payment_terms_code_payment_terms_code_fk": {
+ "name": "final_rfq_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.initial_rfq": {
+ "name": "initial_rfq",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "initial_rfq_status": {
+ "name": "initial_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "rfq_revision": {
+ "name": "rfq_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "initial_rfq_rfq_id_b_rfqs_id_fk": {
+ "name": "initial_rfq_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "initial_rfq_vendor_id_vendors_id_fk": {
+ "name": "initial_rfq_vendor_id_vendors_id_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "initial_rfq_incoterms_code_incoterms_code_fk": {
+ "name": "initial_rfq_incoterms_code_incoterms_code_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_attachment_responses": {
+ "name": "vendor_attachment_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'NOT_RESPONDED'"
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'Rev.0'"
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "vendor_response_idx": {
+ "name": "vendor_response_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "rfq_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_attachment_responses_attachment_id_b_rfq_attachments_id_fk": {
+ "name": "vendor_attachment_responses_attachment_id_b_rfq_attachments_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "b_rfq_attachments",
+ "columnsFrom": [
+ "attachment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_vendor_id_vendors_id_fk": {
+ "name": "vendor_attachment_responses_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_created_by_users_id_fk": {
+ "name": "vendor_attachment_responses_created_by_users_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_updated_by_users_id_fk": {
+ "name": "vendor_attachment_responses_updated_by_users_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_attachments_b": {
+ "name": "vendor_response_attachments_b",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_attachments_b_vendor_response_id_vendor_attachment_responses_id_fk": {
+ "name": "vendor_response_attachments_b_vendor_response_id_vendor_attachment_responses_id_fk",
+ "tableFrom": "vendor_response_attachments_b",
+ "tableTo": "vendor_attachment_responses",
+ "columnsFrom": [
+ "vendor_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_b_uploaded_by_users_id_fk": {
+ "name": "vendor_response_attachments_b_uploaded_by_users_id_fk",
+ "tableFrom": "vendor_response_attachments_b",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_history": {
+ "name": "vendor_response_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_status": {
+ "name": "previous_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_by": {
+ "name": "action_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_at": {
+ "name": "action_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_history_vendor_response_id_vendor_attachment_responses_id_fk": {
+ "name": "vendor_response_history_vendor_response_id_vendor_attachment_responses_id_fk",
+ "tableFrom": "vendor_response_history",
+ "tableTo": "vendor_attachment_responses",
+ "columnsFrom": [
+ "vendor_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_history_action_by_users_id_fk": {
+ "name": "vendor_response_history_action_by_users_id_fk",
+ "tableFrom": "vendor_response_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "action_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_attachments": {
+ "name": "tech_vendor_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'GENERAL'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_contacts": {
+ "name": "tech_vendor_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_position": {
+ "name": "contact_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_title": {
+ "name": "contact_title",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_country": {
+ "name": "contact_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_primary": {
+ "name": "is_primary",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_contacts_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_contacts_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_contacts",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_possible_items": {
+ "name": "tech_vendor_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "shipbuilding_item_id": {
+ "name": "shipbuilding_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "offshore_top_item_id": {
+ "name": "offshore_top_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "offshore_hull_item_id": {
+ "name": "offshore_hull_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_possible_items_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_possible_items_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_shipbuilding_item_id_item_shipbuilding_id_fk": {
+ "name": "tech_vendor_possible_items_shipbuilding_item_id_item_shipbuilding_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_shipbuilding",
+ "columnsFrom": [
+ "shipbuilding_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_offshore_top_item_id_item_offshore_top_id_fk": {
+ "name": "tech_vendor_possible_items_offshore_top_item_id_item_offshore_top_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_offshore_top",
+ "columnsFrom": [
+ "offshore_top_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_offshore_hull_item_id_item_offshore_hull_id_fk": {
+ "name": "tech_vendor_possible_items_offshore_hull_item_id_item_offshore_hull_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_offshore_hull",
+ "columnsFrom": [
+ "offshore_hull_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendors": {
+ "name": "tech_vendors",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_eng": {
+ "name": "country_eng",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_fab": {
+ "name": "country_fab",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_name": {
+ "name": "agent_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_phone": {
+ "name": "agent_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_email": {
+ "name": "agent_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tech_vendor_type": {
+ "name": "tech_vendor_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "is_quote_comparison": {
+ "name": "is_quote_comparison",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_answer_options": {
+ "name": "esg_answer_options",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "esg_evaluation_item_id": {
+ "name": "esg_evaluation_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_text": {
+ "name": "answer_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_answer_options_esg_evaluation_item_id_esg_evaluation_items_id_fk": {
+ "name": "esg_answer_options_esg_evaluation_item_id_esg_evaluation_items_id_fk",
+ "tableFrom": "esg_answer_options",
+ "tableTo": "esg_evaluation_items",
+ "columnsFrom": [
+ "esg_evaluation_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluation_items": {
+ "name": "esg_evaluation_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "esg_evaluation_id": {
+ "name": "esg_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_item": {
+ "name": "evaluation_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_item_description": {
+ "name": "evaluation_item_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_evaluation_items_esg_evaluation_id_esg_evaluations_id_fk": {
+ "name": "esg_evaluation_items_esg_evaluation_id_esg_evaluations_id_fk",
+ "tableFrom": "esg_evaluation_items",
+ "tableTo": "esg_evaluations",
+ "columnsFrom": [
+ "esg_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluation_responses": {
+ "name": "esg_evaluation_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "esg_evaluation_item_id": {
+ "name": "esg_evaluation_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "esg_answer_option_id": {
+ "name": "esg_answer_option_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selected_score": {
+ "name": "selected_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "additional_comments": {
+ "name": "additional_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_evaluation_responses_submission_id_evaluation_submissions_id_fk": {
+ "name": "esg_evaluation_responses_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "esg_evaluation_responses_esg_evaluation_item_id_esg_evaluation_items_id_fk": {
+ "name": "esg_evaluation_responses_esg_evaluation_item_id_esg_evaluation_items_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "esg_evaluation_items",
+ "columnsFrom": [
+ "esg_evaluation_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "esg_evaluation_responses_esg_answer_option_id_esg_answer_options_id_fk": {
+ "name": "esg_evaluation_responses_esg_answer_option_id_esg_answer_options_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "esg_answer_options",
+ "columnsFrom": [
+ "esg_answer_option_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluations": {
+ "name": "esg_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "esg_evaluations_serial_number_unique": {
+ "name": "esg_evaluations_serial_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "serial_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_submissions": {
+ "name": "evaluation_submissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_round": {
+ "name": "evaluation_round",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_status": {
+ "name": "submission_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_by": {
+ "name": "reviewed_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "average_esg_score": {
+ "name": "average_esg_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_general_items": {
+ "name": "total_general_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "completed_general_items": {
+ "name": "completed_general_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "total_esg_items": {
+ "name": "total_esg_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "completed_esg_items": {
+ "name": "completed_esg_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_submissions_periodic_evaluation_id_periodic_evaluations_id_fk": {
+ "name": "evaluation_submissions_periodic_evaluation_id_periodic_evaluations_id_fk",
+ "tableFrom": "evaluation_submissions",
+ "tableTo": "periodic_evaluations",
+ "columnsFrom": [
+ "periodic_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_submissions_company_id_vendors_id_fk": {
+ "name": "evaluation_submissions_company_id_vendors_id_fk",
+ "tableFrom": "evaluation_submissions",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "evaluation_submissions_submission_id_unique": {
+ "name": "evaluation_submissions_submission_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "submission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.general_evaluation_responses": {
+ "name": "general_evaluation_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "general_evaluation_id": {
+ "name": "general_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_text": {
+ "name": "response_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_attachments": {
+ "name": "has_attachments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "general_evaluation_responses_submission_id_evaluation_submissions_id_fk": {
+ "name": "general_evaluation_responses_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "general_evaluation_responses",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "general_evaluation_responses_general_evaluation_id_general_evaluations_id_fk": {
+ "name": "general_evaluation_responses_general_evaluation_id_general_evaluations_id_fk",
+ "tableFrom": "general_evaluation_responses",
+ "tableTo": "general_evaluations",
+ "columnsFrom": [
+ "general_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.general_evaluations": {
+ "name": "general_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "general_evaluations_serial_number_unique": {
+ "name": "general_evaluations_serial_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "serial_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_evaluation_attachments": {
+ "name": "vendor_evaluation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "general_evaluation_response_id": {
+ "name": "general_evaluation_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stored_file_name": {
+ "name": "stored_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_evaluation_attachments_submission_id_evaluation_submissions_id_fk": {
+ "name": "vendor_evaluation_attachments_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "vendor_evaluation_attachments",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_evaluation_attachments_general_evaluation_response_id_general_evaluation_responses_id_fk": {
+ "name": "vendor_evaluation_attachments_general_evaluation_response_id_general_evaluation_responses_id_fk",
+ "tableFrom": "vendor_evaluation_attachments",
+ "tableTo": "general_evaluation_responses",
+ "columnsFrom": [
+ "general_evaluation_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_evaluation_attachments_file_id_unique": {
+ "name": "vendor_evaluation_attachments_file_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "file_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_target_reviewers": {
+ "name": "evaluation_target_reviewers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name_from": {
+ "name": "department_name_from",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "assigned_by": {
+ "name": "assigned_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_target_reviewers_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "evaluation_target_reviewers_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviewers_reviewer_user_id_users_id_fk": {
+ "name": "evaluation_target_reviewers_reviewer_user_id_users_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "reviewer_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviewers_assigned_by_users_id_fk": {
+ "name": "evaluation_target_reviewers_assigned_by_users_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "assigned_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_target_department": {
+ "name": "unique_target_department",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_target_reviews": {
+ "name": "evaluation_target_reviews",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_approved": {
+ "name": "is_approved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comment": {
+ "name": "review_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_target_reviews_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "evaluation_target_reviews_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "evaluation_target_reviews",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviews_reviewer_user_id_users_id_fk": {
+ "name": "evaluation_target_reviews_reviewer_user_id_users_id_fk",
+ "tableFrom": "evaluation_target_reviews",
+ "tableTo": "users",
+ "columnsFrom": [
+ "reviewer_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_target_reviewer": {
+ "name": "unique_target_reviewer",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "reviewer_user_id",
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_targets": {
+ "name": "evaluation_targets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_user_id": {
+ "name": "admin_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_targets_vendor_id_vendors_id_fk": {
+ "name": "evaluation_targets_vendor_id_vendors_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_targets_admin_user_id_users_id_fk": {
+ "name": "evaluation_targets_admin_user_id_users_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "admin_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_targets_confirmed_by_users_id_fk": {
+ "name": "evaluation_targets_confirmed_by_users_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "confirmed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.periodic_evaluations": {
+ "name": "periodic_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_grade": {
+ "name": "evaluation_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "periodic_evaluations_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "periodic_evaluations_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "periodic_evaluations",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "periodic_evaluations_finalized_by_users_id_fk": {
+ "name": "periodic_evaluations_finalized_by_users_id_fk",
+ "tableFrom": "periodic_evaluations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "finalized_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_evaluation_target": {
+ "name": "unique_evaluation_target",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "evaluation_period"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluation_attachments": {
+ "name": "reviewer_evaluation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reviewer_evaluation_detail_id": {
+ "name": "reviewer_evaluation_detail_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stored_file_name": {
+ "name": "stored_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_path": {
+ "name": "public_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_extension": {
+ "name": "file_extension",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "reviewer_evaluation_detail_id_idx": {
+ "name": "reviewer_evaluation_detail_id_idx",
+ "columns": [
+ {
+ "expression": "reviewer_evaluation_detail_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "reviewer_evaluation_attachments_reviewer_evaluation_detail_id_reviewer_evaluation_details_id_fk": {
+ "name": "reviewer_evaluation_attachments_reviewer_evaluation_detail_id_reviewer_evaluation_details_id_fk",
+ "tableFrom": "reviewer_evaluation_attachments",
+ "tableTo": "reviewer_evaluation_details",
+ "columnsFrom": [
+ "reviewer_evaluation_detail_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluation_attachments_uploaded_by_users_id_fk": {
+ "name": "reviewer_evaluation_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "reviewer_evaluation_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluation_details": {
+ "name": "reviewer_evaluation_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reviewer_evaluation_id": {
+ "name": "reviewer_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reg_eval_criteria_details_id": {
+ "name": "reg_eval_criteria_details_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reviewer_evaluation_details_reviewer_evaluation_id_reviewer_evaluations_id_fk": {
+ "name": "reviewer_evaluation_details_reviewer_evaluation_id_reviewer_evaluations_id_fk",
+ "tableFrom": "reviewer_evaluation_details",
+ "tableTo": "reviewer_evaluations",
+ "columnsFrom": [
+ "reviewer_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluation_details_reg_eval_criteria_details_id_reg_eval_criteria_details_id_fk": {
+ "name": "reviewer_evaluation_details_reg_eval_criteria_details_id_reg_eval_criteria_details_id_fk",
+ "tableFrom": "reviewer_evaluation_details",
+ "tableTo": "reg_eval_criteria_details",
+ "columnsFrom": [
+ "reg_eval_criteria_details_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_reviewer_criteria": {
+ "name": "unique_reviewer_criteria",
+ "nullsNotDistinct": false,
+ "columns": [
+ "reviewer_evaluation_id",
+ "reg_eval_criteria_details_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluations": {
+ "name": "reviewer_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_target_reviewer_id": {
+ "name": "evaluation_target_reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_completed": {
+ "name": "is_completed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reviewer_evaluations_periodic_evaluation_id_periodic_evaluations_id_fk": {
+ "name": "reviewer_evaluations_periodic_evaluation_id_periodic_evaluations_id_fk",
+ "tableFrom": "reviewer_evaluations",
+ "tableTo": "periodic_evaluations",
+ "columnsFrom": [
+ "periodic_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluations_evaluation_target_reviewer_id_evaluation_target_reviewers_id_fk": {
+ "name": "reviewer_evaluations_evaluation_target_reviewer_id_evaluation_target_reviewers_id_fk",
+ "tableFrom": "reviewer_evaluations",
+ "tableTo": "evaluation_target_reviewers",
+ "columnsFrom": [
+ "evaluation_target_reviewer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_reviewer_evaluation": {
+ "name": "unique_reviewer_evaluation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "periodic_evaluation_id",
+ "evaluation_target_reviewer_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reg_eval_criteria": {
+ "name": "reg_eval_criteria",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "category2": {
+ "name": "category2",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'processScore'"
+ },
+ "item": {
+ "name": "item",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "range": {
+ "name": "range",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_score_min ": {
+ "name": "variable_score_min ",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_score_max ": {
+ "name": "variable_score_max ",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_score_unit ": {
+ "name": "variable_score_unit ",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_type": {
+ "name": "score_type",
+ "type": "score_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'fixed'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reg_eval_criteria_created_by_users_id_fk": {
+ "name": "reg_eval_criteria_created_by_users_id_fk",
+ "tableFrom": "reg_eval_criteria",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "reg_eval_criteria_updated_by_users_id_fk": {
+ "name": "reg_eval_criteria_updated_by_users_id_fk",
+ "tableFrom": "reg_eval_criteria",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reg_eval_criteria_details": {
+ "name": "reg_eval_criteria_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score_equip_ship": {
+ "name": "score_equip_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_equip_marine": {
+ "name": "score_equip_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_ship": {
+ "name": "score_bulk_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_marine": {
+ "name": "score_bulk_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reg_eval_criteria_details_criteria_id_reg_eval_criteria_id_fk": {
+ "name": "reg_eval_criteria_details_criteria_id_reg_eval_criteria_id_fk",
+ "tableFrom": "reg_eval_criteria_details",
+ "tableTo": "reg_eval_criteria",
+ "columnsFrom": [
+ "criteria_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_gtc_files": {
+ "name": "project_gtc_files",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_gtc_files_project_id_projects_id_fk": {
+ "name": "project_gtc_files_project_id_projects_id_fk",
+ "tableFrom": "project_gtc_files",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.menu_assignments": {
+ "name": "menu_assignments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "menu_assignments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "menu_path": {
+ "name": "menu_path",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "menu_title": {
+ "name": "menu_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "menu_description": {
+ "name": "menu_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "menu_group": {
+ "name": "menu_group",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "section_title": {
+ "name": "section_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'evcp'"
+ },
+ "manager1_id": {
+ "name": "manager1_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager2_id": {
+ "name": "manager2_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "menu_assignments_path_idx": {
+ "name": "menu_assignments_path_idx",
+ "columns": [
+ {
+ "expression": "menu_path",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_manager1_idx": {
+ "name": "menu_assignments_manager1_idx",
+ "columns": [
+ {
+ "expression": "manager1_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_manager2_idx": {
+ "name": "menu_assignments_manager2_idx",
+ "columns": [
+ {
+ "expression": "manager2_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_domain_idx": {
+ "name": "menu_assignments_domain_idx",
+ "columns": [
+ {
+ "expression": "domain",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "menu_assignments_manager1_id_users_id_fk": {
+ "name": "menu_assignments_manager1_id_users_id_fk",
+ "tableFrom": "menu_assignments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "manager1_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "menu_assignments_manager2_id_users_id_fk": {
+ "name": "menu_assignments_manager2_id_users_id_fk",
+ "tableFrom": "menu_assignments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "manager2_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "menu_assignments_menu_path_unique": {
+ "name": "menu_assignments_menu_path_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "menu_path"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.page_information": {
+ "name": "page_information",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "page_path": {
+ "name": "page_path",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "page_name": {
+ "name": "page_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "information_content": {
+ "name": "information_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_file_name": {
+ "name": "attachment_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_file_path": {
+ "name": "attachment_file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_file_size": {
+ "name": "attachment_file_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "page_information_page_path_unique": {
+ "name": "page_information_page_path_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "page_path"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna": {
+ "name": "qna",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "qna_category",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_qna_author": {
+ "name": "idx_qna_author",
+ "columns": [
+ {
+ "expression": "author",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_author_users_id_fk": {
+ "name": "qna_author_users_id_fk",
+ "tableFrom": "qna",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna_answer": {
+ "name": "qna_answer",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "qna_id": {
+ "name": "qna_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_answer_qna": {
+ "name": "idx_answer_qna",
+ "columns": [
+ {
+ "expression": "qna_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_answer_author": {
+ "name": "idx_answer_author",
+ "columns": [
+ {
+ "expression": "author",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_answer_qna_id_qna_id_fk": {
+ "name": "qna_answer_qna_id_qna_id_fk",
+ "tableFrom": "qna_answer",
+ "tableTo": "qna",
+ "columnsFrom": [
+ "qna_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "qna_answer_author_users_id_fk": {
+ "name": "qna_answer_author_users_id_fk",
+ "tableFrom": "qna_answer",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna_comments": {
+ "name": "qna_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_id": {
+ "name": "answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_comment_answer": {
+ "name": "idx_comment_answer",
+ "columns": [
+ {
+ "expression": "answer_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_comment_parent": {
+ "name": "idx_comment_parent",
+ "columns": [
+ {
+ "expression": "parent_comment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_comments_author_users_id_fk": {
+ "name": "qna_comments_author_users_id_fk",
+ "tableFrom": "qna_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "qna_comments_answer_id_qna_answer_id_fk": {
+ "name": "qna_comments_answer_id_qna_answer_id_fk",
+ "tableFrom": "qna_comments",
+ "tableTo": "qna_answer",
+ "columnsFrom": [
+ "answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notice": {
+ "name": "notice",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "page_path": {
+ "name": "page_path",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author_id": {
+ "name": "author_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notice_author_id_users_id_fk": {
+ "name": "notice_author_id_users_id_fk",
+ "tableFrom": "notice",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.daily_access_stats": {
+ "name": "daily_access_stats",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "date": {
+ "name": "date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_visits": {
+ "name": "total_visits",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "unique_users": {
+ "name": "unique_users",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_sessions": {
+ "name": "total_sessions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "avg_session_duration": {
+ "name": "avg_session_duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_download_logs": {
+ "name": "file_download_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_email": {
+ "name": "user_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_name": {
+ "name": "user_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_role": {
+ "name": "user_role",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_ip": {
+ "name": "user_ip",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "downloaded_at": {
+ "name": "downloaded_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_id": {
+ "name": "request_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "referer": {
+ "name": "referer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "download_duration_ms": {
+ "name": "download_duration_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.login_sessions": {
+ "name": "login_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "login_at": {
+ "name": "login_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "logout_at": {
+ "name": "logout_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_token": {
+ "name": "session_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "nextauth_session_id": {
+ "name": "nextauth_session_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_method": {
+ "name": "auth_method",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "last_activity_at": {
+ "name": "last_activity_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "session_expired_at": {
+ "name": "session_expired_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "login_sessions_user_id_users_id_fk": {
+ "name": "login_sessions_user_id_users_id_fk",
+ "tableFrom": "login_sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "login_sessions_session_token_unique": {
+ "name": "login_sessions_session_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "session_token"
+ ]
+ },
+ "login_sessions_nextauth_session_id_unique": {
+ "name": "login_sessions_nextauth_session_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "nextauth_session_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.page_visits": {
+ "name": "page_visits",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "route": {
+ "name": "route",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "page_title": {
+ "name": "page_title",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "referrer": {
+ "name": "referrer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "visited_at": {
+ "name": "visited_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "query_params": {
+ "name": "query_params",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "browser_name": {
+ "name": "browser_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "os_name": {
+ "name": "os_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "page_visits_user_id_users_id_fk": {
+ "name": "page_visits_user_id_users_id_fk",
+ "tableFrom": "page_visits",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "page_visits_session_id_login_sessions_id_fk": {
+ "name": "page_visits_session_id_login_sessions_id_fk",
+ "tableFrom": "page_visits",
+ "tableTo": "login_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.temp_auth_sessions": {
+ "name": "temp_auth_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "temp_auth_key": {
+ "name": "temp_auth_key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_method": {
+ "name": "auth_method",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_used": {
+ "name": "is_used",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "temp_auth_sessions_user_id_users_id_fk": {
+ "name": "temp_auth_sessions_user_id_users_id_fk",
+ "tableFrom": "temp_auth_sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "temp_auth_sessions_temp_auth_key_unique": {
+ "name": "temp_auth_sessions_temp_auth_key_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "temp_auth_key"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_download_stats": {
+ "name": "user_download_stats",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "date": {
+ "name": "date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_downloads": {
+ "name": "total_downloads",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_bytes": {
+ "name": "total_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "unique_files": {
+ "name": "unique_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_download_at": {
+ "name": "last_download_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notifications": {
+ "name": "notifications",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "related_record_id": {
+ "name": "related_record_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "related_record_type": {
+ "name": "related_record_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "read_at": {
+ "name": "read_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_notifications_user_id": {
+ "name": "idx_notifications_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_created_at": {
+ "name": "idx_notifications_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_is_read": {
+ "name": "idx_notifications_is_read",
+ "columns": [
+ {
+ "expression": "is_read",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_user_read": {
+ "name": "idx_notifications_user_read",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_read",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_history": {
+ "name": "template_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_description": {
+ "name": "change_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_by": {
+ "name": "changed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_history_template_id_templates_id_fk": {
+ "name": "template_history_template_id_templates_id_fk",
+ "tableFrom": "template_history",
+ "tableTo": "templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "template_history_changed_by_users_id_fk": {
+ "name": "template_history_changed_by_users_id_fk",
+ "tableFrom": "template_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "changed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_variables": {
+ "name": "template_variables",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_name": {
+ "name": "variable_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_type": {
+ "name": "variable_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "default_value": {
+ "name": "default_value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validation_rule": {
+ "name": "validation_rule",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_variables_template_id_templates_id_fk": {
+ "name": "template_variables_template_id_templates_id_fk",
+ "tableFrom": "template_variables",
+ "tableTo": "templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.templates": {
+ "name": "templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sample_data": {
+ "name": "sample_data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{}'::jsonb"
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "templates_created_by_users_id_fk": {
+ "name": "templates_created_by_users_id_fk",
+ "tableFrom": "templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "templates_slug_unique": {
+ "name": "templates_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_clauses": {
+ "name": "gtc_clauses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_clauses_document_item_number_idx": {
+ "name": "gtc_clauses_document_item_number_idx",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "item_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_document_idx": {
+ "name": "gtc_clauses_document_idx",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_parent_idx": {
+ "name": "gtc_clauses_parent_idx",
+ "columns": [
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_full_path_idx": {
+ "name": "gtc_clauses_full_path_idx",
+ "columns": [
+ {
+ "expression": "full_path",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_clauses_document_id_gtc_documents_id_fk": {
+ "name": "gtc_clauses_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_clauses_created_by_id_users_id_fk": {
+ "name": "gtc_clauses_created_by_id_users_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_clauses_updated_by_id_users_id_fk": {
+ "name": "gtc_clauses_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_documents": {
+ "name": "gtc_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {
+ "gtc_project_revision_idx": {
+ "name": "gtc_project_revision_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_type_idx": {
+ "name": "gtc_type_idx",
+ "columns": [
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_project_idx": {
+ "name": "gtc_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_created_at_idx": {
+ "name": "gtc_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_updated_at_idx": {
+ "name": "gtc_updated_at_idx",
+ "columns": [
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_documents_project_id_projects_id_fk": {
+ "name": "gtc_documents_project_id_projects_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_documents_created_by_id_users_id_fk": {
+ "name": "gtc_documents_created_by_id_users_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_documents_updated_by_id_users_id_fk": {
+ "name": "gtc_documents_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_negotiation_history": {
+ "name": "gtc_negotiation_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_clause_id": {
+ "name": "vendor_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_status": {
+ "name": "previous_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_fields": {
+ "name": "changed_fields",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachments": {
+ "name": "attachments",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_type": {
+ "name": "actor_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "actor_id": {
+ "name": "actor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_name": {
+ "name": "actor_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_email": {
+ "name": "actor_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "gtc_negotiation_history_vendor_clause_idx": {
+ "name": "gtc_negotiation_history_vendor_clause_idx",
+ "columns": [
+ {
+ "expression": "vendor_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_negotiation_history_action_idx": {
+ "name": "gtc_negotiation_history_action_idx",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_negotiation_history_created_at_idx": {
+ "name": "gtc_negotiation_history_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_negotiation_history_vendor_clause_id_gtc_vendor_clauses_id_fk": {
+ "name": "gtc_negotiation_history_vendor_clause_id_gtc_vendor_clauses_id_fk",
+ "tableFrom": "gtc_negotiation_history",
+ "tableTo": "gtc_vendor_clauses",
+ "columnsFrom": [
+ "vendor_clause_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_negotiation_history_actor_id_users_id_fk": {
+ "name": "gtc_negotiation_history_actor_id_users_id_fk",
+ "tableFrom": "gtc_negotiation_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "actor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_templates": {
+ "name": "gtc_templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'1.0'"
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_metadata": {
+ "name": "variable_metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_templates_name_idx": {
+ "name": "gtc_templates_name_idx",
+ "columns": [
+ {
+ "expression": "name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_templates_is_default_idx": {
+ "name": "gtc_templates_is_default_idx",
+ "columns": [
+ {
+ "expression": "is_default",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_templates_document_id_gtc_documents_id_fk": {
+ "name": "gtc_templates_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_templates_created_by_id_users_id_fk": {
+ "name": "gtc_templates_created_by_id_users_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_templates_updated_by_id_users_id_fk": {
+ "name": "gtc_templates_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_vendor_clauses": {
+ "name": "gtc_vendor_clauses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_document_id": {
+ "name": "vendor_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_clause_id": {
+ "name": "base_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_item_number": {
+ "name": "modified_item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_category": {
+ "name": "modified_category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_subtitle": {
+ "name": "modified_subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_content": {
+ "name": "modified_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_number_modified": {
+ "name": "is_number_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_category_modified": {
+ "name": "is_category_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_subtitle_modified": {
+ "name": "is_subtitle_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_content_modified": {
+ "name": "is_content_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_note": {
+ "name": "negotiation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_excluded": {
+ "name": "is_excluded",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_vendor_clauses_vendor_base_idx": {
+ "name": "gtc_vendor_clauses_vendor_base_idx",
+ "columns": [
+ {
+ "expression": "vendor_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "base_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_vendor_document_idx": {
+ "name": "gtc_vendor_clauses_vendor_document_idx",
+ "columns": [
+ {
+ "expression": "vendor_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_base_clause_idx": {
+ "name": "gtc_vendor_clauses_base_clause_idx",
+ "columns": [
+ {
+ "expression": "base_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_parent_idx": {
+ "name": "gtc_vendor_clauses_parent_idx",
+ "columns": [
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_review_status_idx": {
+ "name": "gtc_vendor_clauses_review_status_idx",
+ "columns": [
+ {
+ "expression": "review_status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_vendor_clauses_vendor_document_id_gtc_vendor_documents_id_fk": {
+ "name": "gtc_vendor_clauses_vendor_document_id_gtc_vendor_documents_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "gtc_vendor_documents",
+ "columnsFrom": [
+ "vendor_document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_base_clause_id_gtc_clauses_id_fk": {
+ "name": "gtc_vendor_clauses_base_clause_id_gtc_clauses_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "gtc_clauses",
+ "columnsFrom": [
+ "base_clause_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_created_by_id_users_id_fk": {
+ "name": "gtc_vendor_clauses_created_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_updated_by_id_users_id_fk": {
+ "name": "gtc_vendor_clauses_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_vendor_documents": {
+ "name": "gtc_vendor_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "base_document_id": {
+ "name": "base_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'1.0'"
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_start_date": {
+ "name": "negotiation_start_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "negotiation_end_date": {
+ "name": "negotiation_end_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_date": {
+ "name": "approval_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_name": {
+ "name": "final_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_path": {
+ "name": "final_file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_size": {
+ "name": "final_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_vendor_documents_base_vendor_idx": {
+ "name": "gtc_vendor_documents_base_vendor_idx",
+ "columns": [
+ {
+ "expression": "base_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_vendor_idx": {
+ "name": "gtc_vendor_documents_vendor_idx",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_base_document_idx": {
+ "name": "gtc_vendor_documents_base_document_idx",
+ "columns": [
+ {
+ "expression": "base_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_review_status_idx": {
+ "name": "gtc_vendor_documents_review_status_idx",
+ "columns": [
+ {
+ "expression": "review_status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_vendor_documents_base_document_id_gtc_documents_id_fk": {
+ "name": "gtc_vendor_documents_base_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "base_document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_vendor_id_vendors_id_fk": {
+ "name": "gtc_vendor_documents_vendor_id_vendors_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_created_by_id_users_id_fk": {
+ "name": "gtc_vendor_documents_created_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_updated_by_id_users_id_fk": {
+ "name": "gtc_vendor_documents_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.code_groups": {
+ "name": "code_groups",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_format": {
+ "name": "code_format",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expressions": {
+ "name": "expressions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "control_type": {
+ "name": "control_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "code_groups_project_id_projects_id_fk": {
+ "name": "code_groups_project_id_projects_id_fk",
+ "tableFrom": "code_groups",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_group_id": {
+ "name": "unique_project_group_id",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.combo_box_settings": {
+ "name": "combo_box_settings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "combo_box_settings_code_group_id_code_groups_id_fk": {
+ "name": "combo_box_settings_code_group_id_code_groups_id_fk",
+ "tableFrom": "combo_box_settings",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_code_group_code": {
+ "name": "unique_code_group_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code_group_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_class_options_new": {
+ "name": "document_class_options_new",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_class_id": {
+ "name": "document_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "option_code": {
+ "name": "option_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_class_options_new_document_class_id_document_classes_id_fk": {
+ "name": "document_class_options_new_document_class_id_document_classes_id_fk",
+ "tableFrom": "document_class_options_new",
+ "tableTo": "document_classes",
+ "columnsFrom": [
+ "document_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_document_class_option": {
+ "name": "unique_document_class_option",
+ "nullsNotDistinct": false,
+ "columns": [
+ "document_class_id",
+ "option_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_classes": {
+ "name": "document_classes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_classes_project_id_projects_id_fk": {
+ "name": "document_classes_project_id_projects_id_fk",
+ "tableFrom": "document_classes",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "document_classes_code_group_id_code_groups_id_fk": {
+ "name": "document_classes_code_group_id_code_groups_id_fk",
+ "tableFrom": "document_classes",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_code": {
+ "name": "unique_project_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "code"
+ ]
+ },
+ "unique_project_value": {
+ "name": "unique_project_value",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "value"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_number_type_configs": {
+ "name": "document_number_type_configs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_number_type_id": {
+ "name": "document_number_type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sdq": {
+ "name": "sdq",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_number_type_configs_document_number_type_id_document_number_types_id_fk": {
+ "name": "document_number_type_configs_document_number_type_id_document_number_types_id_fk",
+ "tableFrom": "document_number_type_configs",
+ "tableTo": "document_number_types",
+ "columnsFrom": [
+ "document_number_type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "document_number_type_configs_code_group_id_code_groups_id_fk": {
+ "name": "document_number_type_configs_code_group_id_code_groups_id_fk",
+ "tableFrom": "document_number_type_configs",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_document_number_type_sdq": {
+ "name": "unique_document_number_type_sdq",
+ "nullsNotDistinct": false,
+ "columns": [
+ "document_number_type_id",
+ "sdq"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_number_types": {
+ "name": "document_number_types",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_number_types_project_id_projects_id_fk": {
+ "name": "document_number_types_project_id_projects_id_fk",
+ "tableFrom": "document_number_types",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_name": {
+ "name": "unique_project_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_attachments": {
+ "name": "legal_work_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_auto_generated": {
+ "name": "is_auto_generated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'request'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_attachments_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_attachments_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_attachments",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_requests": {
+ "name": "legal_work_requests",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_department": {
+ "name": "review_department",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inquiry_type": {
+ "name": "inquiry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "request_content": {
+ "name": "request_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "contract_project_name": {
+ "name": "contract_project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_amount": {
+ "name": "contract_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_counterparty": {
+ "name": "contract_counterparty",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "counterparty_type": {
+ "name": "counterparty_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "factual_relation": {
+ "name": "factual_relation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_number": {
+ "name": "project_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipowner_orderer": {
+ "name": "shipowner_orderer",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "governing_law": {
+ "name": "governing_law",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_type": {
+ "name": "project_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_requests_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_requests_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_requests",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_responses": {
+ "name": "legal_work_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_content": {
+ "name": "response_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_reviewer": {
+ "name": "response_reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_confirmer": {
+ "name": "response_confirmer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_approver": {
+ "name": "response_approver",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_re_revision": {
+ "name": "is_re_revision",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "parent_response_id": {
+ "name": "parent_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_responses_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_responses_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_responses",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_works": {
+ "name": "legal_works",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_urgent": {
+ "name": "is_urgent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "request_date": {
+ "name": "request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consultation_date": {
+ "name": "consultation_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expected_answer_date": {
+ "name": "expected_answer_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_completion_date": {
+ "name": "legal_completion_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer": {
+ "name": "reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_responder": {
+ "name": "legal_responder",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachment": {
+ "name": "has_attachment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_works_company_id_vendors_id_fk": {
+ "name": "legal_works_company_id_vendors_id_fk",
+ "tableFrom": "legal_works",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.consent_logs": {
+ "name": "consent_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "consent_logs_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_type": {
+ "name": "consent_type",
+ "type": "consent_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "consent_action",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "policy_version": {
+ "name": "policy_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_timestamp": {
+ "name": "action_timestamp",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "additional_data": {
+ "name": "additional_data",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "consent_logs_user_action_timestamp_idx": {
+ "name": "consent_logs_user_action_timestamp_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "action_timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "consent_logs_consent_type_idx": {
+ "name": "consent_logs_consent_type_idx",
+ "columns": [
+ {
+ "expression": "consent_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "consent_logs_action_idx": {
+ "name": "consent_logs_action_idx",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "consent_logs_user_id_users_id_fk": {
+ "name": "consent_logs_user_id_users_id_fk",
+ "tableFrom": "consent_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.policy_versions": {
+ "name": "policy_versions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "policy_versions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "policy_type": {
+ "name": "policy_type",
+ "type": "policy_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "effective_date": {
+ "name": "effective_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_current": {
+ "name": "is_current",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "policy_versions_type_version_idx": {
+ "name": "policy_versions_type_version_idx",
+ "columns": [
+ {
+ "expression": "policy_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "policy_versions_current_idx": {
+ "name": "policy_versions_current_idx",
+ "columns": [
+ {
+ "expression": "is_current",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "policy_versions_effective_date_idx": {
+ "name": "policy_versions_effective_date_idx",
+ "columns": [
+ {
+ "expression": "effective_date",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_consents": {
+ "name": "user_consents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_consents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_type": {
+ "name": "consent_type",
+ "type": "consent_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_status": {
+ "name": "consent_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "policy_version": {
+ "name": "policy_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consented_at": {
+ "name": "consented_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revoke_reason": {
+ "name": "revoke_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "user_consents_user_type_idx": {
+ "name": "user_consents_user_type_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "consent_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_consents_consented_at_idx": {
+ "name": "user_consents_consented_at_idx",
+ "columns": [
+ {
+ "expression": "consented_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_consents_policy_version_idx": {
+ "name": "user_consents_policy_version_idx",
+ "columns": [
+ {
+ "expression": "policy_version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_consents_user_id_users_id_fk": {
+ "name": "user_consents_user_id_users_id_fk",
+ "tableFrom": "user_consents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_companies": {
+ "name": "bidding_companies",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "invitation_status": {
+ "name": "invitation_status",
+ "type": "invitation_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "invited_at": {
+ "name": "invited_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_amount": {
+ "name": "pre_quote_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_submitted_at": {
+ "name": "pre_quote_submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote_selected": {
+ "name": "is_pre_quote_selected",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "final_quote_amount": {
+ "name": "final_quote_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_quote_submitted_at": {
+ "name": "final_quote_submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_winner": {
+ "name": "is_winner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_companies_bidding_id_biddings_id_fk": {
+ "name": "bidding_companies_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_companies",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_companies_company_id_vendors_id_fk": {
+ "name": "bidding_companies_company_id_vendors_id_fk",
+ "tableFrom": "bidding_companies",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_conditions": {
+ "name": "bidding_conditions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_conditions": {
+ "name": "tax_conditions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_delivery_date": {
+ "name": "contract_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_price_adjustment_applicable": {
+ "name": "is_price_adjustment_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_port": {
+ "name": "shipping_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destination_port": {
+ "name": "destination_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spare_part_options": {
+ "name": "spare_part_options",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_conditions_bidding_id_biddings_id_fk": {
+ "name": "bidding_conditions_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_conditions",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_documents": {
+ "name": "bidding_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "specification_meeting_id": {
+ "name": "specification_meeting_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "document_type": {
+ "name": "document_type",
+ "type": "document_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_documents_bidding_id_biddings_id_fk": {
+ "name": "bidding_documents_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_company_id_vendors_id_fk": {
+ "name": "bidding_documents_company_id_vendors_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_pr_item_id_pr_items_for_bidding_id_fk": {
+ "name": "bidding_documents_pr_item_id_pr_items_for_bidding_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "pr_items_for_bidding",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_specification_meeting_id_specification_meetings_id_fk": {
+ "name": "bidding_documents_specification_meeting_id_specification_meetings_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "specification_meetings",
+ "columnsFrom": [
+ "specification_meeting_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_notice_template": {
+ "name": "bidding_notice_template",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'standard'"
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'표준 입찰공고문'"
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.biddings": {
+ "name": "biddings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_number": {
+ "name": "bidding_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "contract_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bidding_type": {
+ "name": "bidding_type",
+ "type": "bidding_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "award_count": {
+ "name": "award_count",
+ "type": "award_count",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'single'"
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_date": {
+ "name": "pre_quote_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_registration_date": {
+ "name": "bidding_registration_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_start_date": {
+ "name": "submission_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_end_date": {
+ "name": "submission_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_date": {
+ "name": "evaluation_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_specification_meeting": {
+ "name": "has_specification_meeting",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "budget": {
+ "name": "budget",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_price": {
+ "name": "target_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_bid_price": {
+ "name": "final_bid_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_pr_document": {
+ "name": "has_pr_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "status": {
+ "name": "status",
+ "type": "bidding_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bidding_generated'"
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_email": {
+ "name": "manager_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_phone": {
+ "name": "manager_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "biddings_project_id_projects_id_fk": {
+ "name": "biddings_project_id_projects_id_fk",
+ "tableFrom": "biddings",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "biddings_bidding_number_unique": {
+ "name": "biddings_bidding_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "bidding_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_condition_responses": {
+ "name": "company_condition_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_company_id": {
+ "name": "bidding_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms_response": {
+ "name": "payment_terms_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_conditions_response": {
+ "name": "tax_conditions_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_contract_delivery_date": {
+ "name": "proposed_contract_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "price_adjustment_response": {
+ "name": "price_adjustment_response",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_response": {
+ "name": "incoterms_response",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_shipping_port": {
+ "name": "proposed_shipping_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_destination_port": {
+ "name": "proposed_destination_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spare_part_response": {
+ "name": "spare_part_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "additional_proposals": {
+ "name": "additional_proposals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote": {
+ "name": "is_pre_quote",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "company_condition_responses_bidding_company_id_bidding_companies_id_fk": {
+ "name": "company_condition_responses_bidding_company_id_bidding_companies_id_fk",
+ "tableFrom": "company_condition_responses",
+ "tableTo": "bidding_companies",
+ "columnsFrom": [
+ "bidding_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_pr_item_bids": {
+ "name": "company_pr_item_bids",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_company_id": {
+ "name": "bidding_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "proposed_delivery_date": {
+ "name": "proposed_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_unit_price": {
+ "name": "bid_unit_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_amount": {
+ "name": "bid_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "technical_specification": {
+ "name": "technical_specification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote": {
+ "name": "is_pre_quote",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "company_pr_item_bids_bidding_company_id_bidding_companies_id_fk": {
+ "name": "company_pr_item_bids_bidding_company_id_bidding_companies_id_fk",
+ "tableFrom": "company_pr_item_bids",
+ "tableTo": "bidding_companies",
+ "columnsFrom": [
+ "bidding_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "company_pr_item_bids_pr_item_id_pr_items_for_bidding_id_fk": {
+ "name": "company_pr_item_bids_pr_item_id_pr_items_for_bidding_id_fk",
+ "tableFrom": "company_pr_item_bids",
+ "tableTo": "pr_items_for_bidding",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_documents": {
+ "name": "pr_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "document_name": {
+ "name": "document_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "registered_by": {
+ "name": "registered_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_documents_bidding_id_biddings_id_fk": {
+ "name": "pr_documents_bidding_id_biddings_id_fk",
+ "tableFrom": "pr_documents",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_items_for_bidding": {
+ "name": "pr_items_for_bidding",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_info": {
+ "name": "project_info",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_info": {
+ "name": "item_info",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi": {
+ "name": "shi",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_delivery_date": {
+ "name": "requested_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "annual_unit_price": {
+ "name": "annual_unit_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity_unit": {
+ "name": "quantity_unit",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_weight": {
+ "name": "total_weight",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "weight_unit": {
+ "name": "weight_unit",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_spec_document": {
+ "name": "has_spec_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_items_for_bidding_bidding_id_biddings_id_fk": {
+ "name": "pr_items_for_bidding_bidding_id_biddings_id_fk",
+ "tableFrom": "pr_items_for_bidding",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.specification_meetings": {
+ "name": "specification_meetings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "meeting_date": {
+ "name": "meeting_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "meeting_time": {
+ "name": "meeting_time",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "location": {
+ "name": "location",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agenda": {
+ "name": "agenda",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "materials": {
+ "name": "materials",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "specification_meetings_bidding_id_biddings_id_fk": {
+ "name": "specification_meetings_bidding_id_biddings_id_fk",
+ "tableFrom": "specification_meetings",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_selection_results": {
+ "name": "vendor_selection_results",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selected_company_id": {
+ "name": "selected_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selection_reason": {
+ "name": "selection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_summary": {
+ "name": "evaluation_summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_result_documents": {
+ "name": "has_result_documents",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "selected_at": {
+ "name": "selected_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "selected_by": {
+ "name": "selected_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_selection_results_bidding_id_biddings_id_fk": {
+ "name": "vendor_selection_results_bidding_id_biddings_id_fk",
+ "tableFrom": "vendor_selection_results",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_selection_results_selected_company_id_vendors_id_fk": {
+ "name": "vendor_selection_results_selected_company_id_vendors_id_fk",
+ "tableFrom": "vendor_selection_results",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "selected_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_additional_info": {
+ "name": "vendor_additional_info",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "business_type": {
+ "name": "business_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "industry_type": {
+ "name": "industry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_size": {
+ "name": "company_size",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revenue": {
+ "name": "revenue",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "factory_established_date": {
+ "name": "factory_established_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_contract_terms": {
+ "name": "preferred_contract_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_additional_info_vendor_id_vendors_id_fk": {
+ "name": "vendor_additional_info_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_additional_info",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_business_contacts": {
+ "name": "vendor_business_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_type": {
+ "name": "contact_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "position": {
+ "name": "position",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department": {
+ "name": "department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "responsibility": {
+ "name": "responsibility",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_business_contacts_vendor_id_vendors_id_fk": {
+ "name": "vendor_business_contacts_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_business_contacts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_regular_registrations": {
+ "name": "vendor_regular_registrations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'audit_pass'"
+ },
+ "potential_code": {
+ "name": "potential_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_items": {
+ "name": "major_items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registration_request_date": {
+ "name": "registration_request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_department": {
+ "name": "assigned_department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_department_code": {
+ "name": "assigned_department_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_user": {
+ "name": "assigned_user",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_user_code": {
+ "name": "assigned_user_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_regular_registrations_vendor_id_vendors_id_fk": {
+ "name": "vendor_regular_registrations_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_regular_registrations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_assignment_history": {
+ "name": "department_domain_assignment_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_assignment_history_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "assignment_id": {
+ "name": "assignment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_values": {
+ "name": "previous_values",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_values": {
+ "name": "new_values",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_by": {
+ "name": "changed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_assignments": {
+ "name": "department_domain_assignments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_assignments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_domain": {
+ "name": "assigned_domain",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_mappings": {
+ "name": "department_domain_mappings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_mappings_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "assignment_id": {
+ "name": "assignment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_company_code": {
+ "name": "old_company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_department_code": {
+ "name": "old_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_department_name": {
+ "name": "old_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_company_code": {
+ "name": "new_company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_department_code": {
+ "name": "new_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_department_name": {
+ "name": "new_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mapping_status": {
+ "name": "mapping_status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "mapped_by": {
+ "name": "mapped_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mapped_at": {
+ "name": "mapped_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER": {
+ "name": "CUSTOMER_MASTER_BP_HEADER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_HEADER_unique": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_HEADER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "BP_HEADER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRNO": {
+ "name": "ADDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SMTP_ADDR": {
+ "name": "SMTP_ADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "FAX_EXTENS": {
+ "name": "FAX_EXTENS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_NUMBER": {
+ "name": "FAX_NUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CITY1": {
+ "name": "CITY1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY2": {
+ "name": "CITY2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOUSE_NUM1": {
+ "name": "HOUSE_NUM1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANGU": {
+ "name": "LANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME1": {
+ "name": "NAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME2": {
+ "name": "NAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME3": {
+ "name": "NAME3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME4": {
+ "name": "NAME4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NATION": {
+ "name": "NATION",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POST_CODE1": {
+ "name": "POST_CODE1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POST_CODE2": {
+ "name": "POST_CODE2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PO_BOX": {
+ "name": "PO_BOX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGION": {
+ "name": "REGION",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SORT1": {
+ "name": "SORT1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SORT2": {
+ "name": "SORT2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STREET": {
+ "name": "STREET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAXJURCODE": {
+ "name": "TAXJURCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TIME_ZONE": {
+ "name": "TIME_ZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TITLE": {
+ "name": "TITLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANSPZONE": {
+ "name": "TRANSPZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "R3_USER": {
+ "name": "R3_USER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_EXTENS": {
+ "name": "TEL_EXTENS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_NUMBER": {
+ "name": "TEL_NUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URI_ADDR": {
+ "name": "URI_ADDR",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANRED": {
+ "name": "ANRED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUFSD": {
+ "name": "AUFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAKSD": {
+ "name": "FAKSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GFORM": {
+ "name": "GFORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JMJAH": {
+ "name": "JMJAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JMZAH": {
+ "name": "JMZAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFREPRE": {
+ "name": "J_1KFREPRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFTBUS": {
+ "name": "J_1KFTBUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFTIND": {
+ "name": "J_1KFTIND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KATR1": {
+ "name": "KATR1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KDKG1": {
+ "name": "KDKG1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTOKD": {
+ "name": "KTOKD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KUNNR": {
+ "name": "KUNNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LIFNR": {
+ "name": "LIFNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LIFSD": {
+ "name": "LIFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NIELS": {
+ "name": "NIELS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NODEL": {
+ "name": "NODEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUGRP": {
+ "name": "PUGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPERR": {
+ "name": "SPERR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD1": {
+ "name": "STCD1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD2": {
+ "name": "STCD2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD3": {
+ "name": "STCD3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD4": {
+ "name": "STCD4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCEG": {
+ "name": "STCEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMJAH": {
+ "name": "UMJAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UWAER": {
+ "name": "UWAER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VBUND": {
+ "name": "VBUND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT_C": {
+ "name": "ZZAPPDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM_C": {
+ "name": "ZZAPPTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS_C": {
+ "name": "ZZAPPUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBA": {
+ "name": "ZZBA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBRSCH_C": {
+ "name": "ZZBRSCH_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCRMCD": {
+ "name": "ZZCRMCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKAR_C": {
+ "name": "ZZDOKAR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKNR_C": {
+ "name": "ZZDOKNR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKTL_C": {
+ "name": "ZZDOKTL_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKVR_C": {
+ "name": "ZZDOKVR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDUNS": {
+ "name": "ZZDUNS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTBU": {
+ "name": "ZZFTBU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTBUNM": {
+ "name": "ZZFTBUNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTDT": {
+ "name": "ZZFTDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTDTNM": {
+ "name": "ZZFTDTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTGT": {
+ "name": "ZZFTGT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTGTNM": {
+ "name": "ZZFTGTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZINBFLGC": {
+ "name": "ZZINBFLGC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT_C": {
+ "name": "ZZLAMDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM_C": {
+ "name": "ZZLAMTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS_C": {
+ "name": "ZZLAMUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZORT01_C": {
+ "name": "ZZORT01_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZORT02_C": {
+ "name": "ZZORT02_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREASON": {
+ "name": "ZZREASON",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT_C": {
+ "name": "ZZREGDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM_C": {
+ "name": "ZZREGTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS_C": {
+ "name": "ZZREGUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTCDT_C": {
+ "name": "ZZSTCDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTRAS_C": {
+ "name": "ZZSTRAS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSUBSEQ_C": {
+ "name": "ZZSUBSEQ_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AKONT": {
+ "name": "AKONT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BUKRS": {
+ "name": "BUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "FDGRV": {
+ "name": "FDGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPERR": {
+ "name": "SPERR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZAHLS": {
+ "name": "ZAHLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZTERM": {
+ "name": "ZTERM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZUAWA": {
+ "name": "ZUAWA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZWELS": {
+ "name": "ZWELS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AUFSD": {
+ "name": "AUFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AWAHR": {
+ "name": "AWAHR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BZIRK": {
+ "name": "BZIRK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAKSD": {
+ "name": "FAKSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO1": {
+ "name": "INCO1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO2": {
+ "name": "INCO2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KALKS": {
+ "name": "KALKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KDGRP": {
+ "name": "KDGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KONDA": {
+ "name": "KONDA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTGRD": {
+ "name": "KTGRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KURST": {
+ "name": "KURST",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KZAZU": {
+ "name": "KZAZU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LIFSD": {
+ "name": "LIFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LPRIO": {
+ "name": "LPRIO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLTYP": {
+ "name": "PLTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VERSG": {
+ "name": "VERSG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKBUR": {
+ "name": "VKBUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKGRP": {
+ "name": "VKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKORG": {
+ "name": "VKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VSBED": {
+ "name": "VSBED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VTWEG": {
+ "name": "VTWEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VWERK": {
+ "name": "VWERK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS": {
+ "name": "WAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZTERM": {
+ "name": "ZTERM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEFPA": {
+ "name": "DEFPA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KUNN2": {
+ "name": "KUNN2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PARVW": {
+ "name": "PARVW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PARZA": {
+ "name": "PARZA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ALAND": {
+ "name": "ALAND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TATYP": {
+ "name": "TATYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TAXKD": {
+ "name": "TAXKD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LAND1": {
+ "name": "LAND1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "STCEG": {
+ "name": "STCEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "TAXNUM": {
+ "name": "TAXNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAXTYPE": {
+ "name": "TAXTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BICD": {
+ "name": "BICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZAREA": {
+ "name": "BIZAREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CCCD": {
+ "name": "CCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COMPCD": {
+ "name": "COMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DEPTLVL": {
+ "name": "DEPTLVL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPTPOSNO": {
+ "name": "DEPTPOSNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHEMPID": {
+ "name": "DHEMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GNCD": {
+ "name": "GNCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PCCD": {
+ "name": "PCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDEPTCD": {
+ "name": "PDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDFROMDT": {
+ "name": "VALIDFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDTODT": {
+ "name": "VALIDTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_unique": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "DEPTCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRCNTRY": {
+ "name": "ADDRCNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AEDAT": {
+ "name": "AEDAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AENAM": {
+ "name": "AENAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AEZET": {
+ "name": "AEZET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BICD": {
+ "name": "BICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZAREA": {
+ "name": "BIZAREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSCADDR": {
+ "name": "BSCADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COMPCD": {
+ "name": "COMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COUNTRYCD": {
+ "name": "COUNTRYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSFROMDT": {
+ "name": "CSFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTODT": {
+ "name": "CSTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTIROLE": {
+ "name": "CTIROLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL": {
+ "name": "DEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPENDDT": {
+ "name": "DEPENDDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHJOBGRDCD": {
+ "name": "DHJOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHNAME": {
+ "name": "DHNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHSINGLID": {
+ "name": "DHSINGLID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISPATCH": {
+ "name": "DISPATCH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DPSTARTDT": {
+ "name": "DPSTARTDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTLADDR": {
+ "name": "DTLADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTLADDR2": {
+ "name": "DTLADDR2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMAIL": {
+ "name": "EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMPADR": {
+ "name": "EMPADR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMPTYPE": {
+ "name": "EMPTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ENGNAME": {
+ "name": "ENGNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EPID": {
+ "name": "EPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERDAT": {
+ "name": "ERDAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERNAM": {
+ "name": "ERNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERZET": {
+ "name": "ERZET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FORIGNFLG": {
+ "name": "FORIGNFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBCD": {
+ "name": "GJOBCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBDUTYCD": {
+ "name": "GJOBDUTYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBGRDCD": {
+ "name": "GJOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GNCD": {
+ "name": "GNCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HRMANAGE": {
+ "name": "HRMANAGE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IDNO": {
+ "name": "IDNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBCD": {
+ "name": "JOBCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBCLASS": {
+ "name": "JOBCLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBDUTYCD": {
+ "name": "JOBDUTYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDCD": {
+ "name": "JOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTL_EMP": {
+ "name": "KTL_EMP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVABSENCE": {
+ "name": "LVABSENCE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MBPHONE": {
+ "name": "MBPHONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME": {
+ "name": "NAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OKTL_EMPL": {
+ "name": "OKTL_EMPL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGBICD": {
+ "name": "ORGBICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGCOMPCD": {
+ "name": "ORGCOMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGCORPCD": {
+ "name": "ORGCORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGDEPTCD": {
+ "name": "ORGDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGPDEPCD": {
+ "name": "ORGPDEPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PAYPLC": {
+ "name": "PAYPLC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDEPTCD": {
+ "name": "PDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTLCODE": {
+ "name": "PSTLCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RETIRE": {
+ "name": "RETIRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SEX": {
+ "name": "SEX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SINGLEID": {
+ "name": "SINGLEID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SINGLRQ": {
+ "name": "SINGLRQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOCIALID": {
+ "name": "SOCIALID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOCIALID_DECR": {
+ "name": "SOCIALID_DECR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOJRNEMP": {
+ "name": "SOJRNEMP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNUM": {
+ "name": "TELNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TMPJDIV": {
+ "name": "TMPJDIV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USEDSYS": {
+ "name": "USEDSYS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALFROMDT": {
+ "name": "VALFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALTODT": {
+ "name": "VALTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WFREQUIRE": {
+ "name": "WFREQUIRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WORKPLC": {
+ "name": "WORKPLC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZPRFLG": {
+ "name": "ZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBUKRS": {
+ "name": "ZZBUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_unique": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "EMPID"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GTEXT": {
+ "name": "GTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BINM": {
+ "name": "BINM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COUNTRYNM": {
+ "name": "COUNTRYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "PCCD": {
+ "name": "PCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "KTEXT": {
+ "name": "KTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBGRDNM": {
+ "name": "JOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBDUTYNM": {
+ "name": "GJOBDUTYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBGRDNM": {
+ "name": "GJOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ISEXECUT": {
+ "name": "ISEXECUT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDTYPE": {
+ "name": "JOBGRDTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBNM": {
+ "name": "GJOBNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GNNM": {
+ "name": "GNNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBDUTYNM": {
+ "name": "JOBDUTYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ISEXECUT": {
+ "name": "ISEXECUT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDNM": {
+ "name": "JOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDTYPE": {
+ "name": "JOBGRDTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBNM": {
+ "name": "JOBNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BINM": {
+ "name": "BINM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADTL_01": {
+ "name": "ADTL_01",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADTL_02": {
+ "name": "ADTL_02",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "GRPCD": {
+ "name": "GRPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAINCD": {
+ "name": "MAINCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VALIDFROMDT": {
+ "name": "VALIDFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDTODT": {
+ "name": "VALIDTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_unique": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "GRPCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME",
+ "schema": "mdg",
+ "columns": {
+ "GRPCD": {
+ "name": "GRPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "NAME": {
+ "name": "NAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_GRPCD_EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_fk": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_GRPCD_EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_fk",
+ "tableFrom": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME",
+ "tableTo": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "GRPCD"
+ ],
+ "columnsTo": [
+ "GRPCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL": {
+ "name": "EQUP_MASTER_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EQUP_MASTER_MATL_MATNR_unique": {
+ "name": "EQUP_MASTER_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_CHARASGN": {
+ "name": "EQUP_MASTER_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_CHARASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_CHARASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_CHARASGN",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_CLASSASGN": {
+ "name": "EQUP_MASTER_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_CLASSASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_CLASSASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_CLASSASGN",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_DESC": {
+ "name": "EQUP_MASTER_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_DESC_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_DESC_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_DESC",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_PLNT": {
+ "name": "EQUP_MASTER_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_PLNT_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_PLNT_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_PLNT",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_UNIT": {
+ "name": "EQUP_MASTER_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_UNIT_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_UNIT_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_UNIT",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL": {
+ "name": "MATERIAL_MASTER_PART_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZACT": {
+ "name": "ZZACT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCERT": {
+ "name": "ZZCERT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZINSP": {
+ "name": "ZZINSP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMMTYP": {
+ "name": "ZZMMTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMRC": {
+ "name": "ZZMRC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPJT": {
+ "name": "ZZPJT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPLMID": {
+ "name": "ZZPLMID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRCD_SCV_CTLP": {
+ "name": "ZZPRCD_SCV_CTLP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREPMAT": {
+ "name": "ZZREPMAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_DIA": {
+ "name": "ZZREP_DIA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_DIA_UOM": {
+ "name": "ZZREP_DIA_UOM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_ITM_MATL": {
+ "name": "ZZREP_ITM_MATL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSMID": {
+ "name": "ZZSMID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTL": {
+ "name": "ZZSTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MATERIAL_MASTER_PART_MATL_MATNR_unique": {
+ "name": "MATERIAL_MASTER_PART_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_CHARASGN": {
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_CHARASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_CHARASGN",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_CLASSASGN": {
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_CLASSASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_CLASSASGN",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_DESC": {
+ "name": "MATERIAL_MASTER_PART_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_DESC_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_DESC_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_DESC",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_PLNT": {
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_PLNT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_PLNT",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_UNIT": {
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BREIT": {
+ "name": "BREIT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOEHE": {
+ "name": "HOEHE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAENG": {
+ "name": "LAENG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLUM": {
+ "name": "VOLUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_UNIT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_UNIT",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE": {
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_CD": {
+ "name": "MAT_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAT_ID": {
+ "name": "MAT_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_MAT_CD_unique": {
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_MAT_CD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MAT_CD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL": {
+ "name": "MODEL_MASTER_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKAR": {
+ "name": "ZZDOKAR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKNR": {
+ "name": "ZZDOKNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKTL": {
+ "name": "ZZDOKTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKVR": {
+ "name": "ZZDOKVR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMMTYP": {
+ "name": "ZZMMTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MODEL_MASTER_MATL_MATNR_unique": {
+ "name": "MODEL_MASTER_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_CHARASGN": {
+ "name": "MODEL_MASTER_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_CHARASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_CHARASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_CHARASGN",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_CLASSASGN": {
+ "name": "MODEL_MASTER_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_CLASSASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_CLASSASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_CLASSASGN",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_DESC": {
+ "name": "MODEL_MASTER_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_DESC_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_DESC_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_DESC",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_PLNT": {
+ "name": "MODEL_MASTER_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_PLNT_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_PLNT_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_PLNT",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_UNIT": {
+ "name": "MODEL_MASTER_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BREIT": {
+ "name": "BREIT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOEHE": {
+ "name": "HOEHE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAENG": {
+ "name": "LAENG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLUM": {
+ "name": "VOLUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_UNIT_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_UNIT_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_UNIT",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_CCTR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ABTEI": {
+ "name": "ABTEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ANRED": {
+ "name": "ANRED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZER": {
+ "name": "BKZER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZKP": {
+ "name": "BKZKP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZKS": {
+ "name": "BKZKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZOB": {
+ "name": "BKZOB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BUKRS": {
+ "name": "BUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CCTR": {
+ "name": "CCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATAB": {
+ "name": "DATAB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATBI": {
+ "name": "DATBI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATLT": {
+ "name": "DATLT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DRNAM": {
+ "name": "DRNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FUNC_AREA": {
+ "name": "FUNC_AREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GSBER": {
+ "name": "GSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KHINR": {
+ "name": "KHINR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOKRS": {
+ "name": "KOKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KOSAR": {
+ "name": "KOSAR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAND1": {
+ "name": "LAND1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MGEFL": {
+ "name": "MGEFL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME1": {
+ "name": "NAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME2": {
+ "name": "NAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME3": {
+ "name": "NAME3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME4": {
+ "name": "NAME4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORT01": {
+ "name": "ORT01",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORT02": {
+ "name": "ORT02",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PFACH": {
+ "name": "PFACH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZER": {
+ "name": "PKZER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZKP": {
+ "name": "PKZKP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZKS": {
+ "name": "PKZKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTL2": {
+ "name": "PSTL2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTLZ": {
+ "name": "PSTLZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGIO": {
+ "name": "REGIO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STRAS": {
+ "name": "STRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELBX": {
+ "name": "TELBX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELF1": {
+ "name": "TELF1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELF2": {
+ "name": "TELF2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELFX": {
+ "name": "TELFX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELTX": {
+ "name": "TELTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELX1": {
+ "name": "TELX1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXJCD": {
+ "name": "TXJCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK": {
+ "name": "VERAK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK_USE": {
+ "name": "VERAK_USE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VMETH": {
+ "name": "VMETH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS": {
+ "name": "WAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBRANCH": {
+ "name": "ZZBRANCH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFCTRI": {
+ "name": "ZZFCTRI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSECCODE": {
+ "name": "ZZSECCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSEGMENT": {
+ "name": "ZZSEGMENT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "CCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT",
+ "schema": "mdg",
+ "columns": {
+ "CCTR": {
+ "name": "CCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "KTEXT": {
+ "name": "KTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_fk": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_fk",
+ "tableFrom": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT",
+ "tableTo": "ORGANIZATION_MASTER_HRHMTB_CCTR",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "CCTR"
+ ],
+ "columnsTo": [
+ "CCTR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "CCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_PCTR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ABTEI": {
+ "name": "ABTEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATAB": {
+ "name": "DATAB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATBI": {
+ "name": "DATBI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KHINR": {
+ "name": "KHINR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOKRS": {
+ "name": "KOKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LOCK_IND": {
+ "name": "LOCK_IND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PCTR": {
+ "name": "PCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SEGMENT": {
+ "name": "SEGMENT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXJCD": {
+ "name": "TXJCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK": {
+ "name": "VERAK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK_USE": {
+ "name": "VERAK_USE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_PCTR_PCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR_PCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "PCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZBUKRS": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CURR_BUKR": {
+ "name": "CURR_BUKR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBUKRS": {
+ "name": "ZBUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZBUTXT": {
+ "name": "ZZBUTXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCITY": {
+ "name": "ZZCITY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCOUNTRY": {
+ "name": "ZZCOUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLANGU": {
+ "name": "ZZLANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_ZBUKRS_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_ZBUKRS_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZBUKRS"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZEKGRP": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZEKGRP": {
+ "name": "ZEKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKNAM": {
+ "name": "ZZEKNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKTEL": {
+ "name": "ZZEKTEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEMPNUM": {
+ "name": "ZZEMPNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSINGLE": {
+ "name": "ZZSINGLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZTELFX": {
+ "name": "ZZTELFX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZTEL_NUM": {
+ "name": "ZZTEL_NUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_ZEKGRP_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_ZEKGRP_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZEKGRP"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZEKORG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZEKORG": {
+ "name": "ZEKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKOTX": {
+ "name": "ZZEKOTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZEKORG_ZEKORG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG_ZEKORG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZEKORG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZGSBER": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZGSBER": {
+ "name": "ZGSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZGSBER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT",
+ "schema": "mdg",
+ "columns": {
+ "ZGSBER": {
+ "name": "ZGSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LANGU": {
+ "name": "LANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TXTMI": {
+ "name": "TXTMI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_fk": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_fk",
+ "tableFrom": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT",
+ "tableTo": "ORGANIZATION_MASTER_HRHMTB_ZGSBER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "ZGSBER"
+ ],
+ "columnsTo": [
+ "ZGSBER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZGSBER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZLGORT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZLGORT": {
+ "name": "ZLGORT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZWERKS": {
+ "name": "ZWERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLGOBE": {
+ "name": "ZZLGOBE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZLGORT_ZLGORT_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT_ZLGORT_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZLGORT"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZSPART": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZSPART": {
+ "name": "ZSPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZSPART_ZSPART_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART_ZSPART_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZSPART"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKBUR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CTRY_SOFF": {
+ "name": "CTRY_SOFF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_SOFF": {
+ "name": "LANG_SOFF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZVKBUR": {
+ "name": "ZVKBUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_ZVKBUR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_ZVKBUR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKBUR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKGRP": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVKGRP": {
+ "name": "ZVKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_ZVKGRP_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_ZVKGRP_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKGRP"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKORG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVKORG": {
+ "name": "ZVKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZBOAVO": {
+ "name": "ZZBOAVO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZKUNNR": {
+ "name": "ZZKUNNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZVKOKL": {
+ "name": "ZZVKOKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZWAERS": {
+ "name": "ZZWAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKORG_ZVKORG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG_ZVKORG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKORG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVSTEL": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ALAN_VSTE": {
+ "name": "ALAN_VSTE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AZON_VSTE": {
+ "name": "AZON_VSTE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTRY_SHPT": {
+ "name": "CTRY_SHPT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_SHPT": {
+ "name": "LANG_SHPT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZVSTEL": {
+ "name": "ZVSTEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFABKL": {
+ "name": "ZZFABKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAZBS": {
+ "name": "ZZLAZBS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZRIZBS": {
+ "name": "ZZRIZBS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_ZVSTEL_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_ZVSTEL_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVSTEL"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVTWEG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVTWEG": {
+ "name": "ZVTWEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_ZVTWEG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_ZVTWEG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVTWEG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZWERKS": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CTRY_PLNT": {
+ "name": "CTRY_PLNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_PLNT": {
+ "name": "LANG_PLNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZWERKS": {
+ "name": "ZWERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFABKL": {
+ "name": "ZZFABKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME1": {
+ "name": "ZZNAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME2": {
+ "name": "ZZNAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZWERKS_ZWERKS_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS_ZWERKS_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZWERKS"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.PROJECT_MASTER_CMCTB_PROJ_MAST": {
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AS_GRNT_PRD": {
+ "name": "AS_GRNT_PRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZLOC_CD": {
+ "name": "BIZLOC_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_DMN": {
+ "name": "BIZ_DMN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BP_DL_DT": {
+ "name": "BP_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHN_PROJ_TP": {
+ "name": "CHN_PROJ_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_CNTN_YN": {
+ "name": "CNRT_CNTN_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DL_DT": {
+ "name": "CNRT_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DT": {
+ "name": "CNRT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_RESV_YN": {
+ "name": "CNRT_RESV_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_PO_NO": {
+ "name": "CSTM_PO_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIGT_PDT_GRP": {
+ "name": "DIGT_PDT_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_BF_PROJ_NM": {
+ "name": "DL_BF_PROJ_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_CSTM_CD": {
+ "name": "DL_CSTM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_CD": {
+ "name": "DOCK_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_CHRGR": {
+ "name": "DSN_CHRGR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_GRNT_FN_DT": {
+ "name": "FIN_GRNT_FN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GENT_CNT": {
+ "name": "GENT_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOV": {
+ "name": "GOV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRNT_STDT": {
+ "name": "GRNT_STDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IMO_NO": {
+ "name": "IMO_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_NO": {
+ "name": "INQY_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_SEQ": {
+ "name": "INQY_SEQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IO_GB": {
+ "name": "IO_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNG_ACOT_DMN": {
+ "name": "MNG_ACOT_DMN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_ENGN_TP_CD": {
+ "name": "MN_ENGN_TP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSHIP_NO": {
+ "name": "MSHIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTTP": {
+ "name": "NTTP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_FN_DT": {
+ "name": "ORDR_GRNT_FN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_PRD": {
+ "name": "ORDR_GRNT_PRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_1": {
+ "name": "OWN_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_AB": {
+ "name": "OWN_AB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_NM": {
+ "name": "OWN_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_LVL_4": {
+ "name": "PDT_LVL_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRGS_STAT": {
+ "name": "PRGS_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_DT": {
+ "name": "PROJ_CRTE_REQ_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_EMPNO": {
+ "name": "PROJ_CRTE_REQ_EMPNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_PLN_DT": {
+ "name": "PROJ_DL_PLN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_RT_DT": {
+ "name": "PROJ_DL_RT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DSC": {
+ "name": "PROJ_DSC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DTL_TP": {
+ "name": "PROJ_DTL_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_ETC_TP": {
+ "name": "PROJ_ETC_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_GB": {
+ "name": "PROJ_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PROJ_PRGS_YN": {
+ "name": "PROJ_PRGS_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PROF": {
+ "name": "PROJ_PROF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_SCP": {
+ "name": "PROJ_SCP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_WBS_TP": {
+ "name": "PROJ_WBS_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRO_PROJ_NO": {
+ "name": "PRO_PROJ_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REF_NO": {
+ "name": "REF_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RLTD_PROJ": {
+ "name": "RLTD_PROJ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RL_DL_DT": {
+ "name": "RL_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SA_DT": {
+ "name": "SA_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_NO": {
+ "name": "SERS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_YN": {
+ "name": "SERS_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE": {
+ "name": "SHTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_GRP": {
+ "name": "SHTYPE_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND": {
+ "name": "SKND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRC_SYS_ID": {
+ "name": "SRC_SYS_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STDT": {
+ "name": "STDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_ACOT_CLSD_DT": {
+ "name": "SYS_ACOT_CLSD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_CNRT_CNT": {
+ "name": "TOT_CNRT_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WP_PROJ_TP": {
+ "name": "WP_PROJ_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "PROJECT_MASTER_CMCTB_PROJ_MAST_PROJ_NO_unique": {
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST_PROJ_NO_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "PROJ_NO"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER": {
+ "name": "VENDOR_MASTER_BP_HEADER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "VENDOR_MASTER_BP_HEADER_VNDRCD_unique": {
+ "name": "VENDOR_MASTER_BP_HEADER_VNDRCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "VNDRCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRNO": {
+ "name": "ADDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_TMZ": {
+ "name": "ADR_TMZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAX_JRDT_ZONE_CD": {
+ "name": "TAX_JRDT_ZONE_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_TAXNUM": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP_TP": {
+ "name": "ACNT_GRP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZR_NO": {
+ "name": "BIZR_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_CD": {
+ "name": "BIZ_UOM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_NM": {
+ "name": "BIZ_UOM_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_REG_NO": {
+ "name": "CO_REG_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_VLM": {
+ "name": "CO_VLM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_HOLD_ORDR": {
+ "name": "DEL_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_CD": {
+ "name": "DMST_TOP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_NM": {
+ "name": "DMST_TOP_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DNS_NO": {
+ "name": "DNS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_TP": {
+ "name": "DOC_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_VER": {
+ "name": "DOC_VER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIR_NM": {
+ "name": "FIR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_CD": {
+ "name": "GBL_TOP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_NM": {
+ "name": "GBL_TOP_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GIRO_VNDR_ORDR": {
+ "name": "GIRO_VNDR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INB_FLAG": {
+ "name": "INB_FLAG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_LCTN_CHK_NUM": {
+ "name": "INTL_LCTN_CHK_NUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS_CD": {
+ "name": "OVLAP_CAUS_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNT_VNDRCD": {
+ "name": "PTNT_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTN_DOC": {
+ "name": "PTN_DOC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_EMAIL": {
+ "name": "QLT_CHRGR_EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_NM": {
+ "name": "QLT_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_TELNO": {
+ "name": "QLT_CHRGR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_TM": {
+ "name": "REG_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_RESNO": {
+ "name": "REPR_RESNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TEL_NO": {
+ "name": "REP_TEL_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SB_WKA_SEQ": {
+ "name": "SB_WKA_SEQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCETX_RP_SEX_KEY": {
+ "name": "SRCETX_RP_SEX_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_CD_4": {
+ "name": "TX_CD_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VAT_REG_NO": {
+ "name": "VAT_REG_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNO": {
+ "name": "VNDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ACOT_CHRGR_FAXNO": {
+ "name": "ACOT_CHRGR_FAXNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_TELNO": {
+ "name": "ACOT_CHRGR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUTH_GRP": {
+ "name": "AUTH_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BF_VNDRCD": {
+ "name": "BF_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CSTM_VNDR_CLR_ORDR": {
+ "name": "CSTM_VNDR_CLR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTL_ACNT": {
+ "name": "CTL_ACNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_ACT_DT": {
+ "name": "FIN_IR_ACT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_CALC_DT": {
+ "name": "FIN_IR_CALC_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IATA_BIC_GB": {
+ "name": "IATA_BIC_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOGST_VNDR_TP": {
+ "name": "LOGST_VNDR_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEMO": {
+ "name": "MEMO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MIN_ORDR": {
+ "name": "MIN_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_CHRGR_EMAIL": {
+ "name": "MK_CHRGR_EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MOFFC_ACNT_NO": {
+ "name": "MOFFC_ACNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_INVC_ORDR": {
+ "name": "OVLAP_INVC_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLN_GRP": {
+ "name": "PLN_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TP": {
+ "name": "REP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_HOLD_ORDR": {
+ "name": "SPLY_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_MTHD": {
+ "name": "SPLY_MTHD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRT_SPLY_ORDR": {
+ "name": "SPRT_SPLY_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_CD": {
+ "name": "SRCE_TX_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NTN_CD": {
+ "name": "SRCE_TX_NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_BANK_SHRT_KEY": {
+ "name": "TRD_BANK_SHRT_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_ACNT_NO": {
+ "name": "VNDR_ACNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CHRGR_NM": {
+ "name": "VNDR_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DCHAG_CAUS": {
+ "name": "DCHAG_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CERT_NO": {
+ "name": "DCHAG_CERT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ED_DT": {
+ "name": "DCHAG_ED_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ST_DT": {
+ "name": "DCHAG_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RECIP_TP": {
+ "name": "RECIP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_IDENT_NO": {
+ "name": "SRCE_TX_IDENT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NO": {
+ "name": "SRCE_TX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_REL_ORDR": {
+ "name": "SRCE_TX_REL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_TP": {
+ "name": "SRCE_TX_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AT_PUR_ORD_ORDR": {
+ "name": "AT_PUR_ORD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CALC_SHM_GRP": {
+ "name": "CALC_SHM_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNFM_CTL_KEY": {
+ "name": "CNFM_CTL_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GR_BSE_INVC_VR": {
+ "name": "GR_BSE_INVC_VR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORD_CNFM_REQ_ORDR": {
+ "name": "ORD_CNFM_REQ_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_CAUS": {
+ "name": "PUR_HOLD_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_ORD_CUR": {
+ "name": "PUR_ORD_CUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_CHRGR_NM": {
+ "name": "SALE_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TELNO": {
+ "name": "VNDR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_REF_VNDRCD": {
+ "name": "ETC_REF_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_NO": {
+ "name": "PLNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDR_SUB_NO": {
+ "name": "VNDR_SUB_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "soap.soap_logs": {
+ "name": "soap_logs",
+ "schema": "soap",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "direction": {
+ "name": "direction",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "system": {
+ "name": "system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interface": {
+ "name": "interface",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endedAt": {
+ "name": "endedAt",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isSuccess": {
+ "name": "isSuccess",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "requestData": {
+ "name": "requestData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responseData": {
+ "name": "responseData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd": {
+ "name": "cmctb_cd",
+ "schema": "nonsap",
+ "columns": {
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD": {
+ "name": "CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD2": {
+ "name": "CD2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD3": {
+ "name": "CD3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "USR_DF_CHAR_1": {
+ "name": "USR_DF_CHAR_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_2": {
+ "name": "USR_DF_CHAR_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_3": {
+ "name": "USR_DF_CHAR_3",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_4": {
+ "name": "USR_DF_CHAR_4",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_5": {
+ "name": "USR_DF_CHAR_5",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_6": {
+ "name": "USR_DF_CHAR_6",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_7": {
+ "name": "USR_DF_CHAR_7",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_8": {
+ "name": "USR_DF_CHAR_8",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_9": {
+ "name": "USR_DF_CHAR_9",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_10": {
+ "name": "USR_DF_CHAR_10",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_11": {
+ "name": "USR_DF_CHAR_11",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_12": {
+ "name": "USR_DF_CHAR_12",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_13": {
+ "name": "USR_DF_CHAR_13",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_14": {
+ "name": "USR_DF_CHAR_14",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_15": {
+ "name": "USR_DF_CHAR_15",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_16": {
+ "name": "USR_DF_CHAR_16",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_17": {
+ "name": "USR_DF_CHAR_17",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_18": {
+ "name": "USR_DF_CHAR_18",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_19": {
+ "name": "USR_DF_CHAR_19",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_20": {
+ "name": "USR_DF_CHAR_20",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_1": {
+ "name": "USR_DF_CHK_1",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_2": {
+ "name": "USR_DF_CHK_2",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_3": {
+ "name": "USR_DF_CHK_3",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_4": {
+ "name": "USR_DF_CHK_4",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_5": {
+ "name": "USR_DF_CHK_5",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_6": {
+ "name": "USR_DF_CHK_6",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_7": {
+ "name": "USR_DF_CHK_7",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_8": {
+ "name": "USR_DF_CHK_8",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_1": {
+ "name": "USR_DF_DT_1",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_2": {
+ "name": "USR_DF_DT_2",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_3": {
+ "name": "USR_DF_DT_3",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_4": {
+ "name": "USR_DF_DT_4",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_1": {
+ "name": "USR_DF_TM_1",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_2": {
+ "name": "USR_DF_TM_2",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_3": {
+ "name": "USR_DF_TM_3",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_4": {
+ "name": "USR_DF_TM_4",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd_clf": {
+ "name": "cmctb_cd_clf",
+ "schema": "nonsap",
+ "columns": {
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd_clf_nm": {
+ "name": "cmctb_cd_clf_nm",
+ "schema": "nonsap",
+ "columns": {
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF_NM": {
+ "name": "CD_CLF_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRP_DSC": {
+ "name": "GRP_DSC",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cdnm": {
+ "name": "cmctb_cdnm",
+ "schema": "nonsap",
+ "columns": {
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD": {
+ "name": "CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD2": {
+ "name": "CD2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD3": {
+ "name": "CD3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CDNM": {
+ "name": "CDNM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRP_DSC": {
+ "name": "GRP_DSC",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_addr": {
+ "name": "cmctb_customer_addr",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOUSE_NR1": {
+ "name": "HOUSE_NR1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_cfpn": {
+ "name": "cmctb_customer_cfpn",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_compny": {
+ "name": "cmctb_customer_compny",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AR_ACNT_HDL_GB": {
+ "name": "AR_ACNT_HDL_GB",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AMT_RNE_GB": {
+ "name": "AMT_RNE_GB",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_PAY_FRM": {
+ "name": "VNDR_PAY_FRM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BILL_PAY_COND_CD": {
+ "name": "BILL_PAY_COND_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BILL_PAY_BLOC_CD": {
+ "name": "BILL_PAY_BLOC_CD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_general": {
+ "name": "cmctb_customer_general",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS": {
+ "name": "OVLAP_CAUS",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_TP": {
+ "name": "CSTM_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_BLOCK": {
+ "name": "DEL_BLOCK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COND_GRP_1": {
+ "name": "COND_GRP_1",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_GRP_NM": {
+ "name": "CSTM_GRP_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_2": {
+ "name": "TX_NO_2",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_3": {
+ "name": "TX_NO_3",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_4": {
+ "name": "TX_NO_4",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_REG_NO": {
+ "name": "TX_REG_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BA_CD": {
+ "name": "BA_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCH_COND_1": {
+ "name": "SRCH_COND_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCH_COND_2": {
+ "name": "SRCH_COND_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_DISP_NM": {
+ "name": "CITY_DISP_NM",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRM_CD": {
+ "name": "CRM_CD",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IN_FLAG": {
+ "name": "IN_FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDST_CD": {
+ "name": "INDST_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_TP": {
+ "name": "TX_NO_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DTM": {
+ "name": "REG_DTM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTGT_CD": {
+ "name": "FTGT_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTGT_NM": {
+ "name": "FTGT_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTDT_CD": {
+ "name": "FTDT_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTDT_NM": {
+ "name": "FTDT_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTBU_CD": {
+ "name": "FTBU_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTBU_NM": {
+ "name": "FTBU_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_repremail": {
+ "name": "cmctb_customer_repremail",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprfax": {
+ "name": "cmctb_customer_reprfax",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprtel": {
+ "name": "cmctb_customer_reprtel",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprurl": {
+ "name": "cmctb_customer_reprurl",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_sorg": {
+ "name": "cmctb_customer_sorg",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_REGN": {
+ "name": "SALE_REGN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_OFC": {
+ "name": "SALE_OFC",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_GRP": {
+ "name": "CSTM_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSBL": {
+ "name": "PSBL",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_CUR": {
+ "name": "TRD_CUR",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXRAT_TP": {
+ "name": "EXRAT_TP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRC_PRCS_DSC_CD": {
+ "name": "PRC_PRCS_DSC_CD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_STAT_GRP": {
+ "name": "CSTM_STAT_GRP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHIPMT_COND": {
+ "name": "SHIPMT_COND",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAX_TRD_QTY": {
+ "name": "MAX_TRD_QTY",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(84)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_ASGN_GRP": {
+ "name": "ACNT_ASGN_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_taxcd": {
+ "name": "cmctb_customer_taxcd",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DPRT_NTN": {
+ "name": "DPRT_NTN",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_CTG": {
+ "name": "TX_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CSTM_TX_CLF": {
+ "name": "CSTM_TX_CLF",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_taxnum": {
+ "name": "cmctb_customer_taxnum",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_bse": {
+ "name": "cmctb_mat_bse",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SM_CD": {
+ "name": "SM_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_ID": {
+ "name": "MAT_ID",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_TP": {
+ "name": "MAT_TP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_GB": {
+ "name": "MAT_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_DTL": {
+ "name": "MAT_DTL",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_DTL_SPEC": {
+ "name": "MAT_DTL_SPEC",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATL": {
+ "name": "MATL",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OLD_MAT_NO": {
+ "name": "OLD_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SBST_MAT_NO": {
+ "name": "SBST_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UOM": {
+ "name": "UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MRC": {
+ "name": "MRC",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STOR_MAT_ORDR": {
+ "name": "STOR_MAT_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STYPE": {
+ "name": "STYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS": {
+ "name": "CLS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGT": {
+ "name": "WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NET_WGT": {
+ "name": "NET_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGT_UOM": {
+ "name": "WGT_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH": {
+ "name": "LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH_2": {
+ "name": "LTH_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH": {
+ "name": "WTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH_2": {
+ "name": "WTH_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "THK": {
+ "name": "THK",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STD": {
+ "name": "STD",
+ "type": "varchar(70)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROF_STD": {
+ "name": "PROF_STD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CBL_OUT_DIA": {
+ "name": "CBL_OUT_DIA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTRM_MAT_YN": {
+ "name": "LTRM_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNT_AREA": {
+ "name": "PNT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTIN_AREA": {
+ "name": "PNTIN_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTIN_SPEC": {
+ "name": "PNTIN_SPEC",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_AREA": {
+ "name": "PNTOUT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_1": {
+ "name": "PNTOUT_SPEC_1",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_2": {
+ "name": "PNTOUT_SPEC_2",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_3": {
+ "name": "PNTOUT_SPEC_3",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RT_INSPEC": {
+ "name": "RT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UT_INSPEC": {
+ "name": "UT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MT_INSPEC": {
+ "name": "MT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PT_INSPEC": {
+ "name": "PT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_DWG_NO": {
+ "name": "MK_DWG_NO",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CUT_DWG_NO": {
+ "name": "CUT_DWG_NO",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_SPL_NO": {
+ "name": "PIPE_SPL_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_LINE_NO": {
+ "name": "PIPE_LINE_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_CLAS": {
+ "name": "PIPE_CLAS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FLUID_KND": {
+ "name": "FLUID_KND",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_ITM_MATL": {
+ "name": "REP_ITM_MATL",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA": {
+ "name": "REP_DIA",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA_UOM": {
+ "name": "REP_DIA_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_SCH": {
+ "name": "REP_SCH",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA_LTH": {
+ "name": "REP_DIA_LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DBLN_GB": {
+ "name": "DBLN_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_GRD": {
+ "name": "PIPE_GRD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HTRET_YN": {
+ "name": "HTRET_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BA_GALV_SPEC": {
+ "name": "BA_GALV_SPEC",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SSIDE_YN": {
+ "name": "SSIDE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTR_PIPE_YN": {
+ "name": "PNTR_PIPE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UBOLT_YN": {
+ "name": "UBOLT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTLP_PRCD_PNT": {
+ "name": "CTLP_PRCD_PNT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCD_SCV_CTLP": {
+ "name": "PRCD_SCV_CTLP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PMI_INSPEC": {
+ "name": "PMI_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTRPRS": {
+ "name": "WTRPRS",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLV_FIT_NO": {
+ "name": "VLV_FIT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_NO": {
+ "name": "TAG_NO",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_SB_NO": {
+ "name": "TAG_SB_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NM_PLATE_TP": {
+ "name": "NM_PLATE_TP",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NM_PLATE_SVC_NM": {
+ "name": "NM_PLATE_SVC_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VRCS_MAT_NO": {
+ "name": "VRCS_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRSM_FIT_NO": {
+ "name": "TRSM_FIT_NO",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLV_OPT_CD_LIST": {
+ "name": "VLV_OPT_CD_LIST",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_REQ_NO": {
+ "name": "PUR_REQ_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ITM_NO": {
+ "name": "ITM_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MDL_NO": {
+ "name": "MDL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BL_NO": {
+ "name": "BL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_EQP_NO": {
+ "name": "VNDR_EQP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BOX_NO": {
+ "name": "BOX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMT_NO": {
+ "name": "MMT_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INSTL_LOC": {
+ "name": "INSTL_LOC",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_EQP_YN": {
+ "name": "MN_EQP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIXED_MAT_YN": {
+ "name": "FIXED_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRE_YN": {
+ "name": "SPRE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOOL_YN": {
+ "name": "TOOL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CBL_YN": {
+ "name": "CBL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_INSTL_MAT_YN": {
+ "name": "OWN_INSTL_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NONINSTL_MAT_YN": {
+ "name": "NONINSTL_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BLK_NO": {
+ "name": "BLK_NO",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GYEL": {
+ "name": "GYEL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LNK_PTLST_NO": {
+ "name": "LNK_PTLST_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AREA": {
+ "name": "AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STOR_LOC": {
+ "name": "STOR_LOC",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SGUB_WGT": {
+ "name": "SGUB_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DGUB_WGT": {
+ "name": "DGUB_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_SKL": {
+ "name": "DSN_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RMK": {
+ "name": "RMK",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_DT": {
+ "name": "DEL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_STAT": {
+ "name": "MAT_STAT",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_SYS_NO": {
+ "name": "IF_SYS_NO",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_1": {
+ "name": "GLAND_SPEC_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_2": {
+ "name": "GLAND_SPEC_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_3": {
+ "name": "GLAND_SPEC_3",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MCT_MDLE_STD_1": {
+ "name": "MCT_MDLE_STD_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MCT_MDLE_STD_2": {
+ "name": "MCT_MDLE_STD_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BEELE_RISE": {
+ "name": "BEELE_RISE",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAX_DRUM_LTH": {
+ "name": "MAX_DRUM_LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DTM": {
+ "name": "AGR_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISPLN": {
+ "name": "DISPLN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LRG_KWK": {
+ "name": "LRG_KWK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTL_KWK": {
+ "name": "DTL_KWK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SP_INSP_GB": {
+ "name": "SP_INSP_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_4": {
+ "name": "PNTOUT_SPEC_4",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFE_MAT_NO": {
+ "name": "OFE_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFE_CAB_YN": {
+ "name": "OFE_CAB_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INSTL_PSB_CNT": {
+ "name": "INSTL_PSB_CNT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CUTL_ML_GB": {
+ "name": "CUTL_ML_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FCM_INSP": {
+ "name": "FCM_INSP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_DT": {
+ "name": "HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_LIFT_DT": {
+ "name": "HOLD_LIFT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_KND_GB": {
+ "name": "MAT_KND_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BATCH_MNG_ORDR": {
+ "name": "BATCH_MNG_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INPR_ID": {
+ "name": "FS_INPR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INP_DTM": {
+ "name": "FS_INP_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHGR_ID": {
+ "name": "FIN_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHG_DTM": {
+ "name": "FIN_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DWG_FILE_NM": {
+ "name": "DWG_FILE_NM",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_NO_CHG_DT": {
+ "name": "TAG_NO_CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SUB_EQP_YN": {
+ "name": "SUB_EQP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATT_MAT_YN": {
+ "name": "ATT_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_REV_NO": {
+ "name": "DSN_REV_NO",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR1": {
+ "name": "USR_DF_CHAR1",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR2": {
+ "name": "USR_DF_CHAR2",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR3": {
+ "name": "USR_DF_CHAR3",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR4": {
+ "name": "USR_DF_CHAR4",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR5": {
+ "name": "USR_DF_CHAR5",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_clas": {
+ "name": "cmctb_mat_clas",
+ "schema": "nonsap",
+ "columns": {
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CLAS_NM": {
+ "name": "CLAS_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_DTL": {
+ "name": "CLAS_DTL",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRNT_CLAS_CD": {
+ "name": "PRNT_CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_LVL": {
+ "name": "CLAS_LVL",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UOM": {
+ "name": "UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STYPE": {
+ "name": "STYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRD_MATL": {
+ "name": "GRD_MATL",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSE_UOM": {
+ "name": "BSE_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_clas_spchar": {
+ "name": "cmctb_mat_clas_spchar",
+ "schema": "nonsap",
+ "columns": {
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_SEQ": {
+ "name": "SPCHAR_SEQ",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNDT_YN": {
+ "name": "MNDT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_clas_spchar_CLAS_CD_SPCHAR_CD_pk": {
+ "name": "cmctb_mat_clas_spchar_CLAS_CD_SPCHAR_CD_pk",
+ "columns": [
+ "CLAS_CD",
+ "SPCHAR_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_dsc": {
+ "name": "cmctb_mat_dsc",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAT_DTL": {
+ "name": "MAT_DTL",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_plnt": {
+ "name": "cmctb_mat_plnt",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PLNT": {
+ "name": "PLNT",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DELV_UOM": {
+ "name": "DELV_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EA_BTCH_ND_GB": {
+ "name": "EA_BTCH_ND_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_CLF": {
+ "name": "PRCR_CLF",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_CHRGR_CD": {
+ "name": "PUR_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_CHRGR_CD": {
+ "name": "PRCR_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOODS_CHRGR_CD": {
+ "name": "GOODS_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_LT": {
+ "name": "PUR_LT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MRP_TP": {
+ "name": "MRP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_STAT": {
+ "name": "MAT_STAT",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BULK_MAT_ORDR": {
+ "name": "BULK_MAT_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_TP": {
+ "name": "PRCR_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SFTY_STCK_QTY": {
+ "name": "SFTY_STCK_QTY",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SER_PROF": {
+ "name": "SER_PROF",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BATCH_MNG_ORDR": {
+ "name": "BATCH_MNG_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SP_PRCR_TP": {
+ "name": "SP_PRCR_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar": {
+ "name": "cmctb_mat_spchar",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_DTL": {
+ "name": "SPCHAR_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_CD": {
+ "name": "SPCHAR_VAL_CD",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_DTL": {
+ "name": "SPCHAR_VAL_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_NUM": {
+ "name": "SPCHAR_VAL_NUM",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_UOM": {
+ "name": "SPCHAR_VAL_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar_mast": {
+ "name": "cmctb_mat_spchar_mast",
+ "schema": "nonsap",
+ "columns": {
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_DTL": {
+ "name": "SPCHAR_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_TP": {
+ "name": "SPCHAR_TP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_UOM": {
+ "name": "SPCHAR_VAL_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_YN": {
+ "name": "SPCHAR_VAL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_GRP": {
+ "name": "SPCHAR_GRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_spchar_mast_SPCHAR_CD_pk": {
+ "name": "cmctb_mat_spchar_mast_SPCHAR_CD_pk",
+ "columns": [
+ "SPCHAR_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar_val": {
+ "name": "cmctb_mat_spchar_val",
+ "schema": "nonsap",
+ "columns": {
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_VAL_CD": {
+ "name": "SPCHAR_VAL_CD",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_VAL_DTL": {
+ "name": "SPCHAR_VAL_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_spchar_val_SPCHAR_CD_SPCHAR_VAL_CD_pk": {
+ "name": "cmctb_mat_spchar_val_SPCHAR_CD_SPCHAR_VAL_CD_pk",
+ "columns": [
+ "SPCHAR_CD",
+ "SPCHAR_VAL_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_uom": {
+ "name": "cmctb_mat_uom",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SBST_UOM": {
+ "name": "SBST_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CNVRT_FCTR_1": {
+ "name": "CNVRT_FCTR_1",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNVRT_FCTR_2": {
+ "name": "CNVRT_FCTR_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH": {
+ "name": "LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH": {
+ "name": "WTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HGT": {
+ "name": "HGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SZ_UOM": {
+ "name": "SZ_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_bizcls": {
+ "name": "cmctb_proj_bizcls",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_mast": {
+ "name": "cmctb_proj_mast",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MSHIP_NO": {
+ "name": "MSHIP_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_NO": {
+ "name": "SERS_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REF_NO": {
+ "name": "REF_NO",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND": {
+ "name": "SKND",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE": {
+ "name": "SHTYPE",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_CD": {
+ "name": "DOCK_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_1": {
+ "name": "OWN_1",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DT": {
+ "name": "CNRT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DL_DT": {
+ "name": "CNRT_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DSC": {
+ "name": "PROJ_DSC",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_GB": {
+ "name": "PROJ_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_NM": {
+ "name": "OWN_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_SKND2": {
+ "name": "NEW_SKND2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_AB": {
+ "name": "OWN_AB",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHINA_YN": {
+ "name": "CHINA_YN",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DTL_TP": {
+ "name": "PROJ_DTL_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PROF": {
+ "name": "PROJ_PROF",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_NO": {
+ "name": "INQY_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_SEQ": {
+ "name": "INQY_SEQ",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTTP": {
+ "name": "NTTP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RLTD_PROJ": {
+ "name": "RLTD_PROJ",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIGT_PDT_GRP": {
+ "name": "DIGT_PDT_GRP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WP_PROJ_TP": {
+ "name": "WP_PROJ_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_CNRT_CNT": {
+ "name": "TOT_CNRT_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_ETC_TP": {
+ "name": "PROJ_ETC_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRC_SYS_ID": {
+ "name": "SRC_SYS_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRGS_STAT": {
+ "name": "PRGS_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_CSTM_CD": {
+ "name": "DL_CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_LVL_4": {
+ "name": "PDT_LVL_4",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AS_GRNT_PRD": {
+ "name": "AS_GRNT_PRD",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RL_DL_DT": {
+ "name": "RL_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SA_DT": {
+ "name": "SA_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOV": {
+ "name": "GOV",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_BF_PROJ_NM": {
+ "name": "DL_BF_PROJ_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IMO_NO": {
+ "name": "IMO_NO",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZLOC_CD": {
+ "name": "BIZLOC_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNG_ACOT_DMN": {
+ "name": "MNG_ACOT_DMN",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_DMN": {
+ "name": "BIZ_DMN",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_CNTN_YN": {
+ "name": "CNRT_CNTN_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_RESV_YN": {
+ "name": "CNRT_RESV_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PRGS_YN": {
+ "name": "PROJ_PRGS_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_ACOT_CLSD_DT": {
+ "name": "SYS_ACOT_CLSD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_SCP": {
+ "name": "PROJ_SCP",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOA": {
+ "name": "LOA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_ENGN_TP_CD": {
+ "name": "MN_ENGN_TP_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPD": {
+ "name": "SPD",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GT": {
+ "name": "GT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BP_DL_DT": {
+ "name": "BP_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_GRP": {
+ "name": "SHTYPE_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_EMPNO": {
+ "name": "PROJ_CRTE_REQ_EMPNO",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_DT": {
+ "name": "PROJ_CRTE_REQ_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IO_GB": {
+ "name": "IO_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_PO_NO": {
+ "name": "CSTM_PO_NO",
+ "type": "varchar(35)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GENT_CNT": {
+ "name": "GENT_CNT",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_PRD": {
+ "name": "ORDR_GRNT_PRD",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_FN_DT": {
+ "name": "ORDR_GRNT_FN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_CHRGR": {
+ "name": "DSN_CHRGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_PROJ_NM": {
+ "name": "DL_AF_PROJ_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_RL_CLNT": {
+ "name": "DL_AF_RL_CLNT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_SHPSRV_SCP": {
+ "name": "DL_AF_SHPSRV_SCP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_NTTP": {
+ "name": "DL_AF_NTTP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_CLS": {
+ "name": "DL_AF_CLS",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_CALL_SIGN": {
+ "name": "DL_AF_CALL_SIGN",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_TEL_NO": {
+ "name": "DL_AF_TEL_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_FAX_NO": {
+ "name": "DL_AF_FAX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_EMAIL_ADR": {
+ "name": "DL_AF_EMAIL_ADR",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_WBS_TP": {
+ "name": "PROJ_WBS_TP",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHN_PROJ_TP": {
+ "name": "CHN_PROJ_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_GRNT_FN_DT": {
+ "name": "FIN_GRNT_FN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STDT": {
+ "name": "STDT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_YN": {
+ "name": "SERS_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRO_PROJ_NO": {
+ "name": "PRO_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PBSD_PROJ_NO": {
+ "name": "PBSD_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PBSD_SHIP_NM": {
+ "name": "PBSD_SHIP_NM",
+ "type": "varchar(150)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_PLN_DT": {
+ "name": "PROJ_DL_PLN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_RT_DT": {
+ "name": "PROJ_DL_RT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_AREA": {
+ "name": "TOT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXMPT_AREA": {
+ "name": "EXMPT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXMPT_RAT": {
+ "name": "EXMPT_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNCT_PROJ_NO": {
+ "name": "CNCT_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EQP_DTL_YN": {
+ "name": "EQP_DTL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXP_YN": {
+ "name": "EXP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACT_MH_YN": {
+ "name": "ACT_MH_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPEC": {
+ "name": "SPEC",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSGN_LIFE": {
+ "name": "DSGN_LIFE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WK_ENV_WT_VAL_YN": {
+ "name": "WK_ENV_WT_VAL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRNT_STDT": {
+ "name": "GRNT_STDT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TMH_ADPT_YN": {
+ "name": "TMH_ADPT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZV_YN": {
+ "name": "ZV_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SEC_YN": {
+ "name": "SEC_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_wbs": {
+ "name": "cmctb_proj_wbs",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "WBS_ELMT": {
+ "name": "WBS_ELMT",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "WBS_ELMT_NM": {
+ "name": "WBS_ELMT_NM",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_LVL": {
+ "name": "WBS_LVL",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FLAG": {
+ "name": "FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_INSD_ELMT": {
+ "name": "WBS_INSD_ELMT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HGRK_WBS_ELMT": {
+ "name": "HGRK_WBS_ELMT",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_STAT": {
+ "name": "SYS_STAT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_1": {
+ "name": "WBS_ELMT_1",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_2": {
+ "name": "WBS_ELMT_2",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_3": {
+ "name": "WBS_ELMT_3",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_4": {
+ "name": "WBS_ELMT_4",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_5": {
+ "name": "WBS_ELMT_5",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_6": {
+ "name": "WBS_ELMT_6",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_7": {
+ "name": "WBS_ELMT_7",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_8": {
+ "name": "WBS_ELMT_8",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_9": {
+ "name": "WBS_ELMT_9",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_10": {
+ "name": "WBS_ELMT_10",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_addr": {
+ "name": "cmctb_vendor_addr",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAX_JRDT_ZONE_CD": {
+ "name": "TAX_JRDT_ZONE_CD",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_TMZ": {
+ "name": "ADR_TMZ",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_compny": {
+ "name": "cmctb_vendor_compny",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CTL_ACNT": {
+ "name": "CTL_ACNT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLN_GRP": {
+ "name": "PLN_GRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BF_VNDRCD": {
+ "name": "BF_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_INVC_ORDR": {
+ "name": "OVLAP_INVC_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_MTHD": {
+ "name": "SPLY_MTHD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_HOLD_ORDR": {
+ "name": "SPLY_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_BANK_SHRT_KEY": {
+ "name": "TRD_BANK_SHRT_KEY",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NTN_CD": {
+ "name": "SRCE_TX_NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MIN_ORDR": {
+ "name": "MIN_ORDR",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRT_SPLY_ORDR": {
+ "name": "SPRT_SPLY_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_VNDR_CLR_ORDR": {
+ "name": "CSTM_VNDR_CLR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_CD": {
+ "name": "SRCE_TX_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IATA_BIC_GB": {
+ "name": "IATA_BIC_GB",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TP": {
+ "name": "REP_TP",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOGST_VNDR_TP": {
+ "name": "LOGST_VNDR_TP",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_ACNT_NO": {
+ "name": "VNDR_ACNT_NO",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CHRGR_NM": {
+ "name": "VNDR_CHRGR_NM",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_TELNO": {
+ "name": "ACOT_CHRGR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUTH_GRP": {
+ "name": "AUTH_GRP",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_CALC_DT": {
+ "name": "FIN_IR_CALC_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_ACT_DT": {
+ "name": "FIN_IR_ACT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_FAXNO": {
+ "name": "ACOT_CHRGR_FAXNO",
+ "type": "varchar(31)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_CHRGR_EMAIL": {
+ "name": "MK_CHRGR_EMAIL",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEMO": {
+ "name": "MEMO",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MOFFC_ACNT_NO": {
+ "name": "MOFFC_ACNT_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_vendor_compny_VNDRCD_CO_CD_pk": {
+ "name": "cmctb_vendor_compny_VNDRCD_CO_CD_pk",
+ "columns": [
+ "VNDRCD",
+ "CO_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_general": {
+ "name": "cmctb_vendor_general",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP_TP": {
+ "name": "ACNT_GRP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DTM": {
+ "name": "REG_DTM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TEL_NO": {
+ "name": "REP_TEL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_FAX_NO": {
+ "name": "REP_FAX_NO",
+ "type": "varchar(31)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZR_NO": {
+ "name": "BIZR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_REG_NO": {
+ "name": "CO_REG_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_CD_4": {
+ "name": "TX_CD_4",
+ "type": "varchar(54)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_INST_DT": {
+ "name": "CO_INST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TP": {
+ "name": "VNDR_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_CD": {
+ "name": "GBL_TOP_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_NM": {
+ "name": "GBL_TOP_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_CD": {
+ "name": "DMST_TOP_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_NM": {
+ "name": "DMST_TOP_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_CD": {
+ "name": "BIZ_UOM_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_NM": {
+ "name": "BIZ_UOM_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DNS_NO": {
+ "name": "DNS_NO",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VAT_REG_NO": {
+ "name": "VAT_REG_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GIRO_VNDR_ORDR": {
+ "name": "GIRO_VNDR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNT_VNDRCD": {
+ "name": "PTNT_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_NM": {
+ "name": "QLT_CHRGR_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_TELNO": {
+ "name": "QLT_CHRGR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_EMAIL": {
+ "name": "QLT_CHRGR_EMAIL",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SB_WKA_SEQ": {
+ "name": "SB_WKA_SEQ",
+ "type": "varchar(16)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS_CD": {
+ "name": "OVLAP_CAUS_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_TP": {
+ "name": "DOC_TP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTN_DOC": {
+ "name": "PTN_DOC",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_VER": {
+ "name": "DOC_VER",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INB_FLAG": {
+ "name": "INB_FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_HOLD_ORDR": {
+ "name": "DEL_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_LCTN_CHK_NUM": {
+ "name": "INTL_LCTN_CHK_NUM",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCETX_RP_SEX_KEY": {
+ "name": "SRCETX_RP_SEX_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CNRT_CHRGR_1": {
+ "name": "VNDR_CNRT_CHRGR_1",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CNRT_CHRGR_2": {
+ "name": "VNDR_CNRT_CHRGR_2",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_RESNO": {
+ "name": "REPR_RESNO",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_VLM": {
+ "name": "CO_VLM",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_grp": {
+ "name": "cmctb_vendor_grp",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_GRP_CD": {
+ "name": "BIZ_GRP_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER_ID": {
+ "name": "CRTER_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_inco": {
+ "name": "cmctb_vendor_inco",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDRNM": {
+ "name": "VNDRNM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRTNR_GB": {
+ "name": "PRTNR_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_CD": {
+ "name": "INCO_PRTNR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_1": {
+ "name": "INCO_PRTNR_WKA_1",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_2": {
+ "name": "INCO_PRTNR_WKA_2",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_3": {
+ "name": "INCO_PRTNR_WKA_3",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JBTYPE_CD": {
+ "name": "JBTYPE_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JBTYPE_CD_2": {
+ "name": "JBTYPE_CD_2",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDV_CO_GB": {
+ "name": "INDV_CO_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_FOND_YN": {
+ "name": "INCO_FOND_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_NO": {
+ "name": "DOCK_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OCMP_INP_DT": {
+ "name": "OCMP_INP_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_DUSE_DT": {
+ "name": "INCO_DUSE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDST_INS_PMRAT": {
+ "name": "INDST_INS_PMRAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_PFRM_GRAMT": {
+ "name": "CNRT_PFRM_GRAMT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGE_RAT": {
+ "name": "WGE_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_DEPTCD_1": {
+ "name": "CRSPD_DEPTCD_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_DEPTCD_2": {
+ "name": "CRSPD_DEPTCD_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_TEAM_BLNG": {
+ "name": "CRSPD_TEAM_BLNG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_ITM_1": {
+ "name": "INCO_PRTNR_ITM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_ITM_2": {
+ "name": "INCO_PRTNR_ITM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFC_LOC": {
+ "name": "OFC_LOC",
+ "type": "varchar(240)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_OCMP_CARR": {
+ "name": "REP_OCMP_CARR",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_DUSE_CAUS": {
+ "name": "INCO_DUSE_CAUS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_NO": {
+ "name": "TEL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR1": {
+ "name": "ADR1",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR2": {
+ "name": "ADR2",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OLD_VNDRCD": {
+ "name": "OLD_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TREE_NUM": {
+ "name": "TREE_NUM",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_USR_ID": {
+ "name": "CRTE_USR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_USR_ID": {
+ "name": "CHG_USR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UPR_JBTYPE": {
+ "name": "UPR_JBTYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBYBP": {
+ "name": "ZBYBP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RMK": {
+ "name": "RMK",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WDL_PLN_YN": {
+ "name": "WDL_PLN_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGE_DELY_DVL": {
+ "name": "WGE_DELY_DVL",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESCROW_YN": {
+ "name": "ESCROW_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_porg": {
+ "name": "cmctb_vendor_porg",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORD_CUR": {
+ "name": "PUR_ORD_CUR",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CALC_SHM_GRP": {
+ "name": "CALC_SHM_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GR_BSE_INVC_VR": {
+ "name": "GR_BSE_INVC_VR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AT_PUR_ORD_ORDR": {
+ "name": "AT_PUR_ORD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORD_CNFM_REQ_ORDR": {
+ "name": "ORD_CNFM_REQ_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_CHRGR_NM": {
+ "name": "SALE_CHRGR_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TELNO": {
+ "name": "VNDR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNFM_CTL_KEY": {
+ "name": "CNFM_CTL_KEY",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_CAUS": {
+ "name": "PUR_HOLD_CAUS",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_repremail": {
+ "name": "cmctb_vendor_repremail",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprfax": {
+ "name": "cmctb_vendor_reprfax",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprtel": {
+ "name": "cmctb_vendor_reprtel",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprurl": {
+ "name": "cmctb_vendor_reprurl",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_taxnum": {
+ "name": "cmctb_vendor_taxnum",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_vfpn": {
+ "name": "cmctb_vendor_vfpn",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDR_SUB_NO": {
+ "name": "VNDR_SUB_NO",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ETC_REF_VNDRCD": {
+ "name": "ETC_REF_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_whthx": {
+ "name": "cmctb_vendor_whthx",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SRCE_TX_TP": {
+ "name": "SRCE_TX_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SRCE_TX_REL_ORDR": {
+ "name": "SRCE_TX_REL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RECIP_TP": {
+ "name": "RECIP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_IDENT_NO": {
+ "name": "SRCE_TX_IDENT_NO",
+ "type": "varchar(16)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NO": {
+ "name": "SRCE_TX_NO",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CERT_NO": {
+ "name": "DCHAG_CERT_NO",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_RAT": {
+ "name": "DCHAG_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ST_DT": {
+ "name": "DCHAG_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ED_DT": {
+ "name": "DCHAG_ED_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CAUS": {
+ "name": "DCHAG_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.plftb_estm_proj_mast": {
+ "name": "plftb_estm_proj_mast",
+ "schema": "nonsap",
+ "columns": {
+ "ESTM_PROJ_NO": {
+ "name": "ESTM_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AGND_NO": {
+ "name": "AGND_NO",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_PROJ_NM": {
+ "name": "ESTM_PROJ_NM",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_CLS": {
+ "name": "BIZ_CLS",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REV_NO": {
+ "name": "REV_NO",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_TYPE": {
+ "name": "ESTM_TYPE",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWNER_CD": {
+ "name": "OWNER_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_CNT": {
+ "name": "SERS_CNT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND_CD": {
+ "name": "SKND_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_SIZE": {
+ "name": "SHTYPE_SIZE",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHRTR_CD": {
+ "name": "CHRTR_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NATN_CD": {
+ "name": "NATN_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_3": {
+ "name": "CLS_3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATA_CRTE_GB": {
+ "name": "DATA_CRTE_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INPR_ID": {
+ "name": "FS_INPR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INP_DTM": {
+ "name": "FS_INP_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHGR_ID": {
+ "name": "FIN_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHG_DTM": {
+ "name": "FIN_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_1": {
+ "name": "VSL_VAG_1",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_2": {
+ "name": "VSL_VAG_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_3": {
+ "name": "VSL_VAG_3",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_4": {
+ "name": "VSL_VAG_4",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_APP_ID": {
+ "name": "ESTM_AOM_APP_ID",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT": {
+ "name": "ESTM_AOM_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT_CHGR_ID": {
+ "name": "ESTM_AOM_STAT_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT_CHG_DTM": {
+ "name": "ESTM_AOM_STAT_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TRGT_YN": {
+ "name": "IF_TRGT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "plftb_estm_proj_mast_ESTM_PROJ_NO_pk": {
+ "name": "plftb_estm_proj_mast_ESTM_PROJ_NO_pk",
+ "columns": [
+ "ESTM_PROJ_NO"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "ecc.PR_INFORMATION_T_BID_HEADER": {
+ "name": "PR_INFORMATION_T_BID_HEADER",
+ "schema": "ecc",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PR_INFORMATION_T_BID_HEADER_id_seq",
+ "schema": "ecc",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANFNR": {
+ "name": "ANFNR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EKGRP": {
+ "name": "EKGRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EKORG": {
+ "name": "EKORG",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBSART": {
+ "name": "ZBSART",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZRFQ_TRS_DT": {
+ "name": "ZRFQ_TRS_DT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZRFQ_TRS_TM": {
+ "name": "ZRFQ_TRS_TM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "PR_INFORMATION_T_BID_HEADER_ANFNR_unique": {
+ "name": "PR_INFORMATION_T_BID_HEADER_ANFNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ANFNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "ecc.PR_INFORMATION_T_BID_ITEM": {
+ "name": "PR_INFORMATION_T_BID_ITEM",
+ "schema": "ecc",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PR_INFORMATION_T_BID_ITEM_id_seq",
+ "schema": "ecc",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANFNR": {
+ "name": "ANFNR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ANFPS": {
+ "name": "ANFPS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AUFNR": {
+ "name": "AUFNR",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BANFN": {
+ "name": "BANFN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BANPO": {
+ "name": "BANPO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BPRME": {
+ "name": "BPRME",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "numeric(15, 3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISMM": {
+ "name": "DISMM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EBELP": {
+ "name": "EBELP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KNTTP": {
+ "name": "KNTTP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOSTL": {
+ "name": "KOSTL",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LFDAT": {
+ "name": "LFDAT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MENGE": {
+ "name": "MENGE",
+ "type": "numeric(15, 3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PEINH": {
+ "name": "PEINH",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PERNR": {
+ "name": "PERNR",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POSID": {
+ "name": "POSID",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PREIS": {
+ "name": "PREIS",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSPID": {
+ "name": "PSPID",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SAKTO": {
+ "name": "SAKTO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXZ01": {
+ "name": "TXZ01",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS1": {
+ "name": "WAERS1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS2": {
+ "name": "WAERS2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZCON_NO_PO": {
+ "name": "ZCON_NO_PO",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZREQ_FN": {
+ "name": "ZREQ_FN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZREQ_PO": {
+ "name": "ZREQ_PO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZRSLT_AMT": {
+ "name": "ZRSLT_AMT",
+ "type": "numeric(17, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.employee": {
+ "name": "employee",
+ "schema": "knox",
+ "columns": {
+ "ep_id": {
+ "name": "ep_id",
+ "type": "varchar(25)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "employee_number": {
+ "name": "employee_number",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "given_name": {
+ "name": "given_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sir_name": {
+ "name": "sir_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_code": {
+ "name": "title_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_name": {
+ "name": "title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email_address": {
+ "name": "email_address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "employee_status": {
+ "name": "employee_status",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "employee_type": {
+ "name": "employee_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "account_status": {
+ "name": "account_status",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security_level": {
+ "name": "security_level",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_language": {
+ "name": "preferred_language",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "en_company_name": {
+ "name": "en_company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_department_name": {
+ "name": "en_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_discription": {
+ "name": "en_discription",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_full_name": {
+ "name": "en_full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_given_name": {
+ "name": "en_given_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_grade_name": {
+ "name": "en_grade_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_sir_name": {
+ "name": "en_sir_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_title_name": {
+ "name": "en_title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_name": {
+ "name": "grade_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_title_indi_code": {
+ "name": "grade_title_indi_code",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "job_name": {
+ "name": "job_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "real_name_yn": {
+ "name": "real_name_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "server_location": {
+ "name": "server_location",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_sort_order": {
+ "name": "title_sort_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "knox_employee_company_department_idx": {
+ "name": "knox_employee_company_department_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "department_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_number_idx": {
+ "name": "knox_employee_number_idx",
+ "columns": [
+ {
+ "expression": "employee_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_user_id_idx": {
+ "name": "knox_employee_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_email_idx": {
+ "name": "knox_employee_email_idx",
+ "columns": [
+ {
+ "expression": "email_address",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.organization": {
+ "name": "organization",
+ "schema": "knox",
+ "columns": {
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_level": {
+ "name": "department_level",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_order": {
+ "name": "department_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_company_name": {
+ "name": "en_company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_department_name": {
+ "name": "en_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_manager_title": {
+ "name": "en_manager_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_sub_org_code": {
+ "name": "en_sub_org_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "in_department_code": {
+ "name": "in_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "low_department_yn": {
+ "name": "low_department_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_id": {
+ "name": "manager_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_title": {
+ "name": "manager_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_language": {
+ "name": "preferred_language",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_org_code": {
+ "name": "sub_org_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_org_name": {
+ "name": "sub_org_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upr_department_code": {
+ "name": "upr_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_upr_department_name": {
+ "name": "en_upr_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upr_department_name": {
+ "name": "upr_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_department_yn": {
+ "name": "hidden_department_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corp_code": {
+ "name": "corp_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corp_name": {
+ "name": "corp_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_corp_name": {
+ "name": "en_corp_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "knox_org_company_idx": {
+ "name": "knox_org_company_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "organization_company_code_department_code_pk": {
+ "name": "organization_company_code_department_code_pk",
+ "columns": [
+ "company_code",
+ "department_code"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.title": {
+ "name": "title",
+ "schema": "knox",
+ "columns": {
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title_code": {
+ "name": "title_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title_name": {
+ "name": "title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_title_name": {
+ "name": "en_title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "knox_title_company_idx": {
+ "name": "knox_title_company_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "title_company_code_title_code_pk": {
+ "name": "title_company_code_title_code_pk",
+ "columns": [
+ "company_code",
+ "title_code"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_lines": {
+ "name": "approval_lines",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "aplns": {
+ "name": "aplns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_lines_createdBy_users_id_fk": {
+ "name": "approval_lines_createdBy_users_id_fk",
+ "tableFrom": "approval_lines",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_logs": {
+ "name": "approval_logs",
+ "schema": "knox",
+ "columns": {
+ "ap_inf_id": {
+ "name": "ap_inf_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ep_id": {
+ "name": "ep_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_address": {
+ "name": "email_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "aplns": {
+ "name": "aplns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_template_history": {
+ "name": "approval_template_history",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "templateId": {
+ "name": "templateId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "changeDescription": {
+ "name": "changeDescription",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changedBy": {
+ "name": "changedBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_template_history_templateId_approval_templates_id_fk": {
+ "name": "approval_template_history_templateId_approval_templates_id_fk",
+ "tableFrom": "approval_template_history",
+ "tableTo": "approval_templates",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "templateId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "approval_template_history_changedBy_users_id_fk": {
+ "name": "approval_template_history_changedBy_users_id_fk",
+ "tableFrom": "approval_template_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "changedBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_template_variables": {
+ "name": "approval_template_variables",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "approvalTemplateId": {
+ "name": "approvalTemplateId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variableName": {
+ "name": "variableName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variableType": {
+ "name": "variableType",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "defaultValue": {
+ "name": "defaultValue",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_template_variables_approvalTemplateId_approval_templates_id_fk": {
+ "name": "approval_template_variables_approvalTemplateId_approval_templates_id_fk",
+ "tableFrom": "approval_template_variables",
+ "tableTo": "approval_templates",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "approvalTemplateId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "approval_template_variables_createdBy_users_id_fk": {
+ "name": "approval_template_variables_createdBy_users_id_fk",
+ "tableFrom": "approval_template_variables",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_templates": {
+ "name": "approval_templates",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approvalLineId": {
+ "name": "approvalLineId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_templates_approvalLineId_approval_lines_id_fk": {
+ "name": "approval_templates_approvalLineId_approval_lines_id_fk",
+ "tableFrom": "approval_templates",
+ "tableTo": "approval_lines",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "approvalLineId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "approval_templates_createdBy_users_id_fk": {
+ "name": "approval_templates_createdBy_users_id_fk",
+ "tableFrom": "approval_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.user_domain": {
+ "name": "user_domain",
+ "schema": "public",
+ "values": [
+ "pending",
+ "evcp",
+ "procurement",
+ "sales",
+ "engineering",
+ "partners"
+ ]
+ },
+ "public.score_type": {
+ "name": "score_type",
+ "schema": "public",
+ "values": [
+ "fixed",
+ "variable"
+ ]
+ },
+ "public.qna_category": {
+ "name": "qna_category",
+ "schema": "public",
+ "values": [
+ "engineering",
+ "procurement",
+ "technical_sales"
+ ]
+ },
+ "public.gtc_type": {
+ "name": "gtc_type",
+ "schema": "public",
+ "values": [
+ "standard",
+ "project"
+ ]
+ },
+ "public.review_status": {
+ "name": "review_status",
+ "schema": "public",
+ "values": [
+ "draft",
+ "pending",
+ "reviewing",
+ "approved",
+ "rejected",
+ "revised"
+ ]
+ },
+ "public.consent_action": {
+ "name": "consent_action",
+ "schema": "public",
+ "values": [
+ "consent",
+ "revoke",
+ "update"
+ ]
+ },
+ "public.consent_type": {
+ "name": "consent_type",
+ "schema": "public",
+ "values": [
+ "privacy_policy",
+ "terms_of_service",
+ "marketing",
+ "optional"
+ ]
+ },
+ "public.policy_type": {
+ "name": "policy_type",
+ "schema": "public",
+ "values": [
+ "privacy_policy",
+ "terms_of_service"
+ ]
+ },
+ "public.award_count": {
+ "name": "award_count",
+ "schema": "public",
+ "values": [
+ "single",
+ "multiple"
+ ]
+ },
+ "public.bidding_status": {
+ "name": "bidding_status",
+ "schema": "public",
+ "values": [
+ "bidding_generated",
+ "request_for_quotation",
+ "received_quotation",
+ "set_target_price",
+ "bidding_opened",
+ "bidding_closed",
+ "evaluation_of_bidding",
+ "bidding_disposal",
+ "vendor_selected"
+ ]
+ },
+ "public.bidding_type": {
+ "name": "bidding_type",
+ "schema": "public",
+ "values": [
+ "equipment",
+ "construction",
+ "service",
+ "lease",
+ "steel_stock",
+ "piping",
+ "transport",
+ "waste",
+ "sale"
+ ]
+ },
+ "public.contract_type": {
+ "name": "contract_type",
+ "schema": "public",
+ "values": [
+ "unit_price",
+ "general",
+ "sale"
+ ]
+ },
+ "public.document_type": {
+ "name": "document_type",
+ "schema": "public",
+ "values": [
+ "notice",
+ "specification",
+ "specification_meeting",
+ "contract_draft",
+ "company_proposal",
+ "financial_doc",
+ "technical_doc",
+ "certificate",
+ "pr_document",
+ "spec_document",
+ "evaluation_doc",
+ "bid_attachment",
+ "other"
+ ]
+ },
+ "public.invitation_status": {
+ "name": "invitation_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "sent",
+ "accepted",
+ "declined",
+ "submitted"
+ ]
+ },
+ "public.quantity_unit": {
+ "name": "quantity_unit",
+ "schema": "public",
+ "values": [
+ "ea",
+ "set",
+ "kg",
+ "ton",
+ "m",
+ "m2",
+ "m3",
+ "lot",
+ "other"
+ ]
+ },
+ "public.weight_unit": {
+ "name": "weight_unit",
+ "schema": "public",
+ "values": [
+ "kg",
+ "ton",
+ "lb",
+ "g"
+ ]
+ }
+ },
+ "schemas": {
+ "mdg": "mdg",
+ "soap": "soap",
+ "nonsap": "nonsap",
+ "ecc": "ecc",
+ "knox": "knox"
+ },
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {
+ "public.contracts_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contracts_detail_view_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_name": {
+ "name": "contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "end_date": {
+ "name": "end_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "partial_shipping_allowed": {
+ "name": "partial_shipping_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "partial_payment_allowed": {
+ "name": "partial_payment_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"contracts\".\"id\", \"contracts\".\"contract_no\", \"contracts\".\"contract_name\", \"contracts\".\"status\", \"contracts\".\"start_date\", \"contracts\".\"end_date\", \"contracts\".\"project_id\", \"projects\".\"code\", \"projects\".\"name\", \"contracts\".\"vendor_id\", \"vendors\".\"vendor_name\", \"contracts\".\"payment_terms\", \"contracts\".\"delivery_terms\", \"contracts\".\"delivery_date\", \"contracts\".\"delivery_location\", \"contracts\".\"currency\", \"contracts\".\"total_amount\", \"contracts\".\"discount\", \"contracts\".\"tax\", \"contracts\".\"shipping_fee\", \"contracts\".\"net_total\", \"contracts\".\"partial_shipping_allowed\", \"contracts\".\"partial_payment_allowed\", \"contracts\".\"remarks\", \"contracts\".\"version\", \"contracts\".\"created_at\", \"contracts\".\"updated_at\", EXISTS (\n SELECT 1 \n FROM \"contract_envelopes\" \n WHERE \"contract_envelopes\".\"contract_id\" = \"contracts\".\"id\"\n ) as \"has_signature\", COALESCE((\n SELECT json_agg(\n json_build_object(\n 'id', ci.id,\n 'itemId', ci.item_id,\n 'description', ci.description,\n 'quantity', ci.quantity,\n 'unitPrice', ci.unit_price,\n 'taxRate', ci.tax_rate,\n 'taxAmount', ci.tax_amount,\n 'totalLineAmount', ci.total_line_amount,\n 'remark', ci.remark,\n 'createdAt', ci.created_at,\n 'updatedAt', ci.updated_at\n )\n )\n FROM \"contract_items\" AS ci\n WHERE ci.contract_id = \"contracts\".\"id\"\n ), '[]') as \"items\", COALESCE((\n SELECT json_agg(\n json_build_object(\n 'id', ce.id,\n 'envelopeId', ce.envelope_id,\n 'documentId', ce.document_id,\n 'envelopeStatus', ce.envelope_status,\n 'fileName', ce.file_name,\n 'filePath', ce.file_path,\n 'createdAt', ce.created_at,\n 'updatedAt', ce.updated_at,\n 'signers', (\n SELECT json_agg(\n json_build_object(\n 'id', cs.id,\n 'vendorContactId', cs.vendor_contact_id,\n 'signerType', cs.signer_type,\n 'signerEmail', cs.signer_email,\n 'signerName', cs.signer_name,\n 'signerPosition', cs.signer_position,\n 'signerStatus', cs.signer_status,\n 'signedAt', cs.signed_at\n )\n )\n FROM \"contract_signers\" AS cs\n WHERE cs.envelope_id = ce.id\n )\n )\n )\n FROM \"contract_envelopes\" AS ce\n WHERE ce.contract_id = \"contracts\".\"id\"\n ), '[]') as \"envelopes\" from \"contracts\" left join \"projects\" on \"contracts\".\"project_id\" = \"projects\".\"id\" left join \"vendors\" on \"contracts\".\"vendor_id\" = \"vendors\".\"id\"",
+ "name": "contracts_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.poa_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "poa_detail_view_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_status": {
+ "name": "approval_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"poa\".\"id\", \"poa\".\"contract_no\", \"contracts\".\"project_id\", \"contracts\".\"vendor_id\", \"poa\".\"change_reason\", \"poa\".\"approval_status\", \"contracts\".\"contract_name\" as \"original_contract_name\", \"contracts\".\"status\" as \"original_status\", \"contracts\".\"start_date\" as \"original_start_date\", \"contracts\".\"end_date\" as \"original_end_date\", \"poa\".\"delivery_terms\", \"poa\".\"delivery_date\", \"poa\".\"delivery_location\", \"poa\".\"currency\", \"poa\".\"total_amount\", \"poa\".\"discount\", \"poa\".\"tax\", \"poa\".\"shipping_fee\", \"poa\".\"net_total\", \"poa\".\"created_at\", \"poa\".\"updated_at\", EXISTS (\n SELECT 1 \n FROM \"contract_envelopes\" \n WHERE \"contract_envelopes\".\"contract_id\" = \"poa\".\"id\"\n ) as \"has_signature\" from \"poa\" left join \"contracts\" on \"poa\".\"contract_no\" = \"contracts\".\"contract_no\"",
+ "name": "poa_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.project_approved_vendors": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "name_ko": {
+ "name": "name_ko",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_en": {
+ "name": "name_en",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ship'"
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendors\".\"id\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendors\".\"tax_id\", \"vendors\".\"email\", \"vendors\".\"phone\", \"vendors\".\"status\", \"vendor_types\".\"name_ko\", \"vendor_types\".\"name_en\", \"projects\".\"code\", \"projects\".\"name\", \"projects\".\"type\", \"vendor_pq_submissions\".\"submitted_at\", \"vendor_pq_submissions\".\"approved_at\" from \"vendors\" inner join \"vendor_pq_submissions\" on \"vendor_pq_submissions\".\"vendor_id\" = \"vendors\".\"id\" inner join \"projects\" on \"vendor_pq_submissions\".\"project_id\" = \"projects\".\"id\" left join \"vendor_types\" on \"vendors\".\"vendor_type_id\" = \"vendor_types\".\"id\" where \"vendor_pq_submissions\".\"status\" = 'APPROVED'",
+ "name": "project_approved_vendors",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_investigations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pq_submission_id": {
+ "name": "pq_submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "qm_manager_id": {
+ "name": "qm_manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_status": {
+ "name": "investigation_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "investigation_address": {
+ "name": "investigation_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_method": {
+ "name": "investigation_method",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_start_at": {
+ "name": "scheduled_start_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_end_at": {
+ "name": "scheduled_end_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "forecasted_at": {
+ "name": "forecasted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_result": {
+ "name": "evaluation_result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_notes": {
+ "name": "investigation_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pq_items": {
+ "name": "pq_items",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendor_investigations\".\"id\", \"vendor_investigations\".\"vendor_id\", \"vendor_investigations\".\"pq_submission_id\", \"vendor_investigations\".\"requester_id\", \"vendor_investigations\".\"qm_manager_id\", \"vendor_investigations\".\"investigation_status\", \"vendor_investigations\".\"investigation_address\", \"vendor_investigations\".\"investigation_method\", \"vendor_investigations\".\"scheduled_start_at\", \"vendor_investigations\".\"scheduled_end_at\", \"vendor_investigations\".\"forecasted_at\", \"vendor_investigations\".\"requested_at\", \"vendor_investigations\".\"confirmed_at\", \"vendor_investigations\".\"completed_at\", \"vendor_investigations\".\"evaluation_score\", \"vendor_investigations\".\"evaluation_result\", \"vendor_investigations\".\"investigation_notes\", \"vendor_investigations\".\"created_at\", \"vendor_investigations\".\"updated_at\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendor_pq_submissions\".\"pq_items\", requester.name as \"requesterName\", requester.email as \"requesterEmail\", qm_manager.name as \"qmManagerName\", qm_manager.email as \"qmManagerEmail\", (\n CASE \n WHEN EXISTS (\n SELECT 1 FROM vendor_investigation_attachments via \n WHERE via.investigation_id = \"vendor_investigations\".\"id\"\n ) \n THEN true \n ELSE false \n END\n ) as \"hasAttachments\" from \"vendor_investigations\" left join \"vendors\" on \"vendor_investigations\".\"vendor_id\" = \"vendors\".\"id\" left join users AS requester on \"vendor_investigations\".\"requester_id\" = requester.id left join users AS qm_manager on \"vendor_investigations\".\"qm_manager_id\" = qm_manager.id left join \"vendor_pq_submissions\" on \"vendor_investigations\".\"pq_submission_id\" = \"vendor_pq_submissions\".\"id\"",
+ "name": "vendor_investigations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.cbe_view": {
+ "columns": {},
+ "definition": "select \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"rfq_id\" as \"rfq_id\", \"cbe_evaluations\".\"vendor_id\" as \"vendor_id\", \"cbe_evaluations\".\"total_cost\" as \"total_cost\", \"cbe_evaluations\".\"currency\" as \"currency\", \"cbe_evaluations\".\"payment_terms\" as \"payment_terms\", \"cbe_evaluations\".\"incoterms\" as \"incoterms\", \"cbe_evaluations\".\"result\" as \"result\", \"cbe_evaluations\".\"notes\" as \"notes\", \"cbe_evaluations\".\"evaluated_by\" as \"evaluated_by\", \"cbe_evaluations\".\"evaluated_at\" as \"evaluated_at\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"users\".\"name\" as \"evaluator_name\", \"users\".\"email\" as \"evaluator_email\" from \"cbe_evaluations\" inner join \"rfqs\" on \"cbe_evaluations\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"cbe_evaluations\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" on \"cbe_evaluations\".\"evaluated_by\" = \"users\".\"id\"",
+ "name": "cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfqs_view": {
+ "columns": {},
+ "definition": "select \"rfqs\".\"id\" as \"rfq_id\", \"rfqs\".\"status\" as \"status\", \"rfqs\".\"created_at\" as \"created_at\", \"rfqs\".\"updated_at\" as \"updated_at\", \"rfqs\".\"created_by\" as \"created_by\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"rfqs\".\"parent_rfq_id\" as \"parent_rfq_id\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"users\".\"email\" as \"user_email\", \"users\".\"name\" as \"user_name\", (\n SELECT COUNT(*) \n FROM \"rfq_items\" \n WHERE \"rfq_items\".\"rfq_id\" = \"rfqs\".\"id\"\n ) as \"item_count\", (\n SELECT COUNT(*) \n FROM \"rfq_attachments\" \n WHERE \"rfq_attachments\".\"rfq_id\" = \"rfqs\".\"id\"\n ) as \"attachment_count\" from \"rfqs\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" on \"rfqs\".\"created_by\" = \"users\".\"id\"",
+ "name": "rfqs_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_cbe_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"id\" as \"vendor_response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"result\" as \"cbe_result\", \"cbe_evaluations\".\"notes\" as \"cbe_note\", \"cbe_evaluations\".\"updated_at\" as \"cbe_updated\", \"cbe_evaluations\".\"total_cost\" as \"total_cost\", \"cbe_evaluations\".\"currency\" as \"currency\", \"cbe_evaluations\".\"payment_terms\" as \"payment_terms\", \"cbe_evaluations\".\"incoterms\" as \"incoterms\", \"cbe_evaluations\".\"delivery_schedule\" as \"delivery_schedule\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"cbe_evaluations\" on (\"cbe_evaluations\".\"vendor_id\" = \"vendors\".\"id\" and \"cbe_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\")",
+ "name": "vendor_cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_cbe_view": {
+ "columns": {},
+ "definition": "select \"vendor_responses\".\"id\" as \"response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"vendor_id\" as \"vendor_id\", \"vendor_responses\".\"response_status\" as \"response_status\", \"vendor_responses\".\"notes\" as \"response_notes\", \"vendor_responses\".\"responded_by\" as \"responded_by\", \"vendor_responses\".\"responded_at\" as \"responded_at\", \"vendor_responses\".\"updated_at\" as \"response_updated_at\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"rfqs\".\"due_date\" as \"rfq_due_date\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"status\" as \"vendor_status\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"vendor_commercial_responses\".\"id\" as \"commercial_response_id\", \"vendor_commercial_responses\".\"response_status\" as \"commercial_response_status\", \"vendor_commercial_responses\".\"total_price\" as \"total_price\", \"vendor_commercial_responses\".\"currency\" as \"currency\", \"vendor_commercial_responses\".\"payment_terms\" as \"payment_terms\", \"vendor_commercial_responses\".\"incoterms\" as \"incoterms\", \"vendor_commercial_responses\".\"delivery_period\" as \"delivery_period\", \"vendor_commercial_responses\".\"warranty_period\" as \"warranty_period\", \"vendor_commercial_responses\".\"validity_period\" as \"validity_period\", \"vendor_commercial_responses\".\"price_breakdown\" as \"price_breakdown\", \"vendor_commercial_responses\".\"commercial_notes\" as \"commercial_notes\", \"vendor_commercial_responses\".\"created_at\" as \"commercial_created_at\", \"vendor_commercial_responses\".\"updated_at\" as \"commercial_updated_at\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"attachment_count\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"commercial_response_id\" = \"vendor_commercial_responses\".\"id\"\n ) as \"commercial_attachment_count\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n AND \"vendor_response_attachments\".\"attachment_type\" = 'TECHNICAL_SPEC'\n ) as \"technical_attachment_count\", (\n SELECT MAX(\"uploaded_at\") \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"latest_attachment_date\" from \"vendor_responses\" inner join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_commercial_responses\" on \"vendor_commercial_responses\".\"response_id\" = \"vendor_responses\".\"id\"",
+ "name": "vendor_response_cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_responses_view": {
+ "columns": {},
+ "definition": "select \"vendor_responses\".\"id\" as \"response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"vendor_id\" as \"vendor_id\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"rfqs\".\"due_date\" as \"rfq_due_date\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"created_at\" as \"rfq_created_at\", \"rfqs\".\"updated_at\" as \"rfq_updated_at\", \"rfqs\".\"created_by\" as \"rfq_created_by\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendor_responses\".\"response_status\" as \"response_status\", \"vendor_responses\".\"responded_at\" as \"responded_at\", CASE WHEN \"vendor_technical_responses\".\"id\" IS NOT NULL THEN TRUE ELSE FALSE END as \"has_technical_response\", \"vendor_technical_responses\".\"id\" as \"technical_response_id\", CASE WHEN \"vendor_commercial_responses\".\"id\" IS NOT NULL THEN TRUE ELSE FALSE END as \"has_commercial_response\", \"vendor_commercial_responses\".\"id\" as \"commercial_response_id\", \"vendor_commercial_responses\".\"total_price\" as \"total_price\", \"vendor_commercial_responses\".\"currency\" as \"currency\", \"rfq_evaluations\".\"id\" as \"tbe_id\", \"rfq_evaluations\".\"result\" as \"tbe_result\", \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"result\" as \"cbe_result\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"attachment_count\" from \"vendor_responses\" inner join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_technical_responses\" on \"vendor_technical_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"vendor_commercial_responses\" on \"vendor_commercial_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"rfq_evaluations\" on (\"rfq_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\" and \"rfq_evaluations\".\"vendor_id\" = \"vendor_responses\".\"vendor_id\" and \"rfq_evaluations\".\"eval_type\" = 'TBE') left join \"cbe_evaluations\" on (\"cbe_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\" and \"cbe_evaluations\".\"vendor_id\" = \"vendor_responses\".\"vendor_id\")",
+ "name": "vendor_responses_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_rfq_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\"",
+ "name": "vendor_rfq_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_tbe_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"id\" as \"vendor_response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"vendor_technical_responses\".\"id\" as \"technical_response_id\", \"vendor_technical_responses\".\"response_status\" as \"technical_response_status\", \"vendor_technical_responses\".\"summary\" as \"technical_summary\", \"vendor_technical_responses\".\"notes\" as \"technical_notes\", \"vendor_technical_responses\".\"updated_at\" as \"technical_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"rfq_evaluations\".\"id\" as \"tbe_id\", \"rfq_evaluations\".\"result\" as \"tbe_result\", \"rfq_evaluations\".\"notes\" as \"tbe_note\", \"rfq_evaluations\".\"updated_at\" as \"tbe_updated\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_technical_responses\" on \"vendor_technical_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"rfq_evaluations\" on (\"rfq_evaluations\".\"vendor_id\" = \"vendors\".\"id\" and \"rfq_evaluations\".\"eval_type\" = 'TBE' and \"rfq_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\")",
+ "name": "vendor_tbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.role_view": {
+ "columns": {},
+ "definition": "select \"roles\".\"id\" as \"id\", \"roles\".\"name\" as \"name\", \"roles\".\"description\" as \"description\", \"roles\".\"domain\" as \"domain\", \"roles\".\"created_at\" as \"created_at\", \"vendors\".\"id\" as \"company_id\", \"vendors\".\"vendor_name\" as \"company_name\", COUNT(\"users\".\"id\") as \"user_count\" from \"roles\" left join \"user_roles\" on \"user_roles\".\"role_id\" = \"roles\".\"id\" left join \"users\" on \"users\".\"id\" = \"user_roles\".\"user_id\" left join \"vendors\" on \"roles\".\"company_id\" = \"vendors\".\"id\" group by \"roles\".\"id\", \"vendors\".\"id\"",
+ "name": "role_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.user_view": {
+ "columns": {},
+ "definition": "select \"users\".\"id\" as \"user_id\", \"users\".\"name\" as \"user_name\", \"users\".\"phone\" as \"user_phone\", \"users\".\"email\" as \"user_email\", \"users\".\"domain\" as \"user_domain\", \"users\".\"image_url\" as \"user_image\", \"vendors\".\"id\" as \"company_id\", \"vendors\".\"vendor_name\" as \"company_name\", \n array_agg(\"roles\".\"name\")\n as \"roles\", \"users\".\"created_at\" as \"created_at\" from \"users\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"user_roles\" on \"users\".\"id\" = \"user_roles\".\"user_id\" left join \"roles\" on \"user_roles\".\"role_id\" = \"roles\".\"id\" group by \"users\".\"id\", \"vendors\".\"id\"",
+ "name": "user_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.form_lists_view": {
+ "columns": {},
+ "definition": "select \"tag_type_class_form_mappings\".\"id\" as \"id\", \"tag_type_class_form_mappings\".\"project_id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"tag_type_class_form_mappings\".\"tag_type_label\" as \"tag_type_label\", \"tag_type_class_form_mappings\".\"class_label\" as \"class_label\", \"tag_type_class_form_mappings\".\"form_code\" as \"form_code\", \"tag_type_class_form_mappings\".\"form_name\" as \"form_name\", \"tag_type_class_form_mappings\".\"ep\" as \"ep\", \"tag_type_class_form_mappings\".\"remark\" as \"remark\", \"tag_type_class_form_mappings\".\"created_at\" as \"created_at\", \"tag_type_class_form_mappings\".\"updated_at\" as \"updated_at\" from \"tag_type_class_form_mappings\" inner join \"projects\" on \"tag_type_class_form_mappings\".\"project_id\" = \"projects\".\"id\"",
+ "name": "form_lists_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.view_tag_subfields": {
+ "columns": {
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_description": {
+ "name": "attributes_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expression": {
+ "name": "expression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delimiter": {
+ "name": "delimiter",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"tag_subfields\".\"id\" as \"id\", \"tag_subfields\".\"tag_type_code\", \"tag_types\".\"description\", \"tag_subfields\".\"attributes_id\", \"tag_subfields\".\"attributes_description\", \"tag_subfields\".\"expression\", \"tag_subfields\".\"delimiter\", \"tag_subfields\".\"sort_order\", \"tag_subfields\".\"created_at\", \"tag_subfields\".\"updated_at\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\", \"projects\".\"name\" from \"tag_subfields\" inner join \"tag_types\" on (\"tag_subfields\".\"tag_type_code\" = \"tag_types\".\"code\" and \"tag_subfields\".\"project_id\" = \"tag_types\".\"project_id\") inner join \"projects\" on \"tag_subfields\".\"project_id\" = \"projects\".\"id\"",
+ "name": "view_tag_subfields",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.document_stages_only_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n d.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM documents d\n LEFT JOIN issue_stages ist ON d.id = ist.document_id\n GROUP BY d.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n -- 문서별 스테이지 집계 (리비전 제외)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'description', ist.description,\n 'notes', ist.notes,\n 'reminderDays', ist.reminder_days\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.doc_number,\n d.drawing_kind,\n d.vendor_doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n -- 프로젝트 및 벤더 정보\n p.code as project_code,\n v.vendor_name as vendor_name,\n v.vendor_code as vendor_code,\n c.vendor_id as vendor_id,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 전체 스테이지 (리비전 제외)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 메타 정보\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- 프로젝트 및 벤더 정보 JOIN\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN projects p ON c.project_id = p.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n -- 스테이지 관련 정보 JOIN\n LEFT JOIN document_stats ds ON d.id = ds.document_id\n LEFT JOIN current_stage_info csi ON d.id = csi.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "document_stages_only_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.document_stages_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_count": {
+ "name": "stage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_list": {
+ "name": "stage_list",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT\n d.id AS document_id,\n d.doc_number,\n d.title,\n d.status,\n d.issued_date,\n d.contract_id,\n (SELECT COUNT(*) FROM issue_stages WHERE document_id = d.id) AS stage_count,\n COALESCE( \n (SELECT json_agg(i.stage_name) FROM issue_stages i WHERE i.document_id = d.id), \n '[]'\n ) AS stage_list,\n d.created_at,\n d.updated_at\n FROM documents d\n",
+ "name": "document_stages_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.enhanced_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision": {
+ "name": "latest_revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_status": {
+ "name": "latest_revision_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_name": {
+ "name": "latest_revision_uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_submitted_date": {
+ "name": "latest_submitted_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n d.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM documents d\n LEFT JOIN issue_stages ist ON d.id = ist.document_id\n GROUP BY d.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n latest_revision_info AS (\n SELECT DISTINCT ON (ist.document_id)\n ist.document_id,\n r.id as latest_revision_id,\n r.revision as latest_revision,\n r.revision_status as latest_revision_status,\n r.uploader_name as latest_revision_uploader_name,\n r.submitted_date as latest_submitted_date\n FROM revisions r\n JOIN issue_stages ist ON r.issue_stage_id = ist.id\n ORDER BY ist.document_id, r.created_at DESC\n ),\n -- 리비전별 첨부파일 집계\n revision_attachments AS (\n SELECT \n r.id as revision_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', da.id,\n 'revisionId', da.revision_id,\n 'fileName', da.file_name,\n 'filePath', da.file_path,\n 'fileSize', da.file_size,\n 'fileType', da.file_type,\n 'createdAt', da.created_at,\n 'updatedAt', da.updated_at\n ) ORDER BY da.created_at\n ) FILTER (WHERE da.id IS NOT NULL),\n '[]'::json\n ) as attachments\n FROM revisions r\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY r.id\n ),\n -- 스테이지별 리비전 집계 (첨부파일 포함)\n stage_revisions AS (\n SELECT \n ist.id as stage_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', r.id,\n 'issueStageId', r.issue_stage_id,\n 'revision', r.revision,\n 'uploaderType', r.uploader_type,\n 'uploaderId', r.uploader_id,\n 'uploaderName', r.uploader_name,\n 'comment', r.comment,\n 'usage', r.usage,\n 'revisionStatus', r.revision_status,\n 'submittedDate', r.submitted_date,\n 'uploadedAt', r.uploaded_at,\n 'approvedDate', r.approved_date,\n 'reviewStartDate', r.review_start_date,\n 'rejectedDate', r.rejected_date,\n 'reviewerId', r.reviewer_id,\n 'reviewerName', r.reviewer_name,\n 'reviewComments', r.review_comments,\n 'createdAt', r.created_at,\n 'updatedAt', r.updated_at,\n 'attachments', ra.attachments\n ) ORDER BY r.created_at\n ) FILTER (WHERE r.id IS NOT NULL),\n '[]'::json\n ) as revisions\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN revision_attachments ra ON r.id = ra.revision_id\n GROUP BY ist.id\n ),\n -- 문서별 스테이지 집계 (리비전 포함)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'revisions', sr.revisions\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n LEFT JOIN stage_revisions sr ON ist.id = sr.stage_id\n GROUP BY ist.document_id\n ),\n attachment_counts AS (\n SELECT \n ist.document_id,\n COUNT(da.id) as attachment_count\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.doc_number,\n d.drawing_kind,\n d.vendor_doc_number, -- ✅ 벤더 문서 번호 추가\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n\n d.c_gbn,\n d.d_gbn,\n d.degree_gbn,\n d.dept_gbn,\n d.s_gbn,\n d.j_gbn,\n\n\n \n -- ✅ 프로젝트 및 벤더 정보 추가\n c.project_id as project_id,\n p.code as project_code,\n v.vendor_name as vendor_name,\n v.vendor_code as vendor_code,\n c.vendor_id as vendor_id,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 최신 리비전 정보\n lri.latest_revision_id,\n lri.latest_revision,\n lri.latest_revision_status,\n lri.latest_revision_uploader_name,\n lri.latest_submitted_date,\n \n -- 전체 스테이지 (리비전 및 첨부파일 포함)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 기타\n COALESCE(ac.attachment_count, 0) as attachment_count,\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- ✅ contracts, projects, vendors 테이블 JOIN 추가\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN projects p ON c.project_id = p.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n LEFT JOIN document_stats ds ON d.id = ds.document_id\n LEFT JOIN current_stage_info csi ON d.id = csi.document_id\n LEFT JOIN latest_revision_info lri ON d.id = lri.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n LEFT JOIN attachment_counts ac ON d.id = ac.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "enhanced_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.simplified_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_move_gbn": {
+ "name": "drawing_move_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discipline": {
+ "name": "discipline",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_document_id": {
+ "name": "external_document_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_system_type": {
+ "name": "external_system_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_synced_at": {
+ "name": "external_synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_drawing_no": {
+ "name": "shi_drawing_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager": {
+ "name": "manager",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_enm": {
+ "name": "manager_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_no": {
+ "name": "manager_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group": {
+ "name": "register_group",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group_id": {
+ "name": "register_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_no": {
+ "name": "create_user_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_id": {
+ "name": "create_user_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_enm": {
+ "name": "create_user_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_id": {
+ "name": "first_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_name": {
+ "name": "first_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_plan_date": {
+ "name": "first_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_actual_date": {
+ "name": "first_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_id": {
+ "name": "second_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_name": {
+ "name": "second_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_plan_date": {
+ "name": "second_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_actual_date": {
+ "name": "second_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH \n -- 리비전별 첨부파일 집계\n revision_attachments AS (\n SELECT \n r.id as revision_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', da.id,\n 'revisionId', da.revision_id,\n 'fileName', da.file_name,\n 'filePath', da.file_path,\n 'fileSize', da.file_size,\n 'fileType', da.file_type,\n 'createdAt', da.created_at,\n 'updatedAt', da.updated_at\n ) ORDER BY da.created_at\n ) FILTER (WHERE da.id IS NOT NULL),\n '[]'::json\n ) as attachments\n FROM revisions r\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY r.id\n ),\n \n -- 스테이지별 리비전 집계 (첨부파일 포함)\n stage_revisions AS (\n SELECT \n ist.id as stage_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', r.id,\n 'issueStageId', r.issue_stage_id,\n 'revision', r.revision,\n 'uploaderType', r.uploader_type,\n 'uploaderId', r.uploader_id,\n 'uploaderName', r.uploader_name,\n 'comment', r.comment,\n 'usage', r.usage,\n 'usageType', r.usage_type,\n 'revisionStatus', r.revision_status,\n 'submittedDate', r.submitted_date,\n 'uploadedAt', r.uploaded_at,\n 'approvedDate', r.approved_date,\n 'reviewStartDate', r.review_start_date,\n 'rejectedDate', r.rejected_date,\n 'reviewerId', r.reviewer_id,\n 'reviewerName', r.reviewer_name,\n 'reviewComments', r.review_comments,\n 'createdAt', r.created_at,\n 'updatedAt', r.updated_at,\n 'attachments', COALESCE(ra.attachments, '[]'::json)\n ) ORDER BY r.created_at\n ) FILTER (WHERE r.id IS NOT NULL),\n '[]'::json\n ) as revisions\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN revision_attachments ra ON r.id = ra.revision_id\n GROUP BY ist.id\n ),\n \n -- 문서별 스테이지 집계 (리비전 포함)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'revisions', COALESCE(sr.revisions, '[]'::json)\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n LEFT JOIN stage_revisions sr ON ist.id = sr.stage_id\n GROUP BY ist.document_id\n ),\n \n -- 첫 번째 스테이지 정보 (drawingKind에 따라 다른 조건)\n first_stage_info AS (\n SELECT \n document_id,\n first_stage_id,\n first_stage_name,\n first_stage_plan_date,\n first_stage_actual_date\n FROM (\n SELECT \n ist.document_id,\n ist.id as first_stage_id,\n ist.stage_name as first_stage_name,\n ist.plan_date as first_stage_plan_date,\n ist.actual_date as first_stage_actual_date,\n ROW_NUMBER() OVER (PARTITION BY ist.document_id ORDER BY ist.stage_order ASC) as rn\n FROM issue_stages ist\n JOIN documents d ON ist.document_id = d.id\n WHERE \n (d.drawing_kind = 'B4' AND LOWER(ist.stage_name) LIKE '%pre%') OR\n (d.drawing_kind = 'B3' AND LOWER(ist.stage_name) LIKE '%approval%') OR\n (d.drawing_kind = 'B5' AND LOWER(ist.stage_name) LIKE '%first%')\n ) ranked\n WHERE rn = 1\n ),\n \n -- 두 번째 스테이지 정보 (drawingKind에 따라 다른 조건)\n second_stage_info AS (\n SELECT \n document_id,\n second_stage_id,\n second_stage_name,\n second_stage_plan_date,\n second_stage_actual_date\n FROM (\n SELECT \n ist.document_id,\n ist.id as second_stage_id,\n ist.stage_name as second_stage_name,\n ist.plan_date as second_stage_plan_date,\n ist.actual_date as second_stage_actual_date,\n ROW_NUMBER() OVER (PARTITION BY ist.document_id ORDER BY ist.stage_order ASC) as rn\n FROM issue_stages ist\n JOIN documents d ON ist.document_id = d.id\n WHERE \n (d.drawing_kind = 'B4' AND LOWER(ist.stage_name) LIKE '%work%') OR\n (d.drawing_kind = 'B3' AND LOWER(ist.stage_name) LIKE '%work%') OR\n (d.drawing_kind = 'B5' AND LOWER(ist.stage_name) LIKE '%second%')\n ) ranked\n WHERE rn = 1\n ),\n \n -- 첨부파일 수 집계\n attachment_counts AS (\n SELECT \n ist.document_id,\n COUNT(da.id) as attachment_count\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.project_id,\n d.vendor_id,\n d.doc_number,\n d.drawing_kind,\n d.drawing_move_gbn,\n d.discipline,\n d.vendor_doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n -- 외부 시스템 연동 정보\n d.external_document_id,\n d.external_system_type,\n d.external_synced_at,\n \n -- DOLCE 응답의 추가 정보들\n d.shi_drawing_no,\n d.manager,\n d.manager_enm,\n d.manager_no,\n d.register_group,\n d.register_group_id,\n \n -- 생성자 정보\n d.create_user_no,\n d.create_user_id,\n d.create_user_enm,\n \n -- 프로젝트 및 벤더 정보\n p.code as project_code,\n v.vendor_name,\n v.vendor_code,\n \n -- B4 전용 필드들\n d.c_gbn,\n d.d_gbn,\n d.degree_gbn,\n d.dept_gbn,\n d.s_gbn,\n d.j_gbn,\n \n -- 첫 번째 스테이지 정보\n fsi.first_stage_id,\n fsi.first_stage_name,\n fsi.first_stage_plan_date,\n fsi.first_stage_actual_date,\n \n -- 두 번째 스테이지 정보\n ssi.second_stage_id,\n ssi.second_stage_name,\n ssi.second_stage_plan_date,\n ssi.second_stage_actual_date,\n \n -- 전체 스테이지 (리비전 및 첨부파일 포함)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 기타\n COALESCE(ac.attachment_count, 0) as attachment_count,\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- projects, vendors 테이블 JOIN (projectId가 이제 documents에 직접 있음)\n LEFT JOIN projects p ON d.project_id = p.id AND p.type = 'ship'\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n -- 스테이지 정보 JOIN\n LEFT JOIN first_stage_info fsi ON d.id = fsi.document_id\n LEFT JOIN second_stage_info ssi ON d.id = ssi.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n LEFT JOIN attachment_counts ac ON d.id = ac.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "simplified_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.stage_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n sd.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM stage_documents sd\n LEFT JOIN stage_issue_stages ist ON sd.id = ist.document_id\n GROUP BY sd.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM stage_issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n -- 문서별 스테이지 집계 (리비전 제외)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'description', ist.description,\n 'notes', ist.notes,\n 'reminderDays', ist.reminder_days\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM stage_issue_stages ist\n GROUP BY ist.document_id\n )\n \n SELECT \n sd.id as document_id,\n sd.doc_number,\n sd.vendor_doc_number,\n sd.title,\n sd.status,\n sd.issued_date,\n \n -- 프로젝트 및 벤더 정보 (직접 참조로 간소화)\n sd.project_id,\n sd.contract_id,\n p.code as project_code,\n sd.vendor_id,\n v.vendor_name,\n v.vendor_code,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 전체 스테이지 (리비전 제외)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 메타 정보\n sd.created_at,\n sd.updated_at\n \n FROM stage_documents sd\n -- 간소화된 JOIN (vendors는 vendor_id로 직접 조인)\n LEFT JOIN projects p ON sd.project_id = p.id\n LEFT JOIN vendors v ON sd.vendor_id = v.id\n \n -- 스테이지 관련 정보 JOIN\n LEFT JOIN document_stats ds ON sd.id = ds.document_id\n LEFT JOIN current_stage_info csi ON sd.id = csi.document_id\n LEFT JOIN stage_aggregation sa ON sd.id = sa.document_id\n \n ORDER BY sd.created_at DESC\n",
+ "name": "stage_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.sync_status_view": {
+ "columns": {
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_changes": {
+ "name": "total_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pending_changes": {
+ "name": "pending_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "synced_changes": {
+ "name": "synced_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "failed_changes": {
+ "name": "failed_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_sync_at": {
+ "name": "last_sync_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "next_sync_at": {
+ "name": "next_sync_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_enabled": {
+ "name": "sync_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n WITH change_stats AS (\n SELECT \n cl.vendor_id,\n sc.target_system,\n COUNT(*) as total_changes,\n COUNT(CASE WHEN cl.is_synced = false AND cl.sync_attempts < sc.retry_max_attempts THEN 1 END) as pending_changes,\n COUNT(CASE WHEN cl.is_synced = true THEN 1 END) as synced_changes,\n COUNT(CASE WHEN cl.sync_attempts >= sc.retry_max_attempts AND cl.is_synced = false THEN 1 END) as failed_changes,\n MAX(cl.synced_at) as last_sync_at\n FROM change_logs cl\n CROSS JOIN sync_configs sc \n WHERE cl.vendor_id = sc.vendor_id\n AND (cl.target_systems IS NULL OR cl.target_systems @> to_jsonb(ARRAY[sc.target_system]))\n GROUP BY cl.vendor_id, sc.target_system\n )\n SELECT \n cs.project_id,\n cs.target_system,\n COALESCE(cs.total_changes, 0) as total_changes,\n COALESCE(cs.pending_changes, 0) as pending_changes,\n COALESCE(cs.synced_changes, 0) as synced_changes,\n COALESCE(cs.failed_changes, 0) as failed_changes,\n cs.last_sync_at,\n CASE \n WHEN sc.sync_enabled = true AND sc.last_successful_sync IS NOT NULL \n THEN sc.last_successful_sync + (sc.sync_interval_minutes || ' minutes')::interval\n ELSE NULL\n END as next_sync_at,\n sc.sync_enabled\n FROM sync_configs sc\n LEFT JOIN change_stats cs ON sc.vendor_id = cs.vendor_id AND sc.target_system = cs.target_system\n",
+ "name": "sync_status_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_documents_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latest_stage_id": {
+ "name": "latest_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_name": {
+ "name": "latest_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_plan_date": {
+ "name": "latest_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_actual_date": {
+ "name": "latest_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision": {
+ "name": "latest_revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_type": {
+ "name": "latest_revision_uploader_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_name": {
+ "name": "latest_revision_uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT \n d.id, \n d.doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n (SELECT id FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_id,\n (SELECT stage_name FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_name,\n (SELECT plan_date FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_plan_date,\n (SELECT actual_date FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_actual_date,\n \n (SELECT r.id FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_id,\n (SELECT r.revision FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision,\n (SELECT r.uploader_type FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_uploader_type,\n (SELECT r.uploader_name FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_uploader_name,\n \n (SELECT COUNT(*) FROM document_attachments a JOIN revisions r ON a.revision_id = r.id JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id) AS attachment_count,\n \n d.created_at,\n d.updated_at\n FROM documents d\n JOIN contracts c ON d.contract_id = c.id\n ",
+ "name": "vendor_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_candidates_with_vendor_info": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'COLLECTED'"
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendor_candidates\".\"id\", \"vendor_candidates\".\"company_name\", \"vendor_candidates\".\"contact_email\", \"vendor_candidates\".\"contact_phone\", \"vendor_candidates\".\"tax_id\", \"vendor_candidates\".\"address\", \"vendor_candidates\".\"country\", \"vendor_candidates\".\"source\", \"vendor_candidates\".\"status\", \"vendor_candidates\".\"items\", \"vendor_candidates\".\"remark\", \"vendor_candidates\".\"created_at\", \"vendor_candidates\".\"updated_at\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendors\".\"created_at\" as \"vendor_created_at\", (\n SELECT l2.\"created_at\"\n FROM \"vendor_candidate_logs\" l2\n WHERE l2.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l2.\"action\" = 'status_change'\n ORDER BY l2.\"created_at\" DESC\n LIMIT 1\n ) as \"last_status_change_at\", (\n SELECT u.\"name\"\n FROM \"users\" u\n JOIN \"vendor_candidate_logs\" l3\n ON l3.\"user_id\" = u.\"id\"\n WHERE l3.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l3.\"action\" = 'status_change'\n ORDER BY l3.\"created_at\" DESC\n LIMIT 1\n ) as \"last_status_change_by\", (\n SELECT l4.\"created_at\"\n FROM \"vendor_candidate_logs\" l4\n WHERE l4.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l4.\"action\" = 'invite_sent'\n ORDER BY l4.\"created_at\" DESC\n LIMIT 1\n ) as \"last_invitation_at\", (\n SELECT u2.\"name\"\n FROM \"users\" u2\n JOIN \"vendor_candidate_logs\" l5\n ON l5.\"user_id\" = u2.\"id\"\n WHERE l5.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l5.\"action\" = 'invite_sent'\n ORDER BY l5.\"created_at\" DESC\n LIMIT 1\n ) as \"last_invitation_by\" from \"vendor_candidates\" left join \"vendors\" on \"vendor_candidates\".\"vendor_id\" = \"vendors\".\"id\"",
+ "name": "vendor_candidates_with_vendor_info",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "business_size": {
+ "name": "business_size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corporate_registration_number": {
+ "name": "corporate_registration_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_agency": {
+ "name": "credit_agency",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_rating": {
+ "name": "credit_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cash_flow_rating": {
+ "name": "cash_flow_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"id\", \"vendor_name\", \"vendor_code\", \"tax_id\", \"address\", \"business_size\", \"country\", \"phone\", \"email\", \"website\", \"status\", \"representative_name\", \"representative_birth\", \"representative_email\", \"representative_phone\", \"corporate_registration_number\", \"credit_agency\", \"credit_rating\", \"cash_flow_rating\", \"created_at\", \"updated_at\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', c.id,\n 'contactName', c.contact_name,\n 'contactPosition', c.contact_position,\n 'contactEmail', c.contact_email,\n 'contactPhone', c.contact_phone,\n 'isPrimary', c.is_primary\n )\n ),\n '[]'::json\n )\n FROM vendor_contacts c\n WHERE c.vendor_id = vendors.id)\n as \"contacts\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', a.id,\n 'fileName', a.file_name,\n 'filePath', a.file_path,\n 'attachmentType', a.attachment_type,\n 'createdAt', a.created_at\n )\n ORDER BY a.attachment_type, a.created_at DESC\n ),\n '[]'::json\n )\n FROM vendor_attachments a\n WHERE a.vendor_id = vendors.id)\n as \"attachments\", \n (SELECT COUNT(*)\n FROM vendor_attachments a\n WHERE a.vendor_id = vendors.id)\n as \"attachment_count\", \n (SELECT COUNT(*) \n FROM vendor_contacts c\n WHERE c.vendor_id = vendors.id)\n as \"contact_count\" from \"vendors\"",
+ "name": "vendor_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_items_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"vendor_possible_items\".\"id\", \"vendor_possible_items\".\"vendor_id\", \"items\".\"item_name\", \"items\".\"item_code\", \"items\".\"description\", \"vendor_possible_items\".\"created_at\", \"vendor_possible_items\".\"updated_at\" from \"vendor_possible_items\" left join \"items\" on \"vendor_possible_items\".\"item_code\" = \"items\".\"item_code\"",
+ "name": "vendor_items_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_materials_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"vendor_possible_materials\".\"id\", \"vendor_possible_materials\".\"vendor_id\", \"materials\".\"item_name\", \"materials\".\"item_code\", \"materials\".\"description\", \"materials\".\"unit_of_measure\", \"materials\".\"steel_type\", \"materials\".\"grade_material\", \"vendor_possible_materials\".\"created_at\", \"vendor_possible_materials\".\"updated_at\" from \"vendor_possible_materials\" left join \"materials\" on \"vendor_possible_materials\".\"item_code\" = \"materials\".\"item_code\"",
+ "name": "vendor_materials_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendors_with_types": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"tax_id\" as \"tax_id\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"phone\" as \"phone\", \"vendors\".\"email\" as \"email\", \"vendors\".\"business_size\" as \"business_size\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"status\", \"vendors\".\"vendor_type_id\" as \"vendor_type_id\", \"vendors\".\"representative_name\" as \"representative_name\", \"vendors\".\"representative_birth\" as \"representative_birth\", \"vendors\".\"representative_email\" as \"representative_email\", \"vendors\".\"representative_phone\" as \"representative_phone\", \"vendors\".\"corporate_registration_number\" as \"corporate_registration_number\", \"vendors\".\"items\" as \"items\", \"vendors\".\"credit_agency\" as \"credit_agency\", \"vendors\".\"credit_rating\" as \"credit_rating\", \"vendors\".\"cash_flow_rating\" as \"cash_flow_rating\", \"vendors\".\"created_at\" as \"created_at\", \"vendors\".\"updated_at\" as \"updated_at\", \"vendor_types\".\"name_ko\" as \"vendor_type_name\", \"vendor_types\".\"name_en\" as \"vendor_type_name_en\", \"vendor_types\".\"code\" as \"vendor_type_code\", \n CASE\n WHEN \"vendors\".\"status\" = 'ACTIVE' THEN '정규업체'\n WHEN \"vendors\".\"status\" IN ('INACTIVE', 'BLACKLISTED', 'REJECTED') THEN ''\n ELSE '잠재업체'\n END\n as \"vendor_category\" from \"vendors\" left join \"vendor_types\" on \"vendors\".\"vendor_type_id\" = \"vendor_types\".\"id\"",
+ "name": "vendors_with_types",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.basic_contract_view": {
+ "columns": {},
+ "definition": "select \"basic_contract\".\"id\" as \"id\", \"basic_contract\".\"template_id\" as \"template_id\", \"basic_contract\".\"vendor_id\" as \"vendor_id\", \"basic_contract\".\"requested_by\" as \"requested_by\", \"basic_contract\".\"status\" as \"basic_contract_status\", \"basic_contract\".\"created_at\" as \"created_at\", \"basic_contract\".\"updated_at\" as \"updated_at\", \"basic_contract\".\"completed_at\" as \"completed_at\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"email\" as \"vendor_email\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"users\".\"name\" as \"requested_by_name\", \"basic_contract_templates\".\"template_name\" as \"template_name\", \"basic_contract_templates\".\"revision\" as \"template_revision\", \"basic_contract_templates\".\"status\" as \"template_status\", \"basic_contract_templates\".\"validity_period\" as \"validity_period\", \"basic_contract_templates\".\"legal_review_required\" as \"legal_review_required\", \"basic_contract_templates\".\"shipbuilding_applicable\" as \"shipbuilding_applicable\", \"basic_contract_templates\".\"wind_applicable\" as \"wind_applicable\", \"basic_contract_templates\".\"pc_applicable\" as \"pc_applicable\", \"basic_contract_templates\".\"nb_applicable\" as \"nb_applicable\", \"basic_contract_templates\".\"rc_applicable\" as \"rc_applicable\", \"basic_contract_templates\".\"gy_applicable\" as \"gy_applicable\", \"basic_contract_templates\".\"sys_applicable\" as \"sys_applicable\", \"basic_contract_templates\".\"infra_applicable\" as \"infra_applicable\", \"basic_contract_templates\".\"file_path\" as \"template_file_path\", \"basic_contract_templates\".\"file_name\" as \"template_file_name\", \"basic_contract\".\"file_path\" as \"signed_file_path\", \"basic_contract\".\"file_name\" as \"signed_file_name\", \"basic_contract_templates\".\"created_at\" as \"template_created_at\", \"basic_contract_templates\".\"created_by\" as \"template_created_by\", \"basic_contract_templates\".\"updated_at\" as \"template_updated_at\", \"basic_contract_templates\".\"updated_by\" as \"template_updated_by\", \"basic_contract_templates\".\"disposed_at\" as \"template_disposed_at\", \"basic_contract_templates\".\"restored_at\" as \"template_restored_at\" from \"basic_contract\" left join \"vendors\" on \"basic_contract\".\"vendor_id\" = \"vendors\".\"id\" left join \"users\" on \"basic_contract\".\"requested_by\" = \"users\".\"id\" left join \"basic_contract_templates\" on \"basic_contract\".\"template_id\" = \"basic_contract_templates\".\"id\"",
+ "name": "basic_contract_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.pr_items_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_item": {
+ "name": "rfq_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item": {
+ "name": "pr_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_no": {
+ "name": "pr_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_category": {
+ "name": "material_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "acc": {
+ "name": "acc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "size": {
+ "name": "size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gross_weight": {
+ "name": "gross_weight",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "gw_uom": {
+ "name": "gw_uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_no": {
+ "name": "spec_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_url": {
+ "name": "spec_url",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tracking_no": {
+ "name": "tracking_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_yn": {
+ "name": "major_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "project_def": {
+ "name": "project_def",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_sc": {
+ "name": "project_sc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_kl": {
+ "name": "project_kl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_lc": {
+ "name": "project_lc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_dl": {
+ "name": "project_dl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"pr_items\".\"id\", \"pr_items\".\"procurement_rfqs_id\", \"pr_items\".\"rfq_item\", \"pr_items\".\"pr_item\", \"pr_items\".\"pr_no\", \"pr_items\".\"material_code\", \"pr_items\".\"material_category\", \"pr_items\".\"acc\", \"pr_items\".\"material_description\", \"pr_items\".\"size\", \"pr_items\".\"delivery_date\", \"pr_items\".\"quantity\", \"pr_items\".\"uom\", \"pr_items\".\"gross_weight\", \"pr_items\".\"gw_uom\", \"pr_items\".\"spec_no\", \"pr_items\".\"spec_url\", \"pr_items\".\"tracking_no\", \"pr_items\".\"major_yn\", \"pr_items\".\"project_def\", \"pr_items\".\"project_sc\", \"pr_items\".\"project_kl\", \"pr_items\".\"project_lc\", \"pr_items\".\"project_dl\", \"pr_items\".\"remark\", \"procurement_rfqs\".\"rfq_code\", \"procurement_rfqs\".\"item_code\", \"procurement_rfqs\".\"item_name\" from \"pr_items\" left join \"procurement_rfqs\" on \"pr_items\".\"procurement_rfqs_id\" = \"procurement_rfqs\".\"id\"",
+ "name": "pr_items_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.procurement_rfq_details_view": {
+ "columns": {},
+ "definition": "select \"rfq_details\".\"id\" as \"detail_id\", \"rfqs\".\"id\" as \"rfq_id\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"rfqs\".\"item_code\" as \"item_code\", \"rfqs\".\"item_name\" as \"item_name\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"country\" as \"vendor_country\", \"rfq_details\".\"currency\" as \"currency\", \"payment_terms\".\"code\" as \"payment_terms_code\", \"payment_terms\".\"description\" as \"payment_terms_description\", \"incoterms\".\"code\" as \"incoterms_code\", \"incoterms\".\"description\" as \"incoterms_description\", \"rfq_details\".\"incoterms_detail\" as \"incoterms_detail\", \"rfq_details\".\"delivery_date\" as \"delivery_date\", \"rfq_details\".\"tax_code\" as \"tax_code\", \"rfq_details\".\"place_of_shipping\" as \"place_of_shipping\", \"rfq_details\".\"place_of_destination\" as \"place_of_destination\", \"rfq_details\".\"material_price_related_yn\" as \"material_price_related_yn\", \"updated_by_user\".\"name\" as \"updated_by_user_name\", \"rfq_details\".\"updated_at\" as \"updated_at\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"rfqs\".\"id\"\n ) as \"pr_items_count\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"rfqs\".\"id\" \n AND major_yn = true\n ) as \"major_items_count\", (\n SELECT COUNT(*) \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"comment_count\", (\n SELECT created_at \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"last_comment_date\", (\n SELECT created_at \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\" AND is_vendor_comment = true\n ORDER BY created_at DESC LIMIT 1\n ) as \"last_vendor_comment_date\", (\n SELECT COUNT(*) \n FROM procurement_rfq_attachments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"attachment_count\", (\n SELECT COUNT(*) > 0\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"has_quotation\", (\n SELECT status\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"quotation_status\", (\n SELECT total_price\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"quotation_total_price\", (\n SELECT quotation_version\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY quotation_version DESC LIMIT 1\n ) as \"quotation_version\", (\n SELECT COUNT(DISTINCT quotation_version)\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"quotation_version_count\", (\n SELECT created_at\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY quotation_version DESC LIMIT 1\n ) as \"last_quotation_date\" from \"procurement_rfq_details\" \"rfq_details\" left join \"procurement_rfqs\" \"rfqs\" on \"rfq_details\".\"procurement_rfqs_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendors\" on \"rfq_details\".\"vendors_id\" = \"vendors\".\"id\" left join \"payment_terms\" on \"rfq_details\".\"payment_terms_code\" = \"payment_terms\".\"code\" left join \"incoterms\" on \"rfq_details\".\"incoterms_code\" = \"incoterms\".\"code\" left join \"users\" \"updated_by_user\" on \"rfq_details\".\"updated_by\" = \"updated_by_user\".\"id\"",
+ "name": "procurement_rfq_details_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.procurement_rfqs_view": {
+ "columns": {},
+ "definition": "select \"procurement_rfqs\".\"id\" as \"id\", \"procurement_rfqs\".\"rfq_code\" as \"rfq_code\", \"procurement_rfqs\".\"series\" as \"series\", \"procurement_rfqs\".\"rfq_sealed_yn\" as \"rfq_sealed_yn\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"procurement_rfqs\".\"item_code\" as \"item_code\", \"procurement_rfqs\".\"item_name\" as \"item_name\", \"procurement_rfqs\".\"status\" as \"status\", \"procurement_rfqs\".\"pic_code\" as \"pic_code\", \"procurement_rfqs\".\"rfq_send_date\" as \"rfq_send_date\", \"procurement_rfqs\".\"due_date\" as \"due_date\", (\n SELECT MIN(submitted_at)\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"procurement_rfqs\".\"id\"\n AND submitted_at IS NOT NULL\n ) as \"earliest_quotation_submitted_at\", \"created_by_user\".\"name\" as \"created_by_user_name\", \"sent_by_user\".\"name\" as \"sent_by_user_name\", \"procurement_rfqs\".\"updated_at\" as \"updated_at\", \"updated_by_user\".\"name\" as \"updated_by_user_name\", \"procurement_rfqs\".\"remark\" as \"remark\", (\n SELECT material_code \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n AND major_yn = true\n LIMIT 1\n ) as \"major_item_material_code\", (\n SELECT pr_no \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n AND major_yn = true\n LIMIT 1\n ) as \"po_no\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n ) as \"pr_items_count\" from \"procurement_rfqs\" left join \"projects\" on \"procurement_rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" \"created_by_user\" on \"procurement_rfqs\".\"created_by\" = \"created_by_user\".\"id\" left join \"users\" \"updated_by_user\" on \"procurement_rfqs\".\"updated_by\" = \"updated_by_user\".\"id\" left join \"users\" \"sent_by_user\" on \"procurement_rfqs\".\"sent_by\" = \"sent_by_user\".\"id\"",
+ "name": "procurement_rfqs_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.attachment_revision_history": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_id": {
+ "name": "client_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_no": {
+ "name": "client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_name": {
+ "name": "client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_path": {
+ "name": "client_file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_size": {
+ "name": "client_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_comment": {
+ "name": "client_revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_created_at": {
+ "name": "client_revision_created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest_client_revision": {
+ "name": "is_latest_client_revision",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_vendor_responses": {
+ "name": "total_vendor_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_vendors": {
+ "name": "responded_vendors",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pending_vendors": {
+ "name": "pending_vendors",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n ba.id as attachment_id,\n ba.attachment_type,\n ba.serial_no,\n \n -- 발주처 리비전 정보\n rev.id as client_revision_id,\n rev.revision_no as client_revision_no,\n rev.original_file_name as client_file_name,\n rev.file_size as client_file_size,\n rev.file_path as client_file_path,\n rev.revision_comment as client_revision_comment,\n rev.created_at as client_revision_created_at,\n rev.is_latest as is_latest_client_revision,\n \n -- 벤더 응답 통계\n COALESCE(response_stats.total_responses, 0) as total_vendor_responses,\n COALESCE(response_stats.responded_count, 0) as responded_vendors,\n COALESCE(response_stats.pending_count, 0) as pending_vendors,\n COALESCE(response_stats.total_files, 0) as total_response_files\n \n FROM b_rfqs br\n JOIN b_rfq_attachments ba ON br.id = ba.rfq_id\n JOIN b_rfq_attachment_revisions rev ON ba.id = rev.attachment_id\n LEFT JOIN (\n SELECT \n var.attachment_id,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN var.response_status = 'NOT_RESPONDED' THEN 1 END) as pending_count,\n COUNT(vra.id) as total_files\n FROM vendor_attachment_responses var\n LEFT JOIN vendor_response_attachments_b vra ON var.id = vra.vendor_response_id\n GROUP BY var.attachment_id\n ) response_stats ON ba.id = response_stats.attachment_id\n \n ORDER BY ba.id, rev.created_at DESC\n",
+ "name": "attachment_revision_history",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.attachments_with_latest_revision": {
+ "columns": {
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_comment": {
+ "name": "revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n a.id as attachment_id,\n a.attachment_type,\n a.serial_no,\n a.rfq_id,\n a.description,\n a.current_revision,\n \n r.id as revision_id,\n r.file_name,\n r.original_file_name,\n r.file_path,\n r.file_size,\n r.file_type,\n r.revision_comment,\n \n a.created_by,\n u.name as created_by_name,\n a.created_at,\n a.updated_at\n FROM b_rfq_attachments a\n LEFT JOIN b_rfq_attachment_revisions r ON a.latest_revision_id = r.id\n LEFT JOIN users u ON a.created_by = u.id\n ",
+ "name": "attachments_with_latest_revision",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.b_rfqs_master": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_type": {
+ "name": "project_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.description,\n br.status,\n br.due_date,\n br.pic_code,\n br.pic_name,\n br.eng_pic_name,\n br.package_no,\n br.package_name,\n br.project_id,\n p.code as project_code,\n p.name as project_name,\n p.type as project_type,\n br.project_company,\n br.project_flag,\n br.project_site,\n COALESCE(att_count.total_attachments, 0) as total_attachments,\n br.created_at,\n br.updated_at\n FROM b_rfqs br\n LEFT JOIN projects p ON br.project_id = p.id\n LEFT JOIN (\n SELECT rfq_id, COUNT(*) as total_attachments\n FROM b_rfq_attachments\n GROUP BY rfq_id\n ) att_count ON br.id = att_count.rfq_id\n",
+ "name": "b_rfqs_master",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.final_rfq_detail": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_rfq_id": {
+ "name": "final_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_rfq_status": {
+ "name": "final_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_description": {
+ "name": "incoterms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_description": {
+ "name": "payment_terms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "firsttime_yn": {
+ "name": "firsttime_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_remark": {
+ "name": "vendor_remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n fr.id as final_rfq_id,\n fr.final_rfq_status,\n fr.vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n fr.due_date,\n fr.valid_date,\n fr.delivery_date,\n fr.incoterms_code,\n inc.description as incoterms_description,\n fr.payment_terms_code,\n pt.description as payment_terms_description,\n fr.currency,\n fr.tax_code,\n fr.place_of_shipping,\n fr.place_of_destination,\n fr.short_list,\n fr.return_yn,\n fr.cp_request_yn,\n fr.prject_gtc_yn,\n fr.firsttime_yn,\n fr.material_price_related_yn,\n fr.return_revision,\n fr.gtc,\n fr.gtc_valid_date,\n fr.classification,\n fr.sparepart,\n fr.remark,\n fr.vendor_remark,\n fr.created_at,\n fr.updated_at\n FROM b_rfqs br\n JOIN final_rfq fr ON br.id = fr.rfq_id\n LEFT JOIN vendors v ON fr.vendor_id = v.id\n LEFT JOIN incoterms inc ON fr.incoterms_code = inc.code\n LEFT JOIN payment_terms pt ON fr.payment_terms_code = pt.code\n",
+ "name": "final_rfq_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.initial_rfq_detail": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_rfq_id": {
+ "name": "initial_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_rfq_status": {
+ "name": "initial_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_category": {
+ "name": "vendor_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_description": {
+ "name": "incoterms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_revision": {
+ "name": "rfq_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n ir.id as initial_rfq_id,\n ir.initial_rfq_status,\n ir.vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n v.vendor_category as vendor_category,\n ir.due_date,\n ir.valid_date,\n ir.incoterms_code,\n inc.description as incoterms_description,\n ir.short_list,\n ir.return_yn,\n ir.cp_request_yn,\n ir.prject_gtc_yn,\n ir.return_revision,\n ir.rfq_revision,\n ir.gtc,\n ir.gtc_valid_date,\n ir.classification,\n ir.sparepart,\n ir.created_at,\n ir.updated_at\n FROM b_rfqs br\n JOIN initial_rfq ir ON br.id = ir.rfq_id\n LEFT JOIN vendors_with_types v ON ir.vendor_id = v.id\n LEFT JOIN incoterms inc ON ir.incoterms_code = inc.code\n",
+ "name": "initial_rfq_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfq_dashboard": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_vendor_count": {
+ "name": "initial_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_vendor_count": {
+ "name": "final_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_response_rate": {
+ "name": "initial_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_response_rate": {
+ "name": "final_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "overall_progress": {
+ "name": "overall_progress",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_to_deadline": {
+ "name": "days_to_deadline",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by_name": {
+ "name": "updated_by_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by_email": {
+ "name": "updated_by_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n -- ② SELECT 절 확장 -------------------------------------------\n SELECT\n br.id AS rfq_id,\n br.rfq_code,\n br.description,\n br.status,\n br.due_date,\n p.code AS project_code,\n p.name AS project_name,\n br.package_no,\n br.package_name,\n br.pic_code,\n br.pic_name,\n br.eng_pic_name,\n br.project_company,\n br.project_flag,\n br.project_site,\n br.remark,\n \n -- 첨부/벤더 요약 -----------------------\n COALESCE(att_count.total_attachments, 0) AS total_attachments,\n COALESCE(init_summary.vendor_count, 0) AS initial_vendor_count,\n COALESCE(final_summary.vendor_count, 0) AS final_vendor_count,\n COALESCE(init_summary.avg_response_rate, 0) AS initial_response_rate,\n COALESCE(final_summary.avg_response_rate, 0) AS final_response_rate,\n \n -- 진행률·마감까지 일수 --------------\n CASE \n WHEN br.status = 'DRAFT' THEN 0\n WHEN br.status = 'Doc. Received' THEN 10\n WHEN br.status = 'PIC Assigned' THEN 20\n WHEN br.status = 'Doc. Confirmed' THEN 30\n WHEN br.status = 'Init. RFQ Sent' THEN 40\n WHEN br.status = 'Init. RFQ Answered' THEN 50\n WHEN br.status = 'TBE started' THEN 60\n WHEN br.status = 'TBE finished' THEN 70\n WHEN br.status = 'Final RFQ Sent' THEN 80\n WHEN br.status = 'Quotation Received' THEN 90\n WHEN br.status = 'Vendor Selected' THEN 100\n ELSE 0\n END AS overall_progress,\n (br.due_date - CURRENT_DATE) AS days_to_deadline,\n \n br.created_at,\n br.updated_at,\n \n -- 💡 추가되는 컬럼 -------------------\n upd.name AS updated_by_name,\n upd.email AS updated_by_email\n FROM b_rfqs br\n LEFT JOIN projects p ON br.project_id = p.id\n \n -- ③ 사용자 정보 조인 --------------------\n LEFT JOIN users upd ON br.updated_by = upd.id\n \n -- (나머지 이미 있던 JOIN 들은 그대로) -----\n LEFT JOIN (\n SELECT rfq_id, COUNT(*) AS total_attachments\n FROM b_rfq_attachments\n GROUP BY rfq_id\n ) att_count ON br.id = att_count.rfq_id\n \n LEFT JOIN (\n SELECT \n rfq_id, \n COUNT(DISTINCT vendor_id) AS vendor_count,\n AVG(response_rate) AS avg_response_rate\n FROM vendor_response_summary\n WHERE rfq_type = 'INITIAL'\n GROUP BY rfq_id\n ) init_summary ON br.id = init_summary.rfq_id\n \n LEFT JOIN (\n SELECT \n rfq_id, \n COUNT(DISTINCT vendor_id) AS vendor_count,\n AVG(response_rate) AS avg_response_rate\n FROM vendor_response_summary\n WHERE rfq_type = 'FINAL'\n GROUP BY rfq_id\n ) final_summary ON br.id = final_summary.rfq_id\n ",
+ "name": "rfq_dashboard",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfq_progress_summary": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_to_deadline": {
+ "name": "days_to_deadline",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachments_with_multiple_revisions": {
+ "name": "attachments_with_multiple_revisions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_client_revisions": {
+ "name": "total_client_revisions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_vendor_count": {
+ "name": "initial_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_total_responses": {
+ "name": "initial_total_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_responded_count": {
+ "name": "initial_responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_up_to_date_count": {
+ "name": "initial_up_to_date_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_version_mismatch_count": {
+ "name": "initial_version_mismatch_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_response_rate": {
+ "name": "initial_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_version_match_rate": {
+ "name": "initial_version_match_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_vendor_count": {
+ "name": "final_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_total_responses": {
+ "name": "final_total_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_responded_count": {
+ "name": "final_responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_up_to_date_count": {
+ "name": "final_up_to_date_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_version_mismatch_count": {
+ "name": "final_version_mismatch_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_response_rate": {
+ "name": "final_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_version_match_rate": {
+ "name": "final_version_match_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n br.due_date,\n (br.due_date - CURRENT_DATE) as days_to_deadline,\n \n -- 첨부파일 통계\n attachment_stats.total_attachments,\n attachment_stats.attachments_with_multiple_revisions,\n attachment_stats.total_client_revisions,\n \n -- Initial RFQ 통계\n COALESCE(initial_stats.vendor_count, 0) as initial_vendor_count,\n COALESCE(initial_stats.total_responses, 0) as initial_total_responses,\n COALESCE(initial_stats.responded_count, 0) as initial_responded_count,\n COALESCE(initial_stats.up_to_date_count, 0) as initial_up_to_date_count,\n COALESCE(initial_stats.version_mismatch_count, 0) as initial_version_mismatch_count,\n COALESCE(initial_stats.response_rate, 0) as initial_response_rate,\n COALESCE(initial_stats.version_match_rate, 0) as initial_version_match_rate,\n \n -- Final RFQ 통계\n COALESCE(final_stats.vendor_count, 0) as final_vendor_count,\n COALESCE(final_stats.total_responses, 0) as final_total_responses,\n COALESCE(final_stats.responded_count, 0) as final_responded_count,\n COALESCE(final_stats.up_to_date_count, 0) as final_up_to_date_count,\n COALESCE(final_stats.version_mismatch_count, 0) as final_version_mismatch_count,\n COALESCE(final_stats.response_rate, 0) as final_response_rate,\n COALESCE(final_stats.version_match_rate, 0) as final_version_match_rate,\n \n COALESCE(file_stats.total_files, 0) as total_response_files\n \n FROM b_rfqs br\n LEFT JOIN (\n SELECT \n ba.rfq_id,\n COUNT(*) as total_attachments,\n COUNT(CASE WHEN rev_count.total_revisions > 1 THEN 1 END) as attachments_with_multiple_revisions,\n SUM(rev_count.total_revisions) as total_client_revisions\n FROM b_rfq_attachments ba\n LEFT JOIN (\n SELECT \n attachment_id,\n COUNT(*) as total_revisions\n FROM b_rfq_attachment_revisions\n GROUP BY attachment_id\n ) rev_count ON ba.id = rev_count.attachment_id\n GROUP BY ba.rfq_id\n ) attachment_stats ON br.id = attachment_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(DISTINCT var.vendor_id) as vendor_count,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) as up_to_date_count,\n COUNT(CASE WHEN vrd.effective_status = 'VERSION_MISMATCH' THEN 1 END) as version_mismatch_count,\n ROUND(\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(*), 0), 2\n ) as response_rate,\n ROUND(\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END), 0), 2\n ) as version_match_rate\n FROM b_rfqs br\n JOIN vendor_response_detail vrd ON br.id = vrd.rfq_id\n JOIN vendor_attachment_responses var ON vrd.response_id = var.id\n WHERE var.rfq_type = 'INITIAL'\n GROUP BY br.id\n ) initial_stats ON br.id = initial_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(DISTINCT var.vendor_id) as vendor_count,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) as up_to_date_count,\n COUNT(CASE WHEN vrd.effective_status = 'VERSION_MISMATCH' THEN 1 END) as version_mismatch_count,\n ROUND(\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(*), 0), 2\n ) as response_rate,\n ROUND(\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END), 0), 2\n ) as version_match_rate\n FROM b_rfqs br\n JOIN vendor_response_detail vrd ON br.id = vrd.rfq_id\n JOIN vendor_attachment_responses var ON vrd.response_id = var.id\n WHERE var.rfq_type = 'FINAL'\n GROUP BY br.id\n ) final_stats ON br.id = final_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(vra.id) as total_files\n FROM b_rfqs br\n JOIN b_rfq_attachments ba ON br.id = ba.rfq_id\n JOIN vendor_attachment_responses var ON ba.id = var.attachment_id\n LEFT JOIN vendor_response_attachments_b vra ON var.id = vra.vendor_response_id\n GROUP BY br.id\n ) file_stats ON br.id = file_stats.rfq_id\n",
+ "name": "rfq_progress_summary",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_attachments_enhanced": {
+ "columns": {
+ "response_attachment_id": {
+ "name": "response_attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_id": {
+ "name": "latest_client_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_no": {
+ "name": "latest_client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_name": {
+ "name": "latest_client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_version_matched": {
+ "name": "is_version_matched",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version_lag": {
+ "name": "version_lag",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "needs_update": {
+ "name": "needs_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_sequence": {
+ "name": "file_sequence",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest_response_file": {
+ "name": "is_latest_response_file",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n vra.id as response_attachment_id,\n vra.vendor_response_id,\n vra.file_name,\n vra.original_file_name,\n vra.file_path,\n vra.file_size,\n vra.file_type,\n vra.description,\n vra.uploaded_at,\n \n -- 응답 기본 정보\n var.attachment_id,\n var.vendor_id,\n var.rfq_type,\n var.rfq_record_id,\n var.response_status,\n var.current_revision,\n var.responded_revision,\n \n -- 코멘트 (새로 추가된 필드 포함)\n var.response_comment,\n var.vendor_comment,\n var.revision_request_comment,\n \n -- 날짜 (새로 추가된 필드 포함)\n var.requested_at,\n var.responded_at,\n var.revision_requested_at,\n \n -- 첨부파일 정보\n ba.attachment_type,\n ba.serial_no,\n ba.rfq_id,\n \n -- 벤더 정보\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n \n -- 발주처 현재 리비전 정보\n latest_rev.id as latest_client_revision_id,\n latest_rev.revision_no as latest_client_revision_no,\n latest_rev.original_file_name as latest_client_file_name,\n \n -- 리비전 비교\n CASE \n WHEN var.responded_revision = ba.current_revision THEN true \n ELSE false \n END as is_version_matched,\n \n -- 버전 차이 계산 (Rev.0, Rev.1 형태 가정)\n CASE \n WHEN var.responded_revision IS NULL THEN NULL\n WHEN ba.current_revision IS NULL THEN NULL\n ELSE CAST(SUBSTRING(ba.current_revision FROM '[0-9]+') AS INTEGER) - \n CAST(SUBSTRING(var.responded_revision FROM '[0-9]+') AS INTEGER)\n END as version_lag,\n \n CASE \n WHEN var.response_status = 'RESPONDED' \n AND var.responded_revision != ba.current_revision THEN true \n ELSE false \n END as needs_update,\n \n -- 파일 순서\n ROW_NUMBER() OVER (\n PARTITION BY var.id \n ORDER BY vra.uploaded_at DESC\n ) as file_sequence,\n \n -- 최신 응답 파일 여부\n CASE \n WHEN ROW_NUMBER() OVER (\n PARTITION BY var.id \n ORDER BY vra.uploaded_at DESC\n ) = 1 THEN true \n ELSE false \n END as is_latest_response_file\n \n FROM vendor_response_attachments_b vra\n JOIN vendor_attachment_responses var ON vra.vendor_response_id = var.id\n JOIN b_rfq_attachments ba ON var.attachment_id = ba.id\n LEFT JOIN vendors v ON var.vendor_id = v.id\n LEFT JOIN b_rfq_attachment_revisions latest_rev ON ba.latest_revision_id = latest_rev.id\n",
+ "name": "vendor_response_attachments_enhanced",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_detail": {
+ "columns": {
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_description": {
+ "name": "attachment_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_no": {
+ "name": "latest_client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_name": {
+ "name": "latest_client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_size": {
+ "name": "latest_client_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_comment": {
+ "name": "latest_client_revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_version_matched": {
+ "name": "is_version_matched",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version_lag": {
+ "name": "version_lag",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "needs_update": {
+ "name": "needs_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_multiple_revisions": {
+ "name": "has_multiple_revisions",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_file_name": {
+ "name": "latest_response_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_file_size": {
+ "name": "latest_response_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_uploaded_at": {
+ "name": "latest_response_uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "effective_status": {
+ "name": "effective_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n var.id as response_id,\n ba.rfq_id,\n br.rfq_code,\n var.rfq_type,\n var.rfq_record_id,\n \n -- 첨부파일 정보\n ba.id as attachment_id,\n ba.attachment_type,\n ba.serial_no,\n ba.description as attachment_description,\n \n -- 벤더 정보\n v.id as vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n \n -- 응답 상태\n var.response_status,\n var.current_revision,\n var.responded_revision,\n \n -- 코멘트 (새로 추가된 필드 포함)\n var.response_comment,\n var.vendor_comment,\n var.revision_request_comment,\n \n -- 날짜 (새로 추가된 필드 포함)\n var.requested_at,\n var.responded_at,\n var.revision_requested_at,\n \n -- 발주처 최신 리비전\n latest_rev.revision_no as latest_client_revision_no,\n latest_rev.original_file_name as latest_client_file_name,\n latest_rev.file_size as latest_client_file_size,\n latest_rev.revision_comment as latest_client_revision_comment,\n \n -- 리비전 분석\n CASE \n WHEN var.responded_revision = ba.current_revision THEN true \n ELSE false \n END as is_version_matched,\n \n CASE \n WHEN var.responded_revision IS NULL OR ba.current_revision IS NULL THEN NULL\n ELSE CAST(SUBSTRING(ba.current_revision FROM '[0-9]+') AS INTEGER) - \n CAST(SUBSTRING(var.responded_revision FROM '[0-9]+') AS INTEGER)\n END as version_lag,\n \n CASE \n WHEN var.response_status = 'RESPONDED' \n AND var.responded_revision != ba.current_revision THEN true \n ELSE false \n END as needs_update,\n \n CASE \n WHEN revision_count.total_revisions > 1 THEN true \n ELSE false \n END as has_multiple_revisions,\n \n -- 응답 파일 정보\n COALESCE(file_stats.total_files, 0) as total_response_files,\n file_stats.latest_file_name as latest_response_file_name,\n file_stats.latest_file_size as latest_response_file_size,\n file_stats.latest_uploaded_at as latest_response_uploaded_at,\n \n -- 효과적인 상태\n CASE \n WHEN var.response_status = 'NOT_RESPONDED' THEN 'NOT_RESPONDED'\n WHEN var.response_status = 'WAIVED' THEN 'WAIVED'\n WHEN var.response_status = 'REVISION_REQUESTED' THEN 'REVISION_REQUESTED'\n WHEN var.response_status = 'RESPONDED' AND var.responded_revision = ba.current_revision THEN 'UP_TO_DATE'\n WHEN var.response_status = 'RESPONDED' AND var.responded_revision != ba.current_revision THEN 'VERSION_MISMATCH'\n ELSE var.response_status\n END as effective_status\n \n FROM vendor_attachment_responses var\n JOIN b_rfq_attachments ba ON var.attachment_id = ba.id\n JOIN b_rfqs br ON ba.rfq_id = br.id\n LEFT JOIN vendors v ON var.vendor_id = v.id\n LEFT JOIN b_rfq_attachment_revisions latest_rev ON ba.latest_revision_id = latest_rev.id\n LEFT JOIN (\n SELECT \n attachment_id,\n COUNT(*) as total_revisions\n FROM b_rfq_attachment_revisions\n GROUP BY attachment_id\n ) revision_count ON ba.id = revision_count.attachment_id\n LEFT JOIN (\n SELECT \n vendor_response_id,\n COUNT(*) as total_files,\n MAX(original_file_name) as latest_file_name,\n MAX(file_size) as latest_file_size,\n MAX(uploaded_at) as latest_uploaded_at\n FROM vendor_response_attachments_b\n GROUP BY vendor_response_id\n ) file_stats ON var.id = file_stats.vendor_response_id\n",
+ "name": "vendor_response_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_summary": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_count": {
+ "name": "responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pending_count": {
+ "name": "pending_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "waived_count": {
+ "name": "waived_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_count": {
+ "name": "revision_requested_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_rate": {
+ "name": "response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completion_rate": {
+ "name": "completion_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n v.id as vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n var.rfq_type,\n COUNT(var.id) as total_attachments,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN var.response_status = 'NOT_RESPONDED' THEN 1 END) as pending_count,\n COUNT(CASE WHEN var.response_status = 'WAIVED' THEN 1 END) as waived_count,\n COUNT(CASE WHEN var.response_status = 'REVISION_REQUESTED' THEN 1 END) as revision_requested_count,\n ROUND(\n (COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status != 'WAIVED' THEN 1 END), 0)), \n 2\n ) as response_rate,\n ROUND(\n ((COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) + \n COUNT(CASE WHEN var.response_status = 'WAIVED' THEN 1 END)) * 100.0 / COUNT(var.id)), \n 2\n ) as completion_rate\n FROM b_rfqs br\n JOIN b_rfq_attachments bra ON br.id = bra.rfq_id\n JOIN vendor_attachment_responses var ON bra.id = var.attachment_id\n JOIN vendors v ON var.vendor_id = v.id\n GROUP BY br.id, br.rfq_code, br.status, v.id, v.vendor_code, v.vendor_name, v.country, v.business_size, var.rfq_type\n",
+ "name": "vendor_response_summary",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.tech_vendor_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_eng": {
+ "name": "country_eng",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_fab": {
+ "name": "country_fab",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_name": {
+ "name": "agent_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_phone": {
+ "name": "agent_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_email": {
+ "name": "agent_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "tech_vendor_type": {
+ "name": "tech_vendor_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"id\", \"vendor_name\", \"vendor_code\", \"tax_id\", \"address\", \"country\", \"country_eng\", \"country_fab\", \"agent_name\", \"agent_phone\", \"agent_email\", \"phone\", \"email\", \"website\", \"status\", \"tech_vendor_type\", \"representative_name\", \"representative_email\", \"representative_phone\", \"representative_birth\", \"created_at\", \"updated_at\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', c.id,\n 'contactName', c.contact_name,\n 'contactPosition', c.contact_position,\n 'contactTitle', c.contact_title,\n 'contactEmail', c.contact_email,\n 'contactPhone', c.contact_phone,\n 'isPrimary', c.is_primary\n )\n ),\n '[]'::json\n )\n FROM tech_vendor_contacts c\n WHERE c.vendor_id = tech_vendors.id)\n as \"contacts\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', a.id,\n 'fileName', a.file_name,\n 'filePath', a.file_path,\n 'attachmentType', a.attachment_type,\n 'createdAt', a.created_at\n )\n ORDER BY a.attachment_type, a.created_at DESC\n ),\n '[]'::json\n )\n FROM tech_vendor_attachments a\n WHERE a.vendor_id = tech_vendors.id)\n as \"attachments\", \n (SELECT COUNT(*)\n FROM tech_vendor_attachments a\n WHERE a.vendor_id = tech_vendors.id)\n as \"attachment_count\", \n (SELECT COUNT(*) \n FROM vendor_contacts c\n WHERE c.vendor_id = tech_vendors.id)\n as \"contact_count\", \n (SELECT COUNT(*) \n FROM tech_vendor_possible_items i\n WHERE i.vendor_id = tech_vendors.id)\n as \"item_count\" from \"tech_vendors\"",
+ "name": "tech_vendor_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.esg_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"esg_evaluations\".\"id\", \"esg_evaluations\".\"serial_number\", \"esg_evaluations\".\"category\", \"esg_evaluations\".\"inspection_item\", \"esg_evaluations\".\"is_active\", \"esg_evaluations\".\"created_at\", \"esg_evaluations\".\"updated_at\", count(distinct \"esg_evaluation_items\".\"id\") as \"total_evaluation_items\", count(\"esg_answer_options\".\"id\") as \"total_answer_options\", coalesce(sum(\"esg_answer_options\".\"score\"), 0) as \"max_possible_score\", \n (\n SELECT array_agg(evaluation_item order by order_index) \n FROM esg_evaluation_items \n WHERE esg_evaluation_id = \"esg_evaluations\".\"id\" \n AND is_active = true \n AND evaluation_item is not null\n )\n as \"evaluation_items_list\" from \"esg_evaluations\" left join \"esg_evaluation_items\" on \"esg_evaluations\".\"id\" = \"esg_evaluation_items\".\"esg_evaluation_id\" AND \"esg_evaluation_items\".\"is_active\" = true left join \"esg_answer_options\" on \"esg_evaluation_items\".\"id\" = \"esg_answer_options\".\"esg_evaluation_item_id\" AND \"esg_answer_options\".\"is_active\" = true group by \"esg_evaluations\".\"id\", \"esg_evaluations\".\"serial_number\", \"esg_evaluations\".\"category\", \"esg_evaluations\".\"inspection_item\", \"esg_evaluations\".\"is_active\", \"esg_evaluations\".\"created_at\", \"esg_evaluations\".\"updated_at\"",
+ "name": "esg_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.evaluation_targets_with_departments": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"evaluation_targets\".\"id\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"evaluation_targets\".\"status\", \"evaluation_targets\".\"consensus_status\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"confirmed_at\", \"evaluation_targets\".\"confirmed_by\", \"evaluation_targets\".\"ld_claim_count\", \"evaluation_targets\".\"ld_claim_amount\", \"evaluation_targets\".\"ld_claim_currency\", \"evaluation_targets\".\"created_at\", \"evaluation_targets\".\"updated_at\", order_reviewer.name as \"order_reviewer_name\", order_reviewer.email as \"order_reviewer_email\", order_etr.department_name_from as \"order_department_name\", order_review.is_approved as \"order_is_approved\", order_review.reviewed_at as \"order_reviewed_at\", procurement_reviewer.name as \"procurement_reviewer_name\", procurement_reviewer.email as \"procurement_reviewer_email\", procurement_etr.department_name_from as \"procurement_department_name\", procurement_review.is_approved as \"procurement_is_approved\", procurement_review.reviewed_at as \"procurement_reviewed_at\", quality_reviewer.name as \"quality_reviewer_name\", quality_reviewer.email as \"quality_reviewer_email\", quality_etr.department_name_from as \"quality_department_name\", quality_review.is_approved as \"quality_is_approved\", quality_review.reviewed_at as \"quality_reviewed_at\", design_reviewer.name as \"design_reviewer_name\", design_reviewer.email as \"design_reviewer_email\", design_etr.department_name_from as \"design_department_name\", design_review.is_approved as \"design_is_approved\", design_review.reviewed_at as \"design_reviewed_at\", cs_reviewer.name as \"cs_reviewer_name\", cs_reviewer.email as \"cs_reviewer_email\", cs_etr.department_name_from as \"cs_department_name\", cs_review.is_approved as \"cs_is_approved\", cs_review.reviewed_at as \"cs_reviewed_at\" from \"evaluation_targets\" left join evaluation_target_reviewers order_etr on \"evaluation_targets\".\"id\" = order_etr.evaluation_target_id AND order_etr.department_code = 'ORDER_EVAL' left join users order_reviewer on order_etr.reviewer_user_id = order_reviewer.id left join evaluation_target_reviews order_review on \"evaluation_targets\".\"id\" = order_review.evaluation_target_id \n AND order_review.reviewer_user_id = order_reviewer.id \n AND order_review.department_code = 'ORDER_EVAL' left join evaluation_target_reviewers procurement_etr on \"evaluation_targets\".\"id\" = procurement_etr.evaluation_target_id AND procurement_etr.department_code = 'PROCUREMENT_EVAL' left join users procurement_reviewer on procurement_etr.reviewer_user_id = procurement_reviewer.id left join evaluation_target_reviews procurement_review on \"evaluation_targets\".\"id\" = procurement_review.evaluation_target_id \n AND procurement_review.reviewer_user_id = procurement_reviewer.id \n AND procurement_review.department_code = 'PROCUREMENT_EVAL' left join evaluation_target_reviewers quality_etr on \"evaluation_targets\".\"id\" = quality_etr.evaluation_target_id AND quality_etr.department_code = 'QUALITY_EVAL' left join users quality_reviewer on quality_etr.reviewer_user_id = quality_reviewer.id left join evaluation_target_reviews quality_review on \"evaluation_targets\".\"id\" = quality_review.evaluation_target_id \n AND quality_review.reviewer_user_id = quality_reviewer.id \n AND quality_review.department_code = 'QUALITY_EVAL' left join evaluation_target_reviewers design_etr on \"evaluation_targets\".\"id\" = design_etr.evaluation_target_id AND design_etr.department_code = 'DESIGN_EVAL' left join users design_reviewer on design_etr.reviewer_user_id = design_reviewer.id left join evaluation_target_reviews design_review on \"evaluation_targets\".\"id\" = design_review.evaluation_target_id \n AND design_review.reviewer_user_id = design_reviewer.id \n AND design_review.department_code = 'DESIGN_EVAL' left join evaluation_target_reviewers cs_etr on \"evaluation_targets\".\"id\" = cs_etr.evaluation_target_id AND cs_etr.department_code = 'CS_EVAL' left join users cs_reviewer on cs_etr.reviewer_user_id = cs_reviewer.id left join evaluation_target_reviews cs_review on \"evaluation_targets\".\"id\" = cs_review.evaluation_target_id \n AND cs_review.reviewer_user_id = cs_reviewer.id \n AND cs_review.department_code = 'CS_EVAL'",
+ "name": "evaluation_targets_with_departments",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.periodic_evaluations_aggregated_view": {
+ "columns": {
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select CONCAT(\"evaluation_year\", '_', \"vendor_id\") as \"id\", \"evaluation_year\", \"vendor_id\", \"vendor_code\", \"vendor_name\", \"domestic_foreign\", \"material_type\", ROUND(AVG(NULLIF(\"process_score\", 0)), 1) as \"process_score\", ROUND(AVG(NULLIF(\"price_score\", 0)), 1) as \"price_score\", ROUND(AVG(NULLIF(\"delivery_score\", 0)), 1) as \"delivery_score\", ROUND(AVG(NULLIF(\"self_evaluation_score\", 0)), 1) as \"self_evaluation_score\", ROUND(AVG(NULLIF(\"participation_bonus\", 0)), 1) as \"participation_bonus\", ROUND(AVG(NULLIF(\"quality_deduction\", 0)), 1) as \"quality_deduction\", ROUND(AVG(NULLIF(\"final_score\", 0)), 1) as \"final_score\", \n CASE \n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 90 THEN 'S'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 80 THEN 'A'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 70 THEN 'B'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 60 THEN 'C'\n ELSE 'D'\n END\n as \"evaluation_grade\", \n CASE \n WHEN AVG(NULLIF(\"final_score\", 0)) >= 90 THEN 'S'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 80 THEN 'A'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 70 THEN 'B'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 60 THEN 'C'\n ELSE 'D'\n END\n as \"final_grade\", \n CASE \n WHEN COUNT(CASE WHEN \"status\" = 'FINALIZED' THEN 1 END) = COUNT(*) THEN 'FINALIZED'\n WHEN COUNT(CASE WHEN \"status\" IN ('REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) = COUNT(*) THEN 'REVIEW_COMPLETED'\n WHEN COUNT(CASE WHEN \"status\" IN ('IN_REVIEW', 'REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) > 0 THEN 'IN_REVIEW'\n WHEN COUNT(CASE WHEN \"status\" IN ('SUBMITTED', 'IN_REVIEW', 'REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) > 0 THEN 'SUBMITTED'\n ELSE 'PENDING_SUBMISSION'\n END\n as \"status\", \n CASE \n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"order_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"procurement_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"quality_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"design_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"cs_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"admin_eval_status\", \n BOOL_AND(\"documents_submitted\")\n as \"documents_submitted\", MAX(\"submission_date\") as \"submission_date\", MAX(\"submission_deadline\") as \"submission_deadline\", MAX(\"review_completed_at\") as \"review_completed_at\", MAX(\"finalized_at\") as \"finalized_at\", \n CASE \n WHEN COUNT(DISTINCT \"division\") > 1 THEN 'BOTH'\n ELSE MAX(\"division\")\n END\n as \"division\", COUNT(*)::int as \"evaluation_count\", STRING_AGG(DISTINCT \"division\", ',') as \"divisions\", SUM(\"total_reviewers\")::int as \"total_reviewers\", SUM(\"completed_reviewers\")::int as \"completed_reviewers\", SUM(\"pending_reviewers\")::int as \"pending_reviewers\", MAX(\"evaluation_period\") as \"evaluation_period\", STRING_AGG(\"evaluation_note\", ' | ') as \"evaluation_note\", (ARRAY_AGG(\"periodic_evaluations_view\".\"finalized_by\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by\", (ARRAY_AGG(\"periodic_evaluations_view\".\"name\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by_user_name\", (ARRAY_AGG(\"periodic_evaluations_view\".\"email\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by_user_email\", MIN(\"created_at\") as \"created_at\", MAX(\"updated_at\") as \"updated_at\", (ARRAY_AGG(\"periodic_evaluations_view\".\"evaluation_target_id\"))[1] as \"evaluation_target_id\", \n STRING_AGG(DISTINCT \"admin_comment\", ' | ')\n as \"evaluation_target_admin_comment\", \n STRING_AGG(DISTINCT \"consolidated_comment\", ' | ')\n as \"evaluation_target_consolidated_comment\", (ARRAY_AGG(\"periodic_evaluations_view\".\"consensus_status\" ORDER BY \"periodic_evaluations_view\".\"updated_at\" DESC NULLS LAST))[1] as \"evaluation_target_consensus_status\", \n MAX(\"confirmed_at\")\n as \"evaluation_target_confirmed_at\" from \"periodic_evaluations_view\" group by \"periodic_evaluations_view\".\"evaluation_year\", \"periodic_evaluations_view\".\"vendor_id\", \"periodic_evaluations_view\".\"vendor_code\", \"periodic_evaluations_view\".\"vendor_name\", \"periodic_evaluations_view\".\"domestic_foreign\", \"periodic_evaluations_view\".\"material_type\"",
+ "name": "periodic_evaluations_aggregated_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.periodic_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"periodic_evaluations\".\"id\", \"periodic_evaluations\".\"evaluation_target_id\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_id\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"periodic_evaluations\".\"evaluation_period\", \"periodic_evaluations\".\"documents_submitted\", \"periodic_evaluations\".\"submission_date\", \"periodic_evaluations\".\"submission_deadline\", \"periodic_evaluations\".\"final_score\", \"periodic_evaluations\".\"final_grade\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'processScore'\n AND re.is_completed = true\n ) as \"process_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'priceScore'\n AND re.is_completed = true\n ) as \"price_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'deliveryScore'\n AND re.is_completed = true\n ) as \"delivery_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'selfEvaluationScore'\n AND re.is_completed = true\n ) as \"self_evaluation_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'bonus'\n AND re.is_completed = true\n ) as \"participation_bonus\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'penalty'\n AND re.is_completed = true\n ) as \"quality_deduction\", \"periodic_evaluations\".\"status\", \"periodic_evaluations\".\"review_completed_at\", \"periodic_evaluations\".\"finalized_at\", \"periodic_evaluations\".\"finalized_by\", \"periodic_evaluations\".\"evaluation_note\", \"periodic_evaluations\".\"created_at\", \"periodic_evaluations\".\"updated_at\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"consensus_status\", \"evaluation_targets\".\"confirmed_at\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'ORDER_EVAL'\n LIMIT 1\n ) as \"order_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'PROCUREMENT_EVAL'\n LIMIT 1\n ) as \"procurement_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'QUALITY_EVAL'\n LIMIT 1\n ) as \"quality_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'DESIGN_EVAL'\n LIMIT 1\n ) as \"design_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'CS_EVAL'\n LIMIT 1\n ) as \"cs_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'admin'\n LIMIT 1\n ) as \"admin_eval_status\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n ) as \"total_reviewers\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND re.is_completed = true\n ) as \"completed_reviewers\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND re.is_completed = false\n ) as \"pending_reviewers\", \"users\".\"name\", \"users\".\"email\" from \"periodic_evaluations\" left join \"evaluation_targets\" on \"periodic_evaluations\".\"evaluation_target_id\" = \"evaluation_targets\".\"id\" left join \"users\" on \"periodic_evaluations\".\"finalized_by\" = \"users\".\"id\" order by \"periodic_evaluations\".\"created_at\"",
+ "name": "periodic_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.reviewer_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_target_reviewer_id": {
+ "name": "evaluation_target_reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_completed": {
+ "name": "is_completed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_grade": {
+ "name": "evaluation_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name_from": {
+ "name": "department_name_from",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "assigned_by": {
+ "name": "assigned_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"reviewer_evaluations\".\"id\", \"reviewer_evaluations\".\"periodic_evaluation_id\", \"reviewer_evaluations\".\"evaluation_target_reviewer_id\", \"reviewer_evaluations\".\"is_completed\", \"reviewer_evaluations\".\"completed_at\", \"reviewer_evaluations\".\"reviewer_comment\", \"reviewer_evaluations\".\"created_at\", \"reviewer_evaluations\".\"updated_at\", \"periodic_evaluations\".\"evaluation_period\", \"reviewer_evaluations\".\"submitted_at\", \"periodic_evaluations\".\"documents_submitted\", \"periodic_evaluations\".\"submission_date\", \"periodic_evaluations\".\"submission_deadline\", \"periodic_evaluations\".\"final_score\", \"periodic_evaluations\".\"final_grade\", \"periodic_evaluations\".\"evaluation_score\", \"periodic_evaluations\".\"evaluation_grade\", \"periodic_evaluations\".\"status\", \"periodic_evaluations\".\"review_completed_at\", \"periodic_evaluations\".\"finalized_at\", \"periodic_evaluations\".\"finalized_by\", \"periodic_evaluations\".\"evaluation_note\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_id\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"confirmed_at\", \"evaluation_targets\".\"confirmed_by\", \"evaluation_targets\".\"ld_claim_count\", \"evaluation_targets\".\"ld_claim_amount\", \"evaluation_targets\".\"ld_claim_currency\", \"evaluation_target_reviewers\".\"department_code\", \"evaluation_target_reviewers\".\"department_name_from\", \"evaluation_target_reviewers\".\"reviewer_user_id\", reviewer_user.name as \"reviewer_name\", reviewer_user.email as \"reviewer_email\", \"evaluation_target_reviewers\".\"assigned_at\", \"evaluation_target_reviewers\".\"assigned_by\", assigned_by_user.name as \"assigned_by_user_name\", finalized_by_user.name as \"finalized_by_user_name\", finalized_by_user.email as \"finalized_by_user_email\", \n CASE \n WHEN \"reviewer_evaluations\".\"is_completed\" = true THEN 'COMPLETED'\n ELSE 'NOT_STARTED'\n END\n as \"evaluation_progress\" from \"reviewer_evaluations\" left join \"periodic_evaluations\" on \"reviewer_evaluations\".\"periodic_evaluation_id\" = \"periodic_evaluations\".\"id\" left join \"evaluation_targets\" on \"periodic_evaluations\".\"evaluation_target_id\" = \"evaluation_targets\".\"id\" left join \"evaluation_target_reviewers\" on \"reviewer_evaluations\".\"evaluation_target_reviewer_id\" = \"evaluation_target_reviewers\".\"id\" left join users reviewer_user on \"evaluation_target_reviewers\".\"reviewer_user_id\" = reviewer_user.id left join users assigned_by_user on \"evaluation_target_reviewers\".\"assigned_by\" = assigned_by_user.id left join users finalized_by_user on \"periodic_evaluations\".\"finalized_by\" = finalized_by_user.id order by \"reviewer_evaluations\".\"is_completed\" ASC, \"reviewer_evaluations\".\"updated_at\" DESC",
+ "name": "reviewer_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.reg_eval_criteria_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "category2": {
+ "name": "category2",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'processScore'"
+ },
+ "item": {
+ "name": "item",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "range": {
+ "name": "range",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score_equip_ship": {
+ "name": "score_equip_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_equip_marine": {
+ "name": "score_equip_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_ship": {
+ "name": "score_bulk_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_marine": {
+ "name": "score_bulk_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"reg_eval_criteria_details\".\"id\", \"reg_eval_criteria_details\".\"criteria_id\", \"reg_eval_criteria\".\"category\", \"reg_eval_criteria\".\"category2\", \"reg_eval_criteria\".\"item\", \"reg_eval_criteria\".\"classification\", \"reg_eval_criteria\".\"range\", \"reg_eval_criteria_details\".\"detail\", \"reg_eval_criteria_details\".\"order_index\", \"reg_eval_criteria_details\".\"score_equip_ship\", \"reg_eval_criteria_details\".\"score_equip_marine\", \"reg_eval_criteria_details\".\"score_bulk_ship\", \"reg_eval_criteria_details\".\"score_bulk_marine\", \"reg_eval_criteria\".\"remarks\" from \"reg_eval_criteria\" left join \"reg_eval_criteria_details\" on \"reg_eval_criteria\".\"id\" = \"reg_eval_criteria_details\".\"criteria_id\" order by \"reg_eval_criteria\".\"id\", \"reg_eval_criteria_details\".\"order_index\"",
+ "name": "reg_eval_criteria_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.project_gtc_view": {
+ "columns": {},
+ "definition": "select \"projects\".\"id\" as \"id\", \"projects\".\"code\" as \"code\", \"projects\".\"name\" as \"name\", \"projects\".\"type\" as \"type\", \"projects\".\"created_at\" as \"project_created_at\", \"projects\".\"updated_at\" as \"project_updated_at\", \"project_gtc_files\".\"id\" as \"gtc_file_id\", \"project_gtc_files\".\"file_name\" as \"fileName\", \"project_gtc_files\".\"file_path\" as \"filePath\", \"project_gtc_files\".\"original_file_name\" as \"originalFileName\", \"project_gtc_files\".\"file_size\" as \"fileSize\", \"project_gtc_files\".\"mime_type\" as \"mimeType\", \"project_gtc_files\".\"created_at\" as \"gtcCreatedAt\", \"project_gtc_files\".\"updated_at\" as \"gtcUpdatedAt\" from \"projects\" left join \"project_gtc_files\" on \"projects\".\"id\" = \"project_gtc_files\".\"project_id\"",
+ "name": "project_gtc_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_answer_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "qna_id": {
+ "name": "qna_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"qna_answer\".\"id\", \"qna_answer\".\"qna_id\", \"qna_answer\".\"content\", \"qna_answer\".\"author\", \"qna_answer\".\"created_at\" as \"created_at\", \"qna_answer\".\"updated_at\" as \"updated_at\", \"qna_answer\".\"is_deleted\" as \"is_deleted\", \"qna_answer\".\"deleted_at\" as \"deleted_at\", \"qna\".\"title\" as \"question_title\", \"qna\".\"category\" as \"question_category\", \"qna\".\"author\" as \"question_author\", \"qna\".\"created_at\" as \"question_created_at\", \"users\".\"name\" as \"author_name\", \"users\".\"email\" as \"author_email\", \"users\".\"domain\" as \"author_domain\", \"users\".\"phone\" as \"author_phone\", \"users\".\"image_url\" as \"author_image_url\", \"users\".\"language\" as \"author_language\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", \"tech_vendors\".\"vendor_code\" as \"tech_vendor_code\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", COALESCE(\"vendors\".\"vendor_code\", \"tech_vendors\".\"vendor_code\") as \"company_code\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"total_comments\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"comment_count\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.parent_comment_id IS NULL\n AND qc.is_deleted = false\n ) as \"parent_comments_count\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.parent_comment_id IS NOT NULL\n AND qc.is_deleted = false\n ) as \"child_comments_count\", (\n SELECT MAX(qc.created_at)\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"last_commented_at\", (\n SELECT ROW_NUMBER() OVER (\n PARTITION BY qa2.qna_id \n ORDER BY qa2.created_at ASC\n )\n FROM \"qna_answer\" qa2\n WHERE qa2.id = \"qna_answer\".\"id\"\n AND qa2.is_deleted = false\n ) as \"answer_order\", (\n \"qna_answer\".\"id\" = (\n SELECT qa2.id\n FROM \"qna_answer\" qa2\n WHERE qa2.qna_id = \"qna_answer\".\"qna_id\"\n AND qa2.is_deleted = false\n ORDER BY qa2.created_at ASC\n LIMIT 1\n )\n ) as \"is_first_answer\", (\n \"qna_answer\".\"id\" = (\n SELECT qa2.id\n FROM \"qna_answer\" qa2\n WHERE qa2.qna_id = \"qna_answer\".\"qna_id\"\n AND qa2.is_deleted = false\n ORDER BY qa2.created_at DESC\n LIMIT 1\n )\n ) as \"is_latest_answer\" from \"qna_answer\" left join \"qna\" on \"qna_answer\".\"qna_id\" = \"qna\".\"id\" left join \"users\" on \"qna_answer\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna_answer\".\"is_deleted\" = false order by \"qna_answer\".\"created_at\"",
+ "name": "qna_answer_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_comment_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_id": {
+ "name": "answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"qna_comments\".\"id\", \"qna_comments\".\"content\", \"qna_comments\".\"author\", \"qna_comments\".\"answer_id\", \"qna_comments\".\"parent_comment_id\", \"qna_comments\".\"created_at\" as \"created_at\", \"qna_comments\".\"updated_at\" as \"updated_at\", \"qna_comments\".\"is_deleted\" as \"is_deleted\", \"qna_comments\".\"deleted_at\" as \"deleted_at\", \"qna_answer\".\"content\" as \"answer_content\", \"qna_answer\".\"author\" as \"answer_author\", \"qna_answer\".\"created_at\" as \"answer_created_at\", \"qna_answer\".\"qna_id\" as \"qna_id\", \"qna\".\"title\" as \"question_title\", \"qna\".\"category\" as \"question_category\", \"qna\".\"author\" as \"question_author\", \"users\".\"name\" as \"author_name\", \"users\".\"email\" as \"author_email\", \"users\".\"domain\" as \"author_domain\", \"users\".\"image_url\" as \"author_image_url\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", \"qna_comments\".\"parent_comment_id\" IS NULL as \"is_parent_comment\", \"qna_comments\".\"parent_comment_id\" IS NOT NULL as \"is_child_comment\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc2\n WHERE qc2.parent_comment_id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"child_comments_count\", (\n SELECT COUNT(*) > 0\n FROM \"qna_comments\" qc2\n WHERE qc2.parent_comment_id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"has_child_comments\", \n CASE \n WHEN \"qna_comments\".\"parent_comment_id\" IS NULL THEN 0\n ELSE 1\n END\n as \"comment_depth\", (\n SELECT ROW_NUMBER() OVER (\n PARTITION BY qc2.answer_id, qc2.parent_comment_id\n ORDER BY qc2.created_at ASC\n )\n FROM \"qna_comments\" qc2\n WHERE qc2.id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"comment_order\" from \"qna_comments\" left join \"qna_answer\" on \"qna_comments\".\"answer_id\" = \"qna_answer\".\"id\" left join \"qna\" on \"qna_answer\".\"qna_id\" = \"qna\".\"id\" left join \"users\" on \"qna_comments\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna_comments\".\"is_deleted\" = false order by \"qna_comments\".\"created_at\"",
+ "name": "qna_comment_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "qna_category",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'partners'"
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'en'"
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "last_login_at": {
+ "name": "last_login_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"qna\".\"id\", \"qna\".\"title\", \"qna\".\"content\", \"qna\".\"author\", \"qna\".\"category\", \"qna\".\"created_at\", \"qna\".\"updated_at\", \"qna\".\"is_deleted\", \"qna\".\"deleted_at\", \"users\".\"name\", \"users\".\"email\", \"users\".\"domain\", \"users\".\"phone\", \"users\".\"image_url\", \"users\".\"language\", \"users\".\"is_active\", \"users\".\"last_login_at\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"status\" as \"vendor_status\", \"vendors\".\"country\" as \"vendor_country\", \"vendors\".\"business_size\" as \"vendor_business_size\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", \"tech_vendors\".\"vendor_code\" as \"tech_vendor_code\", \"tech_vendors\".\"status\" as \"tech_vendor_status\", \"tech_vendors\".\"country\" as \"tech_vendor_country\", \"tech_vendors\".\"tech_vendor_type\" as \"tech_vendor_type\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", COALESCE(\"vendors\".\"vendor_code\", \"tech_vendors\".\"vendor_code\") as \"company_code\", COALESCE(\"vendors\".\"country\", \"tech_vendors\".\"country\") as \"company_country\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", (\n SELECT COUNT(*)::int\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"total_answers\", (\n SELECT COUNT(*)::int\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"answer_count\", (\n SELECT MAX(qa.created_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"last_answered_at\", (\n SELECT MIN(qa.created_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"first_answered_at\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qc.is_deleted = false\n AND qa.is_deleted = false\n ) as \"total_comments\", (\n SELECT GREATEST(\n \"qna\".\"updated_at\",\n COALESCE((\n SELECT MAX(qa.updated_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ), \"qna\".\"updated_at\"),\n COALESCE((\n SELECT MAX(qc.updated_at)\n FROM \"qna_comments\" qc\n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qc.is_deleted = false\n AND qa.is_deleted = false\n ), \"qna\".\"updated_at\")\n )\n ) as \"last_activity_at\", (\n SELECT COUNT(*) > 0\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"has_answers\", (\n SELECT COUNT(*) > 0\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"is_answered\", (\n (SELECT COUNT(*) FROM \"qna_answer\" qa WHERE qa.qna_id = \"qna\".\"id\" AND qa.is_deleted = false) >= 3\n OR\n (SELECT COUNT(*) FROM \"qna_comments\" qc \n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id \n WHERE qa.qna_id = \"qna\".\"id\" AND qc.is_deleted = false AND qa.is_deleted = false) >= 5\n ) as \"is_popular\" from \"qna\" left join \"users\" on \"qna\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna\".\"is_deleted\" = false order by \"qna\".\"created_at\"",
+ "name": "qna_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.template_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sample_data": {
+ "name": "sample_data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_email": {
+ "name": "created_by_email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variables": {
+ "name": "variables",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.content,\n t.description,\n t.category,\n t.sample_data,\n t.is_active,\n t.version,\n t.created_by,\n u.name AS created_by_name,\n u.email AS created_by_email,\n t.created_at,\n t.updated_at,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', v.id,\n 'variableName', v.variable_name,\n 'variableType', v.variable_type,\n 'defaultValue', v.default_value,\n 'isRequired', v.is_required,\n 'description', v.description,\n 'displayOrder', v.display_order\n ) ORDER BY v.display_order\n ) FILTER (WHERE v.id IS NOT NULL),\n '[]'::json\n ) AS variables\n FROM \"templates\" t\n LEFT JOIN \"users\" u ON t.created_by = u.id\n LEFT JOIN \"template_variables\" v ON t.id = v.template_id\n GROUP BY\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.content,\n t.description,\n t.category,\n t.sample_data,\n t.is_active,\n t.version,\n t.created_by,\n u.name,\n u.email,\n t.created_at,\n t.updated_at\n",
+ "name": "template_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.template_list_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_email": {
+ "name": "created_by_email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_count": {
+ "name": "variable_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "required_variable_count": {
+ "name": "required_variable_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.description,\n t.category,\n t.is_active,\n t.version,\n t.created_by,\n u.name AS created_by_name,\n u.email AS created_by_email,\n t.created_at,\n t.updated_at,\n COALESCE(v.variable_count, 0) AS variable_count,\n COALESCE(v.required_variable_count, 0) AS required_variable_count\n FROM \"templates\" t\n LEFT JOIN \"users\" u ON t.created_by = u.id\n LEFT JOIN (\n SELECT\n template_id,\n COUNT(*) AS variable_count,\n COUNT(*) FILTER (WHERE is_required) AS required_variable_count\n FROM \"template_variables\"\n GROUP BY template_id\n ) v ON t.id = v.template_id\n",
+ "name": "template_list_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_clauses_tree_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"gtc_clauses\".\"id\", \"gtc_clauses\".\"document_id\", \"gtc_clauses\".\"parent_id\", \"gtc_clauses\".\"item_number\", \"gtc_clauses\".\"category\", \"gtc_clauses\".\"subtitle\", \"gtc_clauses\".\"content\", \"gtc_clauses\".\"sort_order\", \"gtc_clauses\".\"depth\", \"gtc_clauses\".\"full_path\", \"gtc_clauses\".\"images\", \"gtc_clauses\".\"is_active\", \"gtc_clauses\".\"created_at\", \"gtc_clauses\".\"created_by_id\", \"gtc_clauses\".\"updated_at\", \"gtc_clauses\".\"updated_by_id\", \"gtc_clauses\".\"edit_reason\", \"gtc_documents\".\"type\", \"gtc_documents\".\"file_name\", \"gtc_documents\".\"revision\", \"gtc_documents\".\"project_id\", created_by_user.name as \"created_by_name\", created_by_user.email as \"created_by_email\", updated_by_user.name as \"updated_by_name\", updated_by_user.email as \"updated_by_email\", parent_clause.item_number as \"parent_item_number\", parent_clause.subtitle as \"parent_subtitle\", \n (\n SELECT count(*)\n FROM gtc_clauses children\n WHERE children.parent_id = \"gtc_clauses\".\"id\"\n AND children.is_active = true\n )\n as \"children_count\", \n (\n SELECT count(*)\n FROM gtc_clauses siblings\n WHERE siblings.parent_id = \"gtc_clauses\".\"parent_id\"\n AND siblings.is_active = true\n )\n as \"siblings_count\", \n \"gtc_clauses\".\"created_by_id\" != \"gtc_clauses\".\"updated_by_id\" OR \n \"gtc_clauses\".\"created_at\" != \"gtc_clauses\".\"updated_at\"\n as \"has_edit_history\" from \"gtc_clauses\" left join \"gtc_documents\" on \"gtc_clauses\".\"document_id\" = \"gtc_documents\".\"id\" left join users created_by_user on \"gtc_clauses\".\"created_by_id\" = created_by_user.id left join users updated_by_user on \"gtc_clauses\".\"updated_by_id\" = updated_by_user.id left join gtc_clauses parent_clause on \"gtc_clauses\".\"parent_id\" = parent_clause.id",
+ "name": "gtc_clauses_tree_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_documents_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"gtc_documents\".\"id\", \"gtc_documents\".\"type\", \"gtc_documents\".\"project_id\", \"gtc_documents\".\"revision\", \"gtc_documents\".\"title\", \"gtc_documents\".\"file_name\", \"gtc_documents\".\"file_path\", \"gtc_documents\".\"file_size\", \"gtc_documents\".\"created_at\", \"gtc_documents\".\"created_by_id\", \"gtc_documents\".\"updated_at\", \"gtc_documents\".\"updated_by_id\", \"gtc_documents\".\"edit_reason\", \"gtc_documents\".\"is_active\", \"projects\".\"code\", \"projects\".\"name\", created_by_user.name as \"created_by_name\", created_by_user.email as \"created_by_email\", updated_by_user.name as \"updated_by_name\", updated_by_user.email as \"updated_by_email\", \n (\n SELECT count(*)\n FROM gtc_documents gd2\n WHERE gd2.type = \"gtc_documents\".\"type\"\n AND gd2.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd2.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd2.project_id IS NULL)\n )\n )\n as \"total_documents_in_group\", \n (\n SELECT max(revision)\n FROM gtc_documents gd3\n WHERE gd3.type = \"gtc_documents\".\"type\"\n AND gd3.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd3.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd3.project_id IS NULL)\n )\n )\n as \"latest_revision\", \n \"gtc_documents\".\"revision\" = (\n SELECT max(revision)\n FROM gtc_documents gd4\n WHERE gd4.type = \"gtc_documents\".\"type\"\n AND gd4.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd4.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd4.project_id IS NULL)\n )\n )\n as \"is_latest_revision\", \n (\n SELECT id\n FROM gtc_documents gd5\n WHERE gd5.type = \"gtc_documents\".\"type\"\n AND gd5.is_active = true\n AND gd5.revision < \"gtc_documents\".\"revision\"\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd5.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd5.project_id IS NULL)\n )\n ORDER BY gd5.revision DESC\n LIMIT 1\n )\n as \"previous_revision_id\", \n (\n SELECT id\n FROM gtc_documents gd6\n WHERE gd6.type = \"gtc_documents\".\"type\"\n AND gd6.is_active = true\n AND gd6.revision > \"gtc_documents\".\"revision\"\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd6.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd6.project_id IS NULL)\n )\n ORDER BY gd6.revision ASC\n LIMIT 1\n )\n as \"next_revision_id\", \n CASE \n WHEN \"gtc_documents\".\"file_size\" IS NULL THEN NULL\n WHEN \"gtc_documents\".\"file_size\" < 1024 THEN \"gtc_documents\".\"file_size\" || ' B'\n WHEN \"gtc_documents\".\"file_size\" < 1024 * 1024 THEN round(\"gtc_documents\".\"file_size\" / 1024.0, 1) || ' KB'\n WHEN \"gtc_documents\".\"file_size\" < 1024 * 1024 * 1024 THEN round(\"gtc_documents\".\"file_size\" / (1024.0 * 1024), 1) || ' MB'\n ELSE round(\"gtc_documents\".\"file_size\" / (1024.0 * 1024 * 1024), 1) || ' GB'\n END\n as \"file_size_formatted\", \n CASE \n WHEN \"gtc_documents\".\"project_id\" IS NOT NULL THEN (\n SELECT count(*)\n FROM gtc_documents gd7\n WHERE gd7.project_id = \"gtc_documents\".\"project_id\"\n AND gd7.is_active = true\n )\n ELSE NULL\n END\n as \"project_total_documents\", \n (\n SELECT array_agg(revision ORDER BY revision)\n FROM gtc_documents gd8\n WHERE gd8.type = \"gtc_documents\".\"type\"\n AND gd8.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd8.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd8.project_id IS NULL)\n )\n )\n as \"revision_history\", \n \"gtc_documents\".\"created_by_id\" != \"gtc_documents\".\"updated_by_id\" OR \n \"gtc_documents\".\"created_at\" != \"gtc_documents\".\"updated_at\"\n as \"has_edit_history\" from \"gtc_documents\" left join \"projects\" on \"gtc_documents\".\"project_id\" = \"projects\".\"id\" left join users created_by_user on \"gtc_documents\".\"created_by_id\" = created_by_user.id left join users updated_by_user on \"gtc_documents\".\"updated_by_id\" = updated_by_user.id",
+ "name": "gtc_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_vendor_clauses_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_document_id": {
+ "name": "vendor_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_clause_id": {
+ "name": "base_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_number_modified": {
+ "name": "is_number_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_category_modified": {
+ "name": "is_category_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_subtitle_modified": {
+ "name": "is_subtitle_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_content_modified": {
+ "name": "is_content_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_document_id": {
+ "name": "base_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_note": {
+ "name": "negotiation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_excluded": {
+ "name": "is_excluded",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"gtc_vendor_clauses\".\"id\", \"gtc_vendor_clauses\".\"vendor_document_id\", \"gtc_vendor_clauses\".\"base_clause_id\", \"gtc_vendor_clauses\".\"parent_id\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_item_number\", \"gtc_clauses\".\"item_number\")\n as \"effective_item_number\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_category\", \"gtc_clauses\".\"category\")\n as \"effective_category\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_subtitle\", \"gtc_clauses\".\"subtitle\")\n as \"effective_subtitle\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_content\", \"gtc_clauses\".\"content\")\n as \"effective_content\", \"gtc_vendor_clauses\".\"is_number_modified\", \"gtc_vendor_clauses\".\"is_category_modified\", \"gtc_vendor_clauses\".\"is_subtitle_modified\", \"gtc_vendor_clauses\".\"is_content_modified\", \"gtc_clauses\".\"item_number\", \"gtc_clauses\".\"category\", \"gtc_clauses\".\"subtitle\", \"gtc_clauses\".\"content\", \"gtc_vendor_documents\".\"vendor_id\", \"vendors\".\"vendor_code\", \"vendors\".\"vendor_name\", \"gtc_vendor_documents\".\"base_document_id\", \"gtc_documents\".\"type\", \"gtc_documents\".\"file_name\", \"gtc_vendor_clauses\".\"review_status\", \"gtc_vendor_clauses\".\"negotiation_note\", \"gtc_vendor_clauses\".\"is_excluded\", \"gtc_vendor_clauses\".\"sort_order\", \"gtc_vendor_clauses\".\"depth\", \"gtc_vendor_clauses\".\"full_path\", \n \"gtc_vendor_clauses\".\"is_number_modified\" OR \n \"gtc_vendor_clauses\".\"is_category_modified\" OR \n \"gtc_vendor_clauses\".\"is_subtitle_modified\" OR \n \"gtc_vendor_clauses\".\"is_content_modified\"\n as \"has_modifications\", \"gtc_vendor_clauses\".\"created_at\", \"gtc_vendor_clauses\".\"updated_at\" from \"gtc_vendor_clauses\" left join \"gtc_clauses\" on \"gtc_vendor_clauses\".\"base_clause_id\" = \"gtc_clauses\".\"id\" left join \"gtc_vendor_documents\" on \"gtc_vendor_clauses\".\"vendor_document_id\" = \"gtc_vendor_documents\".\"id\" left join \"vendors\" on \"gtc_vendor_documents\".\"vendor_id\" = \"vendors\".\"id\" left join \"gtc_documents\" on \"gtc_vendor_documents\".\"base_document_id\" = \"gtc_documents\".\"id\"",
+ "name": "gtc_vendor_clauses_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.legal_works_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_urgent": {
+ "name": "is_urgent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "request_date": {
+ "name": "request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consultation_date": {
+ "name": "consultation_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expected_answer_date": {
+ "name": "expected_answer_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_completion_date": {
+ "name": "legal_completion_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer": {
+ "name": "reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_responder": {
+ "name": "legal_responder",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachment": {
+ "name": "has_attachment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "review_department": {
+ "name": "review_department",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inquiry_type": {
+ "name": "inquiry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "request_content": {
+ "name": "request_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "contract_project_name": {
+ "name": "contract_project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_amount": {
+ "name": "contract_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"legal_works\".\"id\", \"legal_works\".\"category\", \"legal_works\".\"status\", \"legal_works\".\"company_id\", \"legal_works\".\"vendor_code\", \"legal_works\".\"vendor_name\", \"legal_works\".\"is_urgent\", \"legal_works\".\"request_date\", \"legal_works\".\"consultation_date\", \"legal_works\".\"expected_answer_date\", \"legal_works\".\"legal_completion_date\", \"legal_works\".\"reviewer\", \"legal_works\".\"legal_responder\", \"legal_works\".\"has_attachment\", \"legal_works\".\"created_at\", \"legal_works\".\"updated_at\", \"legal_work_requests\".\"review_department\", \"legal_work_requests\".\"inquiry_type\", \"legal_work_requests\".\"title\", \"legal_work_requests\".\"request_content\", \"legal_work_requests\".\"is_public\", \"legal_work_requests\".\"contract_project_name\", \"legal_work_requests\".\"contract_type\", \"legal_work_requests\".\"contract_amount\", (\n SELECT response_content \n FROM legal_work_responses lwr_latest \n WHERE lwr_latest.legal_work_id = \"legal_works\".\"id\" \n ORDER BY lwr_latest.created_at DESC \n LIMIT 1\n ) as \"response_content\", (\n SELECT COUNT(*)::integer \n FROM legal_work_attachments lwa \n WHERE lwa.legal_work_id = \"legal_works\".\"id\"\n ) as \"attachment_count\" from \"legal_works\" left join \"legal_work_requests\" on \"legal_works\".\"id\" = \"legal_work_requests\".\"legal_work_id\" left join \"vendors\" on \"legal_works\".\"company_id\" = \"vendors\".\"id\"",
+ "name": "legal_works_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.bidding_list_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_number": {
+ "name": "bidding_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "contract_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bidding_type": {
+ "name": "bidding_type",
+ "type": "bidding_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "award_count": {
+ "name": "award_count",
+ "type": "award_count",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'single'"
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_date": {
+ "name": "pre_quote_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_registration_date": {
+ "name": "bidding_registration_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_start_date": {
+ "name": "submission_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_end_date": {
+ "name": "submission_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_date": {
+ "name": "evaluation_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_specification_meeting": {
+ "name": "has_specification_meeting",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "has_pr_document": {
+ "name": "has_pr_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "budget": {
+ "name": "budget",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_price": {
+ "name": "target_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_bid_price": {
+ "name": "final_bid_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "bidding_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bidding_generated'"
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_email": {
+ "name": "manager_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_phone": {
+ "name": "manager_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "meeting_date": {
+ "name": "meeting_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "location": {
+ "name": "location",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "definition": "select \"biddings\".\"id\", \"biddings\".\"bidding_number\", \"biddings\".\"revision\", \"biddings\".\"project_name\", \"biddings\".\"item_name\", \"biddings\".\"title\", \"biddings\".\"description\", \"biddings\".\"content\", \"biddings\".\"contract_type\", \"biddings\".\"bidding_type\", \"biddings\".\"award_count\", \"biddings\".\"contract_period\", \"biddings\".\"pre_quote_date\", \"biddings\".\"bidding_registration_date\", \"biddings\".\"submission_start_date\", \"biddings\".\"submission_end_date\", \"biddings\".\"evaluation_date\", \"biddings\".\"has_specification_meeting\", \"biddings\".\"has_pr_document\", \"biddings\".\"pr_number\", \"biddings\".\"currency\", \"biddings\".\"budget\", \"biddings\".\"target_price\", \"biddings\".\"final_bid_price\", \"biddings\".\"status\", \"biddings\".\"is_public\", \"biddings\".\"manager_name\", \"biddings\".\"manager_email\", \"biddings\".\"manager_phone\", \"biddings\".\"remarks\", \"biddings\".\"created_by\", \"biddings\".\"created_at\", \"biddings\".\"updated_at\", \"biddings\".\"updated_by\", \"specification_meetings\".\"id\" IS NOT NULL as \"has_specification_meeting_details\", \"specification_meetings\".\"meeting_date\", \"specification_meetings\".\"location\", \"specification_meetings\".\"contact_person\", \"specification_meetings\".\"is_required\", \n COALESCE((\n SELECT count(*) \n FROM pr_documents \n WHERE bidding_id = \"biddings\".\"id\"\n ), 0)\n as \"pr_document_count\", \n (\n SELECT array_agg(document_name ORDER BY registered_at DESC)\n FROM pr_documents \n WHERE bidding_id = \"biddings\".\"id\"\n LIMIT 5\n )\n as \"pr_document_names\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ), 0)\n as \"participant_expected\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'submitted'\n ), 0)\n as \"participant_participated\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'declined'\n ), 0)\n as \"participant_declined\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status IN ('pending', 'sent')\n ), 0)\n as \"participant_pending\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'accepted'\n ), 0)\n as \"participant_accepted\", \n CASE \n WHEN (\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ) > 0 \n THEN ROUND(\n (\n SELECT count(*)::decimal \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'submitted'\n ) / (\n SELECT count(*)::decimal \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ) * 100, 1\n )\n ELSE 0 \n END\n as \"participation_rate\", \n (\n SELECT AVG(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"avg_pre_quote_amount\", \n (\n SELECT MIN(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"min_pre_quote_amount\", \n (\n SELECT MAX(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"max_pre_quote_amount\", \n (\n SELECT AVG(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"avg_final_quote_amount\", \n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"min_final_quote_amount\", \n (\n SELECT MAX(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"max_final_quote_amount\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND is_pre_quote_selected = true\n ), 0)\n as \"selected_for_final_bid_count\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND is_winner = true\n ), 0)\n as \"winner_count\", \n (\n SELECT array_agg(v.vendor_name ORDER BY v.vendor_name)\n FROM bidding_companies bc\n JOIN vendors v ON bc.company_id = v.id\n WHERE bc.bidding_id = \"biddings\".\"id\" \n AND bc.is_winner = true\n )\n as \"winner_company_names\", \n CASE \n WHEN \"biddings\".\"submission_start_date\" IS NULL OR \"biddings\".\"submission_end_date\" IS NULL \n THEN 'not_scheduled'\n WHEN NOW() < \"biddings\".\"submission_start_date\" \n THEN 'scheduled'\n WHEN NOW() BETWEEN \"biddings\".\"submission_start_date\" AND \"biddings\".\"submission_end_date\" \n THEN 'active'\n WHEN NOW() > \"biddings\".\"submission_end_date\" \n THEN 'closed'\n ELSE 'unknown'\n END\n as \"submission_status\", \n CASE \n WHEN \"biddings\".\"submission_end_date\" IS NOT NULL \n AND NOW() < \"biddings\".\"submission_end_date\" \n THEN EXTRACT(DAYS FROM (\"biddings\".\"submission_end_date\" - NOW()))::integer\n ELSE NULL \n END\n as \"days_until_deadline\", \n CASE \n WHEN \"biddings\".\"submission_start_date\" IS NOT NULL \n AND NOW() < \"biddings\".\"submission_start_date\" \n THEN EXTRACT(DAYS FROM (\"biddings\".\"submission_start_date\" - NOW()))::integer\n ELSE NULL \n END\n as \"days_until_start\", \n CASE \n WHEN \"biddings\".\"budget\" IS NOT NULL AND \"biddings\".\"budget\" > 0\n AND (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) IS NOT NULL\n THEN ROUND(\n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) / \"biddings\".\"budget\" * 100, 1\n )\n ELSE NULL \n END\n as \"budget_efficiency_rate\", \n CASE \n WHEN \"biddings\".\"target_price\" IS NOT NULL AND \"biddings\".\"target_price\" > 0\n AND (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) IS NOT NULL\n THEN ROUND(\n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) / \"biddings\".\"target_price\" * 100, 1\n )\n ELSE NULL \n END\n as \"target_price_efficiency_rate\", \n CASE \"biddings\".\"status\"\n WHEN 'bidding_generated' THEN 10\n WHEN 'request_for_quotation' THEN 20\n WHEN 'received_quotation' THEN 40\n WHEN 'set_target_price' THEN 60\n WHEN 'bidding_opened' THEN 70\n WHEN 'bidding_closed' THEN 80\n WHEN 'evaluation_of_bidding' THEN 90\n WHEN 'vendor_selected' THEN 100\n WHEN 'bidding_disposal' THEN 0\n ELSE 0\n END\n as \"progress_score\", \n GREATEST(\n \"biddings\".\"updated_at\",\n COALESCE((\n SELECT MAX(updated_at) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ), \"biddings\".\"updated_at\")\n )\n as \"last_activity_date\" from \"biddings\" left join \"specification_meetings\" on \"biddings\".\"id\" = \"specification_meetings\".\"bidding_id\"",
+ "name": "bidding_list_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ }
+ },
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/db/migrations/meta/0289_snapshot.json b/db/migrations/meta/0289_snapshot.json
new file mode 100644
index 00000000..6f2b34e7
--- /dev/null
+++ b/db/migrations/meta/0289_snapshot.json
@@ -0,0 +1,48206 @@
+{
+ "id": "a2dc7436-a1ed-402a-9308-6f4d5fc59ff0",
+ "prevId": "bd44fd60-9bb3-4324-9363-225e2259d1d1",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.companies": {
+ "name": "companies",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "companies_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "taxID": {
+ "name": "taxID",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_envelopes": {
+ "name": "contract_envelopes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_envelopes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "envelope_id": {
+ "name": "envelope_id",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "envelope_status": {
+ "name": "envelope_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contract_envelopes_contract_id_contracts_id_fk": {
+ "name": "contract_envelopes_contract_id_contracts_id_fk",
+ "tableFrom": "contract_envelopes",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_items": {
+ "name": "contract_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_items_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_id": {
+ "name": "item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "unit_price": {
+ "name": "unit_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_rate": {
+ "name": "tax_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_amount": {
+ "name": "tax_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_line_amount": {
+ "name": "total_line_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "contract_items_contract_item_idx": {
+ "name": "contract_items_contract_item_idx",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "item_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "contract_items_contract_id_contracts_id_fk": {
+ "name": "contract_items_contract_id_contracts_id_fk",
+ "tableFrom": "contract_items",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contract_items_item_id_items_id_fk": {
+ "name": "contract_items_item_id_items_id_fk",
+ "tableFrom": "contract_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contract_items_contract_id_item_id_unique": {
+ "name": "contract_items_contract_id_item_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_id",
+ "item_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_signers": {
+ "name": "contract_signers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_signers_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "envelope_id": {
+ "name": "envelope_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_contact_id": {
+ "name": "vendor_contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "signer_type": {
+ "name": "signer_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'VENDOR'"
+ },
+ "signer_email": {
+ "name": "signer_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "signer_name": {
+ "name": "signer_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "signer_position": {
+ "name": "signer_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "signer_status": {
+ "name": "signer_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "signed_at": {
+ "name": "signed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contract_signers_envelope_id_contract_envelopes_id_fk": {
+ "name": "contract_signers_envelope_id_contract_envelopes_id_fk",
+ "tableFrom": "contract_signers",
+ "tableTo": "contract_envelopes",
+ "columnsFrom": [
+ "envelope_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contract_signers_vendor_contact_id_vendor_contacts_id_fk": {
+ "name": "contract_signers_vendor_contact_id_vendor_contacts_id_fk",
+ "tableFrom": "contract_signers",
+ "tableTo": "vendor_contacts",
+ "columnsFrom": [
+ "vendor_contact_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contracts": {
+ "name": "contracts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contracts_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_name": {
+ "name": "contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "end_date": {
+ "name": "end_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "partial_shipping_allowed": {
+ "name": "partial_shipping_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "partial_payment_allowed": {
+ "name": "partial_payment_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contracts_project_id_projects_id_fk": {
+ "name": "contracts_project_id_projects_id_fk",
+ "tableFrom": "contracts",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contracts_vendor_id_vendors_id_fk": {
+ "name": "contracts_vendor_id_vendors_id_fk",
+ "tableFrom": "contracts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contracts_contract_no_unique": {
+ "name": "contracts_contract_no_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_no"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.poa": {
+ "name": "poa",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "poa_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_contract_no": {
+ "name": "original_contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_contract_name": {
+ "name": "original_contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_status": {
+ "name": "original_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_status": {
+ "name": "approval_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "poa_original_contract_no_contracts_contract_no_fk": {
+ "name": "poa_original_contract_no_contracts_contract_no_fk",
+ "tableFrom": "poa",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "original_contract_no"
+ ],
+ "columnsTo": [
+ "contract_no"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "poa_project_id_projects_id_fk": {
+ "name": "poa_project_id_projects_id_fk",
+ "tableFrom": "poa",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "poa_vendor_id_vendors_id_fk": {
+ "name": "poa_vendor_id_vendors_id_fk",
+ "tableFrom": "poa",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_offshore_hull": {
+ "name": "item_offshore_hull",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_item_list": {
+ "name": "sub_item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_offshore_top": {
+ "name": "item_offshore_top",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_item_list": {
+ "name": "sub_item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_shipbuilding": {
+ "name": "item_shipbuilding",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ship_types": {
+ "name": "ship_types",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'OPTION'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.items": {
+ "name": "items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_no": {
+ "name": "project_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "package_code": {
+ "name": "package_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sm_code": {
+ "name": "sm_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_item_code": {
+ "name": "parent_item_code",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_level": {
+ "name": "item_level",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delete_flag": {
+ "name": "delete_flag",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_date": {
+ "name": "change_date",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "base_unit_of_measure": {
+ "name": "base_unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_item_unique": {
+ "name": "project_item_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_no",
+ "item_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.materials": {
+ "name": "materials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_item_code": {
+ "name": "parent_item_code",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_level": {
+ "name": "item_level",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delete_flag": {
+ "name": "delete_flag",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_date": {
+ "name": "change_date",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "base_unit_of_measure": {
+ "name": "base_unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "materials_item_code_unique": {
+ "name": "materials_item_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "item_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pq_criterias": {
+ "name": "pq_criterias",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_point": {
+ "name": "check_point",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_group_name": {
+ "name": "sub_group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pq_list_id": {
+ "name": "pq_list_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "input_format": {
+ "name": "input_format",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'TEXT'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pq_criterias_pq_list_id_pq_lists_id_fk": {
+ "name": "pq_criterias_pq_list_id_pq_lists_id_fk",
+ "tableFrom": "pq_criterias",
+ "tableTo": "pq_lists",
+ "columnsFrom": [
+ "pq_list_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pq_lists": {
+ "name": "pq_lists",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_to": {
+ "name": "valid_to",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pq_lists_project_id_projects_id_fk": {
+ "name": "pq_lists_project_id_projects_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "pq_lists_created_by_users_id_fk": {
+ "name": "pq_lists_created_by_users_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "pq_lists_updated_by_users_id_fk": {
+ "name": "pq_lists_updated_by_users_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.site_visit_request_attachments": {
+ "name": "site_visit_request_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "site_visit_request_id": {
+ "name": "site_visit_request_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_site_visit_info_id": {
+ "name": "vendor_site_visit_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "site_visit_request_attachments_site_visit_request_id_site_visit_requests_id_fk": {
+ "name": "site_visit_request_attachments_site_visit_request_id_site_visit_requests_id_fk",
+ "tableFrom": "site_visit_request_attachments",
+ "tableTo": "site_visit_requests",
+ "columnsFrom": [
+ "site_visit_request_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "site_visit_request_attachments_vendor_site_visit_info_id_vendor_site_visit_info_id_fk": {
+ "name": "site_visit_request_attachments_vendor_site_visit_info_id_vendor_site_visit_info_id_fk",
+ "tableFrom": "site_visit_request_attachments",
+ "tableTo": "vendor_site_visit_info",
+ "columnsFrom": [
+ "vendor_site_visit_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.site_visit_requests": {
+ "name": "site_visit_requests",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "investigation_id": {
+ "name": "investigation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "inspection_duration": {
+ "name": "inspection_duration",
+ "type": "numeric(4, 1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_start_date": {
+ "name": "requested_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_end_date": {
+ "name": "requested_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_attendees": {
+ "name": "shi_attendees",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "vendor_requests": {
+ "name": "vendor_requests",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "additional_requests": {
+ "name": "additional_requests",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REQUESTED'"
+ },
+ "sent_at": {
+ "name": "sent_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "site_visit_requests_investigation_id_vendor_investigations_id_fk": {
+ "name": "site_visit_requests_investigation_id_vendor_investigations_id_fk",
+ "tableFrom": "site_visit_requests",
+ "tableTo": "vendor_investigations",
+ "columnsFrom": [
+ "investigation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "site_visit_requests_requester_id_users_id_fk": {
+ "name": "site_visit_requests_requester_id_users_id_fk",
+ "tableFrom": "site_visit_requests",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_criteria_attachments": {
+ "name": "vendor_criteria_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_criteria_answer_id": {
+ "name": "vendor_criteria_answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_criteria_attachments_vendor_criteria_answer_id_vendor_pq_criteria_answers_id_fk": {
+ "name": "vendor_criteria_attachments_vendor_criteria_answer_id_vendor_pq_criteria_answers_id_fk",
+ "tableFrom": "vendor_criteria_attachments",
+ "tableTo": "vendor_pq_criteria_answers",
+ "columnsFrom": [
+ "vendor_criteria_answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_investigation_attachments": {
+ "name": "vendor_investigation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "investigation_id": {
+ "name": "investigation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'REPORT'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_investigation_attachments_investigation_id_vendor_investigations_id_fk": {
+ "name": "vendor_investigation_attachments_investigation_id_vendor_investigations_id_fk",
+ "tableFrom": "vendor_investigation_attachments",
+ "tableTo": "vendor_investigations",
+ "columnsFrom": [
+ "investigation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_investigations": {
+ "name": "vendor_investigations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pq_submission_id": {
+ "name": "pq_submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "qm_manager_id": {
+ "name": "qm_manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_status": {
+ "name": "investigation_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "investigation_address": {
+ "name": "investigation_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_method": {
+ "name": "investigation_method",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_start_at": {
+ "name": "scheduled_start_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_end_at": {
+ "name": "scheduled_end_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "forecasted_at": {
+ "name": "forecasted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_result": {
+ "name": "evaluation_result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_notes": {
+ "name": "investigation_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "purchase_comment": {
+ "name": "purchase_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_investigations_vendor_id_vendors_id_fk": {
+ "name": "vendor_investigations_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_investigations_pq_submission_id_vendor_pq_submissions_id_fk": {
+ "name": "vendor_investigations_pq_submission_id_vendor_pq_submissions_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "vendor_pq_submissions",
+ "columnsFrom": [
+ "pq_submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "cascade"
+ },
+ "vendor_investigations_requester_id_users_id_fk": {
+ "name": "vendor_investigations_requester_id_users_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_investigations_qm_manager_id_users_id_fk": {
+ "name": "vendor_investigations_qm_manager_id_users_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "qm_manager_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_submissions": {
+ "name": "vendor_pq_submissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "pq_number": {
+ "name": "pq_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REQUESTED'"
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agreements": {
+ "name": "agreements",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "pq_items": {
+ "name": "pq_items",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejected_at": {
+ "name": "rejected_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reject_reason": {
+ "name": "reject_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_pq_submission": {
+ "name": "unique_pq_submission",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_pq_submissions_requester_id_users_id_fk": {
+ "name": "vendor_pq_submissions_requester_id_users_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_pq_submissions_vendor_id_vendors_id_fk": {
+ "name": "vendor_pq_submissions_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_submissions_project_id_projects_id_fk": {
+ "name": "vendor_pq_submissions_project_id_projects_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_pq_submissions_pq_number_unique": {
+ "name": "vendor_pq_submissions_pq_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pq_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_criteria_answers": {
+ "name": "vendor_pq_criteria_answers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "answer": {
+ "name": "answer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_comment": {
+ "name": "shi_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_reply": {
+ "name": "vendor_reply",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_pq_criteria_answers_vendor_id_vendors_id_fk": {
+ "name": "vendor_pq_criteria_answers_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_criteria_answers_criteria_id_pq_criterias_id_fk": {
+ "name": "vendor_pq_criteria_answers_criteria_id_pq_criterias_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "pq_criterias",
+ "columnsFrom": [
+ "criteria_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_criteria_answers_project_id_projects_id_fk": {
+ "name": "vendor_pq_criteria_answers_project_id_projects_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_review_logs": {
+ "name": "vendor_pq_review_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_pq_criteria_answer_id": {
+ "name": "vendor_pq_criteria_answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_name": {
+ "name": "reviewer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_pq_review_logs_vendor_pq_criteria_answer_id_vendor_pq_criteria_answers_id_fk": {
+ "name": "vendor_pq_review_logs_vendor_pq_criteria_answer_id_vendor_pq_criteria_answers_id_fk",
+ "tableFrom": "vendor_pq_review_logs",
+ "tableTo": "vendor_pq_criteria_answers",
+ "columnsFrom": [
+ "vendor_pq_criteria_answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_site_visit_info": {
+ "name": "vendor_site_visit_info",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "site_visit_request_id": {
+ "name": "site_visit_request_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_name": {
+ "name": "factory_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_location": {
+ "name": "factory_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_address": {
+ "name": "factory_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_name": {
+ "name": "factory_pic_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_phone": {
+ "name": "factory_pic_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_email": {
+ "name": "factory_pic_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_directions": {
+ "name": "factory_directions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_procedure": {
+ "name": "access_procedure",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachments": {
+ "name": "has_attachments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "other_info": {
+ "name": "other_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "submitted_by": {
+ "name": "submitted_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_site_visit_info_site_visit_request_id_site_visit_requests_id_fk": {
+ "name": "vendor_site_visit_info_site_visit_request_id_site_visit_requests_id_fk",
+ "tableFrom": "vendor_site_visit_info",
+ "tableTo": "site_visit_requests",
+ "columnsFrom": [
+ "site_visit_request_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_site_visit_info_submitted_by_users_id_fk": {
+ "name": "vendor_site_visit_info_submitted_by_users_id_fk",
+ "tableFrom": "vendor_site_visit_info",
+ "tableTo": "users",
+ "columnsFrom": [
+ "submitted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_projects": {
+ "name": "bidding_projects",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "proj_nm": {
+ "name": "proj_nm",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sector": {
+ "name": "sector",
+ "type": "char(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proj_msrm": {
+ "name": "proj_msrm",
+ "type": "numeric(3, 0)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kunnr": {
+ "name": "kunnr",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kunnr_nm": {
+ "name": "kunnr_nm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cls_1": {
+ "name": "cls_1",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cls1_nm": {
+ "name": "cls1_nm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ptype": {
+ "name": "ptype",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ptype_nm": {
+ "name": "ptype_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_cd": {
+ "name": "pmodel_cd",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_nm": {
+ "name": "pmodel_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_sz": {
+ "name": "pmodel_sz",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_uom": {
+ "name": "pmodel_uom",
+ "type": "char(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "txt04": {
+ "name": "txt04",
+ "type": "char(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "txt30": {
+ "name": "txt30",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "estm_pm": {
+ "name": "estm_pm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pjt_type": {
+ "name": "pjt_type",
+ "type": "varchar",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "bidding_projects_pspid_unique": {
+ "name": "bidding_projects_pspid_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pspid"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_series": {
+ "name": "project_series",
+ "schema": "",
+ "columns": {
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sers_no": {
+ "name": "sers_no",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sc_dt": {
+ "name": "sc_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kl_dt": {
+ "name": "kl_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "lc_dt": {
+ "name": "lc_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dl_dt": {
+ "name": "dl_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dock_no": {
+ "name": "dock_no",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dock_nm": {
+ "name": "dock_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proj_no": {
+ "name": "proj_no",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "post1": {
+ "name": "post1",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "project_sersNo_unique": {
+ "name": "project_sersNo_unique",
+ "columns": [
+ {
+ "expression": "pspid",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "sers_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_series_pspid_bidding_projects_pspid_fk": {
+ "name": "project_series_pspid_bidding_projects_pspid_fk",
+ "tableFrom": "project_series",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "pspid"
+ ],
+ "columnsTo": [
+ "pspid"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.projects": {
+ "name": "projects",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ship'"
+ },
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "projects_pspid_unique": {
+ "name": "projects_pspid_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pspid"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.cbe_evaluations": {
+ "name": "cbe_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluated_by": {
+ "name": "evaluated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluated_at": {
+ "name": "evaluated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "result": {
+ "name": "result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_cost": {
+ "name": "total_cost",
+ "type": "numeric(18, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_schedule": {
+ "name": "delivery_schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cbe_evaluations_rfq_id_rfqs_id_fk": {
+ "name": "cbe_evaluations_rfq_id_rfqs_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "cbe_evaluations_vendor_id_vendors_id_fk": {
+ "name": "cbe_evaluations_vendor_id_vendors_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "cbe_evaluations_evaluated_by_users_id_fk": {
+ "name": "cbe_evaluations_evaluated_by_users_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "evaluated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_attachments": {
+ "name": "rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_id": {
+ "name": "evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cbe_id": {
+ "name": "cbe_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_attachments_rfq_id_rfqs_id_fk": {
+ "name": "rfq_attachments_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_vendor_id_vendors_id_fk": {
+ "name": "rfq_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_evaluation_id_rfq_evaluations_id_fk": {
+ "name": "rfq_attachments_evaluation_id_rfq_evaluations_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfq_evaluations",
+ "columnsFrom": [
+ "evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_cbe_id_cbe_evaluations_id_fk": {
+ "name": "rfq_attachments_cbe_id_cbe_evaluations_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "cbe_evaluations",
+ "columnsFrom": [
+ "cbe_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_comment_id_rfq_comments_id_fk": {
+ "name": "rfq_attachments_comment_id_rfq_comments_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_comments": {
+ "name": "rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment_text": {
+ "name": "comment_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "commented_by": {
+ "name": "commented_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_id": {
+ "name": "evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cbe_id": {
+ "name": "cbe_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_comments_rfq_id_rfqs_id_fk": {
+ "name": "rfq_comments_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_vendor_id_vendors_id_fk": {
+ "name": "rfq_comments_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_commented_by_users_id_fk": {
+ "name": "rfq_comments_commented_by_users_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "commented_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_evaluation_id_rfq_evaluations_id_fk": {
+ "name": "rfq_comments_evaluation_id_rfq_evaluations_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "rfq_evaluations",
+ "columnsFrom": [
+ "evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_cbe_id_vendor_responses_id_fk": {
+ "name": "rfq_comments_cbe_id_vendor_responses_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "cbe_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_evaluations": {
+ "name": "rfq_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "eval_type": {
+ "name": "eval_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "result": {
+ "name": "result",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_evaluations_rfq_id_rfqs_id_fk": {
+ "name": "rfq_evaluations_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_evaluations",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_evaluations_vendor_id_vendors_id_fk": {
+ "name": "rfq_evaluations_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_evaluations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_items": {
+ "name": "rfq_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_items_rfq_id_rfqs_id_fk": {
+ "name": "rfq_items_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_items",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "rfq_items_item_code_items_item_code_fk": {
+ "name": "rfq_items_item_code_items_item_code_fk",
+ "tableFrom": "rfq_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfqs": {
+ "name": "rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_project_id": {
+ "name": "bid_project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PURCHASE'"
+ },
+ "parent_rfq_id": {
+ "name": "parent_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfqs_project_id_projects_id_fk": {
+ "name": "rfqs_project_id_projects_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_bid_project_id_bidding_projects_id_fk": {
+ "name": "rfqs_bid_project_id_bidding_projects_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "bid_project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_created_by_users_id_fk": {
+ "name": "rfqs_created_by_users_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_parent_rfq_id_rfqs_id_fk": {
+ "name": "rfqs_parent_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "parent_rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "rfqs_rfq_code_unique": {
+ "name": "rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_commercial_responses": {
+ "name": "vendor_commercial_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric(18, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_period": {
+ "name": "delivery_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "warranty_period": {
+ "name": "warranty_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validity_period": {
+ "name": "validity_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "price_breakdown": {
+ "name": "price_breakdown",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commercial_notes": {
+ "name": "commercial_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_commercial_responses_response_id_vendor_responses_id_fk": {
+ "name": "vendor_commercial_responses_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_commercial_responses",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_attachments": {
+ "name": "vendor_response_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "technical_response_id": {
+ "name": "technical_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commercial_response_id": {
+ "name": "commercial_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_attachments_response_id_vendor_responses_id_fk": {
+ "name": "vendor_response_attachments_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_technical_response_id_vendor_technical_responses_id_fk": {
+ "name": "vendor_response_attachments_technical_response_id_vendor_technical_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_technical_responses",
+ "columnsFrom": [
+ "technical_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_commercial_response_id_vendor_commercial_responses_id_fk": {
+ "name": "vendor_response_attachments_commercial_response_id_vendor_commercial_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_commercial_responses",
+ "columnsFrom": [
+ "commercial_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_responses": {
+ "name": "vendor_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REVIEWING'"
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_by": {
+ "name": "responded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "vendor_response_unique": {
+ "name": "vendor_response_unique",
+ "columns": [
+ {
+ "expression": "rfq_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_responses_rfq_id_rfqs_id_fk": {
+ "name": "vendor_responses_rfq_id_rfqs_id_fk",
+ "tableFrom": "vendor_responses",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_responses_vendor_id_vendors_id_fk": {
+ "name": "vendor_responses_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_responses",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_technical_responses": {
+ "name": "vendor_technical_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_technical_responses_response_id_vendor_responses_id_fk": {
+ "name": "vendor_technical_responses_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_technical_responses",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.departments": {
+ "name": "departments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "departments_department_code_unique": {
+ "name": "departments_department_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.login_attempts": {
+ "name": "login_attempts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "login_attempts_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "failure_reason": {
+ "name": "failure_reason",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attempted_at": {
+ "name": "attempted_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "login_attempts_email_idx": {
+ "name": "login_attempts_email_idx",
+ "columns": [
+ {
+ "expression": "email",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "login_attempts_attempted_at_idx": {
+ "name": "login_attempts_attempted_at_idx",
+ "columns": [
+ {
+ "expression": "attempted_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "login_attempts_ip_address_idx": {
+ "name": "login_attempts_ip_address_idx",
+ "columns": [
+ {
+ "expression": "ip_address",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "login_attempts_user_id_users_id_fk": {
+ "name": "login_attempts_user_id_users_id_fk",
+ "tableFrom": "login_attempts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mfa_tokens": {
+ "name": "mfa_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "mfa_tokens_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "phone_number": {
+ "name": "phone_number",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attempts": {
+ "name": "attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "mfa_tokens_user_id_idx": {
+ "name": "mfa_tokens_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "mfa_tokens_token_idx": {
+ "name": "mfa_tokens_token_idx",
+ "columns": [
+ {
+ "expression": "token",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "mfa_tokens_expires_at_idx": {
+ "name": "mfa_tokens_expires_at_idx",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "mfa_tokens_user_id_users_id_fk": {
+ "name": "mfa_tokens_user_id_users_id_fk",
+ "tableFrom": "mfa_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.otps": {
+ "name": "otps",
+ "schema": "",
+ "columns": {
+ "email": {
+ "name": "email",
+ "type": "varchar(256)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "otpToken": {
+ "name": "otpToken",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "otp_expires": {
+ "name": "otp_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.password_history": {
+ "name": "password_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "password_history_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "salt": {
+ "name": "salt",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "replaced_at": {
+ "name": "replaced_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "password_history_user_id_idx": {
+ "name": "password_history_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "password_history_created_at_idx": {
+ "name": "password_history_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "password_history_user_id_users_id_fk": {
+ "name": "password_history_user_id_users_id_fk",
+ "tableFrom": "password_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.passwords": {
+ "name": "passwords",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "passwords_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "salt": {
+ "name": "salt",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "strength": {
+ "name": "strength",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_uppercase": {
+ "name": "has_uppercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_lowercase": {
+ "name": "has_lowercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_numbers": {
+ "name": "has_numbers",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_symbols": {
+ "name": "has_symbols",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "length": {
+ "name": "length",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "passwords_user_id_idx": {
+ "name": "passwords_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "passwords_active_idx": {
+ "name": "passwords_active_idx",
+ "columns": [
+ {
+ "expression": "is_active",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "passwords_user_id_users_id_fk": {
+ "name": "passwords_user_id_users_id_fk",
+ "tableFrom": "passwords",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.permissions": {
+ "name": "permissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "permissions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_key": {
+ "name": "permission_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.role_permissions": {
+ "name": "role_permissions",
+ "schema": "",
+ "columns": {
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_id": {
+ "name": "permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "role_permissions_role_id_roles_id_fk": {
+ "name": "role_permissions_role_id_roles_id_fk",
+ "tableFrom": "role_permissions",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "role_permissions_permission_id_permissions_id_fk": {
+ "name": "role_permissions_permission_id_permissions_id_fk",
+ "tableFrom": "role_permissions",
+ "tableTo": "permissions",
+ "columnsFrom": [
+ "permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "roles_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "roles_company_id_vendors_id_fk": {
+ "name": "roles_company_id_vendors_id_fk",
+ "tableFrom": "roles",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security_settings": {
+ "name": "security_settings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "security_settings_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "min_password_length": {
+ "name": "min_password_length",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 8
+ },
+ "require_uppercase": {
+ "name": "require_uppercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_lowercase": {
+ "name": "require_lowercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_numbers": {
+ "name": "require_numbers",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_symbols": {
+ "name": "require_symbols",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "password_expiry_days": {
+ "name": "password_expiry_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 90
+ },
+ "password_history_count": {
+ "name": "password_history_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "max_failed_attempts": {
+ "name": "max_failed_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "lockout_duration_minutes": {
+ "name": "lockout_duration_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 30
+ },
+ "require_mfa_for_partners": {
+ "name": "require_mfa_for_partners",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "sms_token_expiry_minutes": {
+ "name": "sms_token_expiry_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "max_sms_attempts_per_day": {
+ "name": "max_sms_attempts_per_day",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 10
+ },
+ "session_timeout_minutes": {
+ "name": "session_timeout_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 480
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "epId": {
+ "name": "epId",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deptCode": {
+ "name": "deptCode",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deptName": {
+ "name": "deptName",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tech_company_id": {
+ "name": "tech_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'partners'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'en'"
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mfa_enabled": {
+ "name": "mfa_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "mfa_secret": {
+ "name": "mfa_secret",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_locked": {
+ "name": "is_locked",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "lockout_until": {
+ "name": "lockout_until",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "failed_login_attempts": {
+ "name": "failed_login_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_login_at": {
+ "name": "last_login_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password_change_required": {
+ "name": "password_change_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "deactivated_at": {
+ "name": "deactivated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deactivation_reason": {
+ "name": "deactivation_reason",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_consent_update": {
+ "name": "last_consent_update",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consent_version": {
+ "name": "consent_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requires_consent_update": {
+ "name": "requires_consent_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "users_email_idx": {
+ "name": "users_email_idx",
+ "columns": [
+ {
+ "expression": "email",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "users_phone_idx": {
+ "name": "users_phone_idx",
+ "columns": [
+ {
+ "expression": "phone",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "users_company_id_vendors_id_fk": {
+ "name": "users_company_id_vendors_id_fk",
+ "tableFrom": "users",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "users_tech_company_id_tech_vendors_id_fk": {
+ "name": "users_tech_company_id_tech_vendors_id_fk",
+ "tableFrom": "users",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "tech_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "users_email_unique": {
+ "name": "users_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.form_entries": {
+ "name": "form_entries",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "form_entries_contract_item_id_contract_items_id_fk": {
+ "name": "form_entries_contract_item_id_contract_items_id_fk",
+ "tableFrom": "form_entries",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.form_metas": {
+ "name": "form_metas",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "columns": {
+ "name": "columns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "form_metas_project_id_projects_id_fk": {
+ "name": "form_metas_project_id_projects_id_fk",
+ "tableFrom": "form_metas",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "form_code_project_unique": {
+ "name": "form_code_project_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "form_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.forms": {
+ "name": "forms",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "forms_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "eng": {
+ "name": "eng",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "im": {
+ "name": "im",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "contract_item_form_code_unique": {
+ "name": "contract_item_form_code_unique",
+ "columns": [
+ {
+ "expression": "contract_item_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "form_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "forms_contract_item_id_contract_items_id_fk": {
+ "name": "forms_contract_item_id_contract_items_id_fk",
+ "tableFrom": "forms",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_class_attributes": {
+ "name": "tag_class_attributes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tag_class_attributes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_class_id": {
+ "name": "tag_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "att_id": {
+ "name": "att_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "def_val": {
+ "name": "def_val",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uom_id": {
+ "name": "uom_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "seq": {
+ "name": "seq",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "tag_class_attributes_seq_idx": {
+ "name": "tag_class_attributes_seq_idx",
+ "columns": [
+ {
+ "expression": "seq",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "tag_class_attributes_tag_class_id_tag_classes_id_fk": {
+ "name": "tag_class_attributes_tag_class_id_tag_classes_id_fk",
+ "tableFrom": "tag_class_attributes",
+ "tableTo": "tag_classes",
+ "columnsFrom": [
+ "tag_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_att_id_in_tag_class": {
+ "name": "uniq_att_id_in_tag_class",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_class_id",
+ "att_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_classes": {
+ "name": "tag_classes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tag_classes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subclasses": {
+ "name": "subclasses",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'[]'::json"
+ },
+ "subclass_remark": {
+ "name": "subclass_remark",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{}'::json"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_classes_project_id_projects_id_fk": {
+ "name": "tag_classes_project_id_projects_id_fk",
+ "tableFrom": "tag_classes",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tag_classes_tag_type_code_project_id_tag_types_code_project_id_fk": {
+ "name": "tag_classes_tag_type_code_project_id_tag_types_code_project_id_fk",
+ "tableFrom": "tag_classes",
+ "tableTo": "tag_types",
+ "columnsFrom": [
+ "tag_type_code",
+ "project_id"
+ ],
+ "columnsTo": [
+ "code",
+ "project_id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_code_in_project": {
+ "name": "uniq_code_in_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_subfield_options": {
+ "name": "tag_subfield_options",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_subfield_options_project_id_projects_id_fk": {
+ "name": "tag_subfield_options_project_id_projects_id_fk",
+ "tableFrom": "tag_subfield_options",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_attribute_project_code": {
+ "name": "uniq_attribute_project_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "attributes_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_subfields": {
+ "name": "tag_subfields",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_description": {
+ "name": "attributes_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expression": {
+ "name": "expression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delimiter": {
+ "name": "delimiter",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_subfields_project_id_projects_id_fk": {
+ "name": "tag_subfields_project_id_projects_id_fk",
+ "tableFrom": "tag_subfields",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_tag_type_attribute": {
+ "name": "uniq_tag_type_attribute",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "tag_type_code",
+ "attributes_id"
+ ]
+ },
+ "uniq_attribute_id_project": {
+ "name": "uniq_attribute_id_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "attributes_id",
+ "project_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_type_class_form_mappings": {
+ "name": "tag_type_class_form_mappings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_label": {
+ "name": "tag_type_label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "class_label": {
+ "name": "class_label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ep": {
+ "name": "ep",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_mapping_in_project": {
+ "name": "uniq_mapping_in_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "tag_type_label",
+ "class_label",
+ "form_code",
+ "remark"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_types": {
+ "name": "tag_types",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_types_project_id_projects_id_fk": {
+ "name": "tag_types_project_id_projects_id_fk",
+ "tableFrom": "tag_types",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tag_types_code_project_id_pk": {
+ "name": "tag_types_code_project_id_pk",
+ "columns": [
+ "code",
+ "project_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tags": {
+ "name": "tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tags_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_id": {
+ "name": "form_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_idx": {
+ "name": "tag_idx",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_no": {
+ "name": "tag_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type": {
+ "name": "tag_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "class": {
+ "name": "class",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_class_id": {
+ "name": "tag_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tags_contract_item_id_contract_items_id_fk": {
+ "name": "tags_contract_item_id_contract_items_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tags_form_id_forms_id_fk": {
+ "name": "tags_form_id_forms_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "forms",
+ "columnsFrom": [
+ "form_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tags_tag_class_id_tag_classes_id_fk": {
+ "name": "tags_tag_class_id_tag_classes_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "tag_classes",
+ "columnsFrom": [
+ "tag_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contract_item_tag_idx_unique": {
+ "name": "contract_item_tag_idx_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_item_id",
+ "tag_idx"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_items": {
+ "name": "template_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "form_mapping_id": {
+ "name": "form_mapping_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tmpl_id": {
+ "name": "tmpl_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tmpl_type": {
+ "name": "tmpl_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "spr_lst_setup": {
+ "name": "spr_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "grd_lst_setup": {
+ "name": "grd_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "spr_itm_lst_setup": {
+ "name": "spr_itm_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_items_form_mapping_id_tag_type_class_form_mappings_id_fk": {
+ "name": "template_items_form_mapping_id_tag_type_class_form_mappings_id_fk",
+ "tableFrom": "template_items",
+ "tableTo": "tag_type_class_form_mappings",
+ "columnsFrom": [
+ "form_mapping_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_tmpl_in_form_mapping": {
+ "name": "uniq_tmpl_in_form_mapping",
+ "nullsNotDistinct": false,
+ "columns": [
+ "form_mapping_id",
+ "tmpl_id"
+ ]
+ },
+ "uniq_name_in_form_mapping": {
+ "name": "uniq_name_in_form_mapping",
+ "nullsNotDistinct": false,
+ "columns": [
+ "form_mapping_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_data_report_temps": {
+ "name": "vendor_data_report_temps",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_id": {
+ "name": "form_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_data_report_temps_contract_item_id_contract_items_id_fk": {
+ "name": "vendor_data_report_temps_contract_item_id_contract_items_id_fk",
+ "tableFrom": "vendor_data_report_temps",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_data_report_temps_form_id_forms_id_fk": {
+ "name": "vendor_data_report_temps_form_id_forms_id_fk",
+ "tableFrom": "vendor_data_report_temps",
+ "tableTo": "forms",
+ "columnsFrom": [
+ "form_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.change_logs": {
+ "name": "change_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_id": {
+ "name": "entity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "changed_fields": {
+ "name": "changed_fields",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "old_values": {
+ "name": "old_values",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_values": {
+ "name": "new_values",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_name": {
+ "name": "user_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_synced": {
+ "name": "is_synced",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "sync_attempts": {
+ "name": "sync_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "last_sync_error": {
+ "name": "last_sync_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "synced_at": {
+ "name": "synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_systems": {
+ "name": "target_systems",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'[]'::jsonb"
+ }
+ },
+ "indexes": {
+ "idx_change_logs_vendor_synced": {
+ "name": "idx_change_logs_vendor_synced",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_synced",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_created_at": {
+ "name": "idx_change_logs_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_entity": {
+ "name": "idx_change_logs_entity",
+ "columns": [
+ {
+ "expression": "entity_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "entity_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_sync_attempts": {
+ "name": "idx_change_logs_sync_attempts",
+ "columns": [
+ {
+ "expression": "sync_attempts",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_attachments": {
+ "name": "document_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "document_attachments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upload_id": {
+ "name": "upload_id",
+ "type": "varchar(36)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "varchar(36)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dolce_file_path": {
+ "name": "dolce_file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_attachments_revision_id_revisions_id_fk": {
+ "name": "document_attachments_revision_id_revisions_id_fk",
+ "tableFrom": "document_attachments",
+ "tableTo": "revisions",
+ "columnsFrom": [
+ "revision_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.documents": {
+ "name": "documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "documents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_move_gbn": {
+ "name": "drawing_move_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discipline": {
+ "name": "discipline",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_document_id": {
+ "name": "external_document_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_system_type": {
+ "name": "external_system_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_synced_at": {
+ "name": "external_synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_drawing_no": {
+ "name": "shi_drawing_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager": {
+ "name": "manager",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_enm": {
+ "name": "manager_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_no": {
+ "name": "manager_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group": {
+ "name": "register_group",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group_id": {
+ "name": "register_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_no": {
+ "name": "create_user_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_id": {
+ "name": "create_user_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_enm": {
+ "name": "create_user_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_contract_doc_status": {
+ "name": "unique_contract_doc_status",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_contract_vendor_doc": {
+ "name": "unique_contract_vendor_doc",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"vendor_doc_number\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_external_doc": {
+ "name": "unique_external_doc",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_system_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"external_document_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_project_doc_status": {
+ "name": "unique_project_doc_status",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_external_doc_project": {
+ "name": "unique_external_doc_project",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_system_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"external_document_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "drawing_kind_idx": {
+ "name": "drawing_kind_idx",
+ "columns": [
+ {
+ "expression": "drawing_kind",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "documents_project_id_projects_id_fk": {
+ "name": "documents_project_id_projects_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "documents_contract_id_contracts_id_fk": {
+ "name": "documents_contract_id_contracts_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "documents_vendor_id_vendors_id_fk": {
+ "name": "documents_vendor_id_vendors_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_stages": {
+ "name": "issue_stages",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "issue_stages_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_name": {
+ "name": "stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "plan_date": {
+ "name": "plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actual_date": {
+ "name": "actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stage_status": {
+ "name": "stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "stage_order": {
+ "name": "stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'MEDIUM'"
+ },
+ "assignee_id": {
+ "name": "assignee_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assignee_name": {
+ "name": "assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reminder_days": {
+ "name": "reminder_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_document_stage": {
+ "name": "unique_document_stage",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "document_stage_order": {
+ "name": "document_stage_order",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_order",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_stages_document_id_documents_id_fk": {
+ "name": "issue_stages_document_id_documents_id_fk",
+ "tableFrom": "issue_stages",
+ "tableTo": "documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.revisions": {
+ "name": "revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "revisions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "issue_stage_id": {
+ "name": "issue_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "uploader_type": {
+ "name": "uploader_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'vendor'"
+ },
+ "uploader_id": {
+ "name": "uploader_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploader_name": {
+ "name": "uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage": {
+ "name": "usage",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_type": {
+ "name": "usage_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_status": {
+ "name": "revision_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'SUBMITTED'"
+ },
+ "submitted_date": {
+ "name": "submitted_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_start_date": {
+ "name": "review_start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_date": {
+ "name": "approved_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejected_date": {
+ "name": "rejected_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_id": {
+ "name": "reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_name": {
+ "name": "reviewer_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_upload_id": {
+ "name": "external_upload_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "register_id": {
+ "name": "register_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "unique_stage_revision_usage": {
+ "name": "unique_stage_revision_usage",
+ "columns": [
+ {
+ "expression": "issue_stage_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "usage",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "COALESCE(\"usage_type\", '')",
+ "asc": true,
+ "isExpression": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.stage_documents": {
+ "name": "stage_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "stage_documents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_project_doc": {
+ "name": "unique_project_doc",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_project_vendor_doc": {
+ "name": "unique_project_vendor_doc",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"stage_documents\".\"vendor_doc_number\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_doc_vendor_id_idx": {
+ "name": "stage_doc_vendor_id_idx",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_doc_status_idx": {
+ "name": "stage_doc_status_idx",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "stage_documents_project_id_projects_id_fk": {
+ "name": "stage_documents_project_id_projects_id_fk",
+ "tableFrom": "stage_documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.stage_issue_stages": {
+ "name": "stage_issue_stages",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "stage_issue_stages_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_name": {
+ "name": "stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "plan_date": {
+ "name": "plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actual_date": {
+ "name": "actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stage_status": {
+ "name": "stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "stage_order": {
+ "name": "stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'MEDIUM'"
+ },
+ "assignee_id": {
+ "name": "assignee_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assignee_name": {
+ "name": "assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reminder_days": {
+ "name": "reminder_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_stage_document_stage": {
+ "name": "unique_stage_document_stage",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_document_stage_order": {
+ "name": "stage_document_stage_order",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_order",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "stage_issue_stages_document_id_stage_documents_id_fk": {
+ "name": "stage_issue_stages_document_id_stage_documents_id_fk",
+ "tableFrom": "stage_issue_stages",
+ "tableTo": "stage_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_batches": {
+ "name": "sync_batches",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "batch_size": {
+ "name": "batch_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "retry_count": {
+ "name": "retry_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "change_log_ids": {
+ "name": "change_log_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "success_count": {
+ "name": "success_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "failure_count": {
+ "name": "failure_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_metadata": {
+ "name": "sync_metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_sync_batches_project_system": {
+ "name": "idx_sync_batches_project_system",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_system",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sync_batches_status": {
+ "name": "idx_sync_batches_status",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sync_batches_created_at": {
+ "name": "idx_sync_batches_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_configs": {
+ "name": "sync_configs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_enabled": {
+ "name": "sync_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "sync_interval_minutes": {
+ "name": "sync_interval_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 30
+ },
+ "last_successful_sync": {
+ "name": "last_successful_sync",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_sync_attempt": {
+ "name": "last_sync_attempt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpoint_url": {
+ "name": "endpoint_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_token": {
+ "name": "auth_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_version": {
+ "name": "api_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'v1'"
+ },
+ "max_batch_size": {
+ "name": "max_batch_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 100
+ },
+ "retry_max_attempts": {
+ "name": "retry_max_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_sync_configs_contract_system": {
+ "name": "idx_sync_configs_contract_system",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_system",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_attachments": {
+ "name": "vendor_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'GENERAL'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_attachments_vendor_id_vendors_id_fk": {
+ "name": "vendor_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_candidates": {
+ "name": "vendor_candidates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'COLLECTED'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_candidates_vendor_id_vendors_id_fk": {
+ "name": "vendor_candidates_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_candidates",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_contacts": {
+ "name": "vendor_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_position": {
+ "name": "contact_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_department": {
+ "name": "contact_department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_task": {
+ "name": "contact_task",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_primary": {
+ "name": "is_primary",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_contacts_vendor_id_vendors_id_fk": {
+ "name": "vendor_contacts_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_contacts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_possible_items": {
+ "name": "vendor_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_possible_items_vendor_id_vendors_id_fk": {
+ "name": "vendor_possible_items_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_possible_items",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_possible_items_item_code_items_item_code_fk": {
+ "name": "vendor_possible_items_item_code_items_item_code_fk",
+ "tableFrom": "vendor_possible_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_possible_materials": {
+ "name": "vendor_possible_materials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_possible_materials_vendor_id_vendors_id_fk": {
+ "name": "vendor_possible_materials_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_possible_materials",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_possible_materials_item_code_materials_item_code_fk": {
+ "name": "vendor_possible_materials_item_code_materials_item_code_fk",
+ "tableFrom": "vendor_possible_materials",
+ "tableTo": "materials",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_types": {
+ "name": "vendor_types",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_ko": {
+ "name": "name_ko",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_en": {
+ "name": "name_en",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_types_code_unique": {
+ "name": "vendor_types_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendors": {
+ "name": "vendors",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "vendor_type_id": {
+ "name": "vendor_type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_work_expirence": {
+ "name": "representative_work_expirence",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "corporate_registration_number": {
+ "name": "corporate_registration_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_agency": {
+ "name": "credit_agency",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_rating": {
+ "name": "credit_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cash_flow_rating": {
+ "name": "cash_flow_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "business_size": {
+ "name": "business_size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendors_vendor_type_id_vendor_types_id_fk": {
+ "name": "vendors_vendor_type_id_vendor_types_id_fk",
+ "tableFrom": "vendors",
+ "tableTo": "vendor_types",
+ "columnsFrom": [
+ "vendor_type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tasks": {
+ "name": "tasks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(30)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'todo'"
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bug'"
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'low'"
+ },
+ "archived": {
+ "name": "archived",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "current_timestamp"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "tasks_code_unique": {
+ "name": "tasks_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_candidate_logs": {
+ "name": "vendor_candidate_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_candidate_id": {
+ "name": "vendor_candidate_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_candidate_logs_vendor_candidate_id_vendor_candidates_id_fk": {
+ "name": "vendor_candidate_logs_vendor_candidate_id_vendor_candidates_id_fk",
+ "tableFrom": "vendor_candidate_logs",
+ "tableTo": "vendor_candidates",
+ "columnsFrom": [
+ "vendor_candidate_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_candidate_logs_user_id_users_id_fk": {
+ "name": "vendor_candidate_logs_user_id_users_id_fk",
+ "tableFrom": "vendor_candidate_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendors_logs": {
+ "name": "vendors_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendors_logs_vendor_id_vendors_id_fk": {
+ "name": "vendors_logs_vendor_id_vendors_id_fk",
+ "tableFrom": "vendors_logs",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendors_logs_user_id_users_id_fk": {
+ "name": "vendors_logs_user_id_users_id_fk",
+ "tableFrom": "vendors_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.basic_contract": {
+ "name": "basic_contract",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "basic_contract_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_by": {
+ "name": "requested_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "basic_contract_template_id_basic_contract_templates_id_fk": {
+ "name": "basic_contract_template_id_basic_contract_templates_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "basic_contract_templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_vendor_id_vendors_id_fk": {
+ "name": "basic_contract_vendor_id_vendors_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_requested_by_users_id_fk": {
+ "name": "basic_contract_requested_by_users_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requested_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.basic_contract_templates": {
+ "name": "basic_contract_templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "basic_contract_templates_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "template_name": {
+ "name": "template_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validity_period": {
+ "name": "validity_period",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_review_required": {
+ "name": "legal_review_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "shipbuilding_applicable": {
+ "name": "shipbuilding_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "wind_applicable": {
+ "name": "wind_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "pc_applicable": {
+ "name": "pc_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "nb_applicable": {
+ "name": "nb_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "rc_applicable": {
+ "name": "rc_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "gy_applicable": {
+ "name": "gy_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sys_applicable": {
+ "name": "sys_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "infra_applicable": {
+ "name": "infra_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disposed_at": {
+ "name": "disposed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restored_at": {
+ "name": "restored_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "basic_contract_templates_created_by_users_id_fk": {
+ "name": "basic_contract_templates_created_by_users_id_fk",
+ "tableFrom": "basic_contract_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_templates_updated_by_users_id_fk": {
+ "name": "basic_contract_templates_updated_by_users_id_fk",
+ "tableFrom": "basic_contract_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "template_name_revision_unique": {
+ "name": "template_name_revision_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "template_name",
+ "revision"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.incoterms": {
+ "name": "incoterms",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(20)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.payment_terms": {
+ "name": "payment_terms",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.place_of_shipping": {
+ "name": "place_of_shipping",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(20)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_items": {
+ "name": "pr_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_item": {
+ "name": "rfq_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item": {
+ "name": "pr_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_no": {
+ "name": "pr_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_category": {
+ "name": "material_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "acc": {
+ "name": "acc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "size": {
+ "name": "size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gross_weight": {
+ "name": "gross_weight",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "gw_uom": {
+ "name": "gw_uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_no": {
+ "name": "spec_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_url": {
+ "name": "spec_url",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tracking_no": {
+ "name": "tracking_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_yn": {
+ "name": "major_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "project_def": {
+ "name": "project_def",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_sc": {
+ "name": "project_sc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_kl": {
+ "name": "project_kl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_lc": {
+ "name": "project_lc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_dl": {
+ "name": "project_dl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_items_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "pr_items_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "pr_items",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_attachments": {
+ "name": "procurement_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "procurement_rfq_details_id": {
+ "name": "procurement_rfq_details_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_attachments_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "procurement_attachments_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_attachments_procurement_rfq_details_id_procurement_rfq_details_id_fk": {
+ "name": "procurement_attachments_procurement_rfq_details_id_procurement_rfq_details_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "procurement_rfq_details",
+ "columnsFrom": [
+ "procurement_rfq_details_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_attachments_created_by_users_id_fk": {
+ "name": "procurement_attachments_created_by_users_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "attachment_type_check": {
+ "name": "attachment_type_check",
+ "value": "\"procurement_attachments\".\"procurement_rfqs_id\" IS NOT NULL OR \"procurement_attachments\".\"procurement_rfq_details_id\" IS NOT NULL"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.procurement_quotation_items": {
+ "name": "procurement_quotation_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_price": {
+ "name": "unit_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "vendor_material_code": {
+ "name": "vendor_material_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_material_description": {
+ "name": "vendor_material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "lead_time_in_days": {
+ "name": "lead_time_in_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_rate": {
+ "name": "tax_rate",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_amount": {
+ "name": "tax_amount",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount_rate": {
+ "name": "discount_rate",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount_amount": {
+ "name": "discount_amount",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_alternative": {
+ "name": "is_alternative",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_recommended": {
+ "name": "is_recommended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_quotation_items_quotation_id_procurement_vendor_quotations_id_fk": {
+ "name": "procurement_quotation_items_quotation_id_procurement_vendor_quotations_id_fk",
+ "tableFrom": "procurement_quotation_items",
+ "tableTo": "procurement_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_quotation_items_pr_item_id_pr_items_id_fk": {
+ "name": "procurement_quotation_items_pr_item_id_pr_items_id_fk",
+ "tableFrom": "procurement_quotation_items",
+ "tableTo": "pr_items",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_attachments": {
+ "name": "procurement_rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_attachments_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_attachments_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_comment_id_procurement_rfq_comments_id_fk": {
+ "name": "procurement_rfq_attachments_comment_id_procurement_rfq_comments_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_quotation_id_procurement_vendor_quotations_id_fk": {
+ "name": "procurement_rfq_attachments_quotation_id_procurement_vendor_quotations_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_uploaded_by_users_id_fk": {
+ "name": "procurement_rfq_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_vendor_id_vendors_id_fk": {
+ "name": "procurement_rfq_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_comments": {
+ "name": "procurement_rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_comment": {
+ "name": "is_vendor_comment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_comments_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_comments_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_vendor_id_vendors_id_fk": {
+ "name": "procurement_rfq_comments_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_user_id_users_id_fk": {
+ "name": "procurement_rfq_comments_user_id_users_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_parent_comment_id_procurement_rfq_comments_id_fk": {
+ "name": "procurement_rfq_comments_parent_comment_id_procurement_rfq_comments_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "procurement_rfq_comments",
+ "columnsFrom": [
+ "parent_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_details": {
+ "name": "procurement_rfq_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendors_id": {
+ "name": "vendors_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_detail": {
+ "name": "incoterms_detail",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'VV'"
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_details_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_details_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_vendors_id_vendors_id_fk": {
+ "name": "procurement_rfq_details_vendors_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendors_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_payment_terms_code_payment_terms_code_fk": {
+ "name": "procurement_rfq_details_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_incoterms_code_incoterms_code_fk": {
+ "name": "procurement_rfq_details_incoterms_code_incoterms_code_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_updated_by_users_id_fk": {
+ "name": "procurement_rfq_details_updated_by_users_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfqs": {
+ "name": "procurement_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "series": {
+ "name": "series",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_send_date": {
+ "name": "rfq_send_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'RFQ Created'"
+ },
+ "rfq_sealed_yn": {
+ "name": "rfq_sealed_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sent_by": {
+ "name": "sent_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfqs_sent_by_users_id_fk": {
+ "name": "procurement_rfqs_sent_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "sent_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfqs_created_by_users_id_fk": {
+ "name": "procurement_rfqs_created_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfqs_updated_by_users_id_fk": {
+ "name": "procurement_rfqs_updated_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "procurement_rfqs_rfq_code_unique": {
+ "name": "procurement_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_vendor_quotations": {
+ "name": "procurement_vendor_quotations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quotation_code": {
+ "name": "quotation_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_version": {
+ "name": "quotation_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "total_items_count": {
+ "name": "total_items_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sub_total": {
+ "name": "sub_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "tax_total": {
+ "name": "tax_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "discount_total": {
+ "name": "discount_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "valid_until": {
+ "name": "valid_until",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "estimated_delivery_date": {
+ "name": "estimated_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_detail": {
+ "name": "incoterms_detail",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Draft'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejection_reason": {
+ "name": "rejection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accepted_at": {
+ "name": "accepted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_vendor_quotations_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_vendor_quotations_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_vendor_id_vendors_id_fk": {
+ "name": "procurement_vendor_quotations_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_payment_terms_code_payment_terms_code_fk": {
+ "name": "procurement_vendor_quotations_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_incoterms_code_incoterms_code_fk": {
+ "name": "procurement_vendor_quotations_incoterms_code_incoterms_code_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preset_shares": {
+ "name": "preset_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "preset_id": {
+ "name": "preset_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "shared_with_user_id": {
+ "name": "shared_with_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission": {
+ "name": "permission",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preset_shares_preset_id_table_presets_id_fk": {
+ "name": "preset_shares_preset_id_table_presets_id_fk",
+ "tableFrom": "preset_shares",
+ "tableTo": "table_presets",
+ "columnsFrom": [
+ "preset_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.table_presets": {
+ "name": "table_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "table_id": {
+ "name": "table_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "settings": {
+ "name": "settings",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_shared": {
+ "name": "is_shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_attachments": {
+ "name": "tech_sales_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tech_sales_rfq_id": {
+ "name": "tech_sales_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_attachments_tech_sales_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_attachments_tech_sales_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_attachments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "tech_sales_rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_attachments_created_by_users_id_fk": {
+ "name": "tech_sales_attachments_created_by_users_id_fk",
+ "tableFrom": "tech_sales_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_contact_possible_items": {
+ "name": "tech_sales_contact_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "contact_id": {
+ "name": "contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_possible_item_id": {
+ "name": "vendor_possible_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_contact_possible_items_contact_id_tech_vendor_contacts_id_fk": {
+ "name": "tech_sales_contact_possible_items_contact_id_tech_vendor_contacts_id_fk",
+ "tableFrom": "tech_sales_contact_possible_items",
+ "tableTo": "tech_vendor_contacts",
+ "columnsFrom": [
+ "contact_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_contact_possible_items_vendor_possible_item_id_tech_vendor_possible_items_id_fk": {
+ "name": "tech_sales_contact_possible_items_vendor_possible_item_id_tech_vendor_possible_items_id_fk",
+ "tableFrom": "tech_sales_contact_possible_items",
+ "tableTo": "tech_vendor_possible_items",
+ "columnsFrom": [
+ "vendor_possible_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_comment_attachments": {
+ "name": "tech_sales_rfq_comment_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_comment_attachments_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_comment_id_tech_sales_rfq_comments_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_comment_id_tech_sales_rfq_comments_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_uploaded_by_users_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_comments": {
+ "name": "tech_sales_rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_comment": {
+ "name": "is_vendor_comment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_comments_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_comments_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_rfq_comments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_user_id_users_id_fk": {
+ "name": "tech_sales_rfq_comments_user_id_users_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_parent_comment_id_tech_sales_rfq_comments_id_fk": {
+ "name": "tech_sales_rfq_comments_parent_comment_id_tech_sales_rfq_comments_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_sales_rfq_comments",
+ "columnsFrom": [
+ "parent_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_items": {
+ "name": "tech_sales_rfq_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_shipbuilding_id": {
+ "name": "item_shipbuilding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_offshore_top_id": {
+ "name": "item_offshore_top_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_offshore_hull_id": {
+ "name": "item_offshore_hull_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_type": {
+ "name": "item_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_items_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_items_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_shipbuilding_id_item_shipbuilding_id_fk": {
+ "name": "tech_sales_rfq_items_item_shipbuilding_id_item_shipbuilding_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_shipbuilding",
+ "columnsFrom": [
+ "item_shipbuilding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_offshore_top_id_item_offshore_top_id_fk": {
+ "name": "tech_sales_rfq_items_item_offshore_top_id_item_offshore_top_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_offshore_top",
+ "columnsFrom": [
+ "item_offshore_top_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_offshore_hull_id_item_offshore_hull_id_fk": {
+ "name": "tech_sales_rfq_items_item_offshore_hull_id_item_offshore_hull_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_offshore_hull",
+ "columnsFrom": [
+ "item_offshore_hull_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfqs": {
+ "name": "tech_sales_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_project_id": {
+ "name": "bidding_project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_send_date": {
+ "name": "rfq_send_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'RFQ Created'"
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sent_by": {
+ "name": "sent_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'SHIP'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfqs_bidding_project_id_bidding_projects_id_fk": {
+ "name": "tech_sales_rfqs_bidding_project_id_bidding_projects_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "bidding_project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_sent_by_users_id_fk": {
+ "name": "tech_sales_rfqs_sent_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "sent_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_created_by_users_id_fk": {
+ "name": "tech_sales_rfqs_created_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_updated_by_users_id_fk": {
+ "name": "tech_sales_rfqs_updated_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "tech_sales_rfqs_rfq_code_unique": {
+ "name": "tech_sales_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_attachments": {
+ "name": "tech_sales_vendor_quotation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_vendor_quotation_attachments_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotation_attachments_uploaded_by_users_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotation_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_contacts": {
+ "name": "tech_sales_vendor_quotation_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_id": {
+ "name": "contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_revisions": {
+ "name": "tech_sales_vendor_quotation_revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "snapshot": {
+ "name": "snapshot",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_note": {
+ "name": "revision_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revised_by": {
+ "name": "revised_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revised_at": {
+ "name": "revised_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "tech_sales_quotation_revisions_quotation_version_idx": {
+ "name": "tech_sales_quotation_revisions_quotation_version_idx",
+ "columns": [
+ {
+ "expression": "quotation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "tech_sales_vendor_quotation_revisions_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_vendor_quotation_revisions_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_revisions",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotations": {
+ "name": "tech_sales_vendor_quotations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quotation_code": {
+ "name": "quotation_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_version": {
+ "name": "quotation_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_until": {
+ "name": "valid_until",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_flags": {
+ "name": "vendor_flags",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Assigned'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejection_reason": {
+ "name": "rejection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accepted_at": {
+ "name": "accepted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_vendor_quotations_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_vendor_quotations_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_vendor_quotations",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotations_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_vendor_quotations_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_vendor_quotations",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_rotation_attempts": {
+ "name": "ocr_rotation_attempts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rotation": {
+ "name": "rotation",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "confidence": {
+ "name": "confidence",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tables_found": {
+ "name": "tables_found",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "text_quality": {
+ "name": "text_quality",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "keyword_count": {
+ "name": "keyword_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "extracted_rows_count": {
+ "name": "extracted_rows_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ocr_rotation_attempts_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_rotation_attempts_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_rotation_attempts",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_rows": {
+ "name": "ocr_rows",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "table_id": {
+ "name": "table_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "row_index": {
+ "name": "row_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "report_no": {
+ "name": "report_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "inspection_date": {
+ "name": "inspection_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "no": {
+ "name": "no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identification_no": {
+ "name": "identification_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_no": {
+ "name": "tag_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joint_no": {
+ "name": "joint_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joint_type": {
+ "name": "joint_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "welding_date": {
+ "name": "welding_date",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confidence": {
+ "name": "confidence",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source_table": {
+ "name": "source_table",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source_row": {
+ "name": "source_row",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_ocr_report_no_unique": {
+ "name": "idx_ocr_report_no_unique",
+ "columns": [
+ {
+ "expression": "report_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "tag_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "joint_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "joint_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ocr_rows_table_id_ocr_tables_id_fk": {
+ "name": "ocr_rows_table_id_ocr_tables_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "ocr_tables",
+ "columnsFrom": [
+ "table_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ocr_rows_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_rows_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ocr_rows_user_id_users_id_fk": {
+ "name": "ocr_rows_user_id_users_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_sessions": {
+ "name": "ocr_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "processing_time": {
+ "name": "processing_time",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "best_rotation": {
+ "name": "best_rotation",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_tables": {
+ "name": "total_tables",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_rows": {
+ "name": "total_rows",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "image_enhanced": {
+ "name": "image_enhanced",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "pdf_converted": {
+ "name": "pdf_converted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "warnings": {
+ "name": "warnings",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_tables": {
+ "name": "ocr_tables",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "table_index": {
+ "name": "table_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "row_count": {
+ "name": "row_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ocr_tables_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_tables_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_tables",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfq_attachment_revisions": {
+ "name": "b_rfq_attachment_revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_no": {
+ "name": "revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_comment": {
+ "name": "revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest": {
+ "name": "is_latest",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "latest_revision_idx": {
+ "name": "latest_revision_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_latest",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"b_rfq_attachment_revisions\".\"is_latest\" = $1",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "attachment_revision_idx": {
+ "name": "attachment_revision_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "b_rfq_attachment_revisions_attachment_id_b_rfq_attachments_id_fk": {
+ "name": "b_rfq_attachment_revisions_attachment_id_b_rfq_attachments_id_fk",
+ "tableFrom": "b_rfq_attachment_revisions",
+ "tableTo": "b_rfq_attachments",
+ "columnsFrom": [
+ "attachment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "b_rfq_attachment_revisions_created_by_users_id_fk": {
+ "name": "b_rfq_attachment_revisions_created_by_users_id_fk",
+ "tableFrom": "b_rfq_attachment_revisions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfqs": {
+ "name": "b_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "b_rfqs_project_id_projects_id_fk": {
+ "name": "b_rfqs_project_id_projects_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "b_rfqs_created_by_users_id_fk": {
+ "name": "b_rfqs_created_by_users_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "b_rfqs_updated_by_users_id_fk": {
+ "name": "b_rfqs_updated_by_users_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "b_rfqs_rfq_code_unique": {
+ "name": "b_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfq_attachments": {
+ "name": "b_rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Rev.0'"
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "b_rfq_attachments_rfq_id_b_rfqs_id_fk": {
+ "name": "b_rfq_attachments_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "b_rfq_attachments",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "b_rfq_attachments_created_by_users_id_fk": {
+ "name": "b_rfq_attachments_created_by_users_id_fk",
+ "tableFrom": "b_rfq_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.final_rfq": {
+ "name": "final_rfq",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "final_rfq_status": {
+ "name": "final_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'VV'"
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "firsttime_yn": {
+ "name": "firsttime_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_remark": {
+ "name": "vendor_remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "final_rfq_rfq_id_b_rfqs_id_fk": {
+ "name": "final_rfq_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "final_rfq_vendor_id_vendors_id_fk": {
+ "name": "final_rfq_vendor_id_vendors_id_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "final_rfq_incoterms_code_incoterms_code_fk": {
+ "name": "final_rfq_incoterms_code_incoterms_code_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "final_rfq_payment_terms_code_payment_terms_code_fk": {
+ "name": "final_rfq_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.initial_rfq": {
+ "name": "initial_rfq",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "initial_rfq_status": {
+ "name": "initial_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "rfq_revision": {
+ "name": "rfq_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "initial_rfq_rfq_id_b_rfqs_id_fk": {
+ "name": "initial_rfq_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "initial_rfq_vendor_id_vendors_id_fk": {
+ "name": "initial_rfq_vendor_id_vendors_id_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "initial_rfq_incoterms_code_incoterms_code_fk": {
+ "name": "initial_rfq_incoterms_code_incoterms_code_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_attachment_responses": {
+ "name": "vendor_attachment_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'NOT_RESPONDED'"
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'Rev.0'"
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "vendor_response_idx": {
+ "name": "vendor_response_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "rfq_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_attachment_responses_attachment_id_b_rfq_attachments_id_fk": {
+ "name": "vendor_attachment_responses_attachment_id_b_rfq_attachments_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "b_rfq_attachments",
+ "columnsFrom": [
+ "attachment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_vendor_id_vendors_id_fk": {
+ "name": "vendor_attachment_responses_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_created_by_users_id_fk": {
+ "name": "vendor_attachment_responses_created_by_users_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_updated_by_users_id_fk": {
+ "name": "vendor_attachment_responses_updated_by_users_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_attachments_b": {
+ "name": "vendor_response_attachments_b",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_attachments_b_vendor_response_id_vendor_attachment_responses_id_fk": {
+ "name": "vendor_response_attachments_b_vendor_response_id_vendor_attachment_responses_id_fk",
+ "tableFrom": "vendor_response_attachments_b",
+ "tableTo": "vendor_attachment_responses",
+ "columnsFrom": [
+ "vendor_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_b_uploaded_by_users_id_fk": {
+ "name": "vendor_response_attachments_b_uploaded_by_users_id_fk",
+ "tableFrom": "vendor_response_attachments_b",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_history": {
+ "name": "vendor_response_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_status": {
+ "name": "previous_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_by": {
+ "name": "action_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_at": {
+ "name": "action_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_history_vendor_response_id_vendor_attachment_responses_id_fk": {
+ "name": "vendor_response_history_vendor_response_id_vendor_attachment_responses_id_fk",
+ "tableFrom": "vendor_response_history",
+ "tableTo": "vendor_attachment_responses",
+ "columnsFrom": [
+ "vendor_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_history_action_by_users_id_fk": {
+ "name": "vendor_response_history_action_by_users_id_fk",
+ "tableFrom": "vendor_response_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "action_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_attachments": {
+ "name": "tech_vendor_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'GENERAL'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_contacts": {
+ "name": "tech_vendor_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_position": {
+ "name": "contact_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_title": {
+ "name": "contact_title",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_country": {
+ "name": "contact_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_primary": {
+ "name": "is_primary",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_contacts_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_contacts_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_contacts",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_possible_items": {
+ "name": "tech_vendor_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "shipbuilding_item_id": {
+ "name": "shipbuilding_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "offshore_top_item_id": {
+ "name": "offshore_top_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "offshore_hull_item_id": {
+ "name": "offshore_hull_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_possible_items_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_possible_items_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_shipbuilding_item_id_item_shipbuilding_id_fk": {
+ "name": "tech_vendor_possible_items_shipbuilding_item_id_item_shipbuilding_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_shipbuilding",
+ "columnsFrom": [
+ "shipbuilding_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_offshore_top_item_id_item_offshore_top_id_fk": {
+ "name": "tech_vendor_possible_items_offshore_top_item_id_item_offshore_top_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_offshore_top",
+ "columnsFrom": [
+ "offshore_top_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_offshore_hull_item_id_item_offshore_hull_id_fk": {
+ "name": "tech_vendor_possible_items_offshore_hull_item_id_item_offshore_hull_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_offshore_hull",
+ "columnsFrom": [
+ "offshore_hull_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendors": {
+ "name": "tech_vendors",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_eng": {
+ "name": "country_eng",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_fab": {
+ "name": "country_fab",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_name": {
+ "name": "agent_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_phone": {
+ "name": "agent_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_email": {
+ "name": "agent_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tech_vendor_type": {
+ "name": "tech_vendor_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "is_quote_comparison": {
+ "name": "is_quote_comparison",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_answer_options": {
+ "name": "esg_answer_options",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "esg_evaluation_item_id": {
+ "name": "esg_evaluation_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_text": {
+ "name": "answer_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_answer_options_esg_evaluation_item_id_esg_evaluation_items_id_fk": {
+ "name": "esg_answer_options_esg_evaluation_item_id_esg_evaluation_items_id_fk",
+ "tableFrom": "esg_answer_options",
+ "tableTo": "esg_evaluation_items",
+ "columnsFrom": [
+ "esg_evaluation_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluation_items": {
+ "name": "esg_evaluation_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "esg_evaluation_id": {
+ "name": "esg_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_item": {
+ "name": "evaluation_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_item_description": {
+ "name": "evaluation_item_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_evaluation_items_esg_evaluation_id_esg_evaluations_id_fk": {
+ "name": "esg_evaluation_items_esg_evaluation_id_esg_evaluations_id_fk",
+ "tableFrom": "esg_evaluation_items",
+ "tableTo": "esg_evaluations",
+ "columnsFrom": [
+ "esg_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluation_responses": {
+ "name": "esg_evaluation_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "esg_evaluation_item_id": {
+ "name": "esg_evaluation_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "esg_answer_option_id": {
+ "name": "esg_answer_option_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selected_score": {
+ "name": "selected_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "additional_comments": {
+ "name": "additional_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_evaluation_responses_submission_id_evaluation_submissions_id_fk": {
+ "name": "esg_evaluation_responses_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "esg_evaluation_responses_esg_evaluation_item_id_esg_evaluation_items_id_fk": {
+ "name": "esg_evaluation_responses_esg_evaluation_item_id_esg_evaluation_items_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "esg_evaluation_items",
+ "columnsFrom": [
+ "esg_evaluation_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "esg_evaluation_responses_esg_answer_option_id_esg_answer_options_id_fk": {
+ "name": "esg_evaluation_responses_esg_answer_option_id_esg_answer_options_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "esg_answer_options",
+ "columnsFrom": [
+ "esg_answer_option_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluations": {
+ "name": "esg_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "esg_evaluations_serial_number_unique": {
+ "name": "esg_evaluations_serial_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "serial_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_submissions": {
+ "name": "evaluation_submissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_round": {
+ "name": "evaluation_round",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_status": {
+ "name": "submission_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_by": {
+ "name": "reviewed_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "average_esg_score": {
+ "name": "average_esg_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_general_items": {
+ "name": "total_general_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "completed_general_items": {
+ "name": "completed_general_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "total_esg_items": {
+ "name": "total_esg_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "completed_esg_items": {
+ "name": "completed_esg_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_submissions_periodic_evaluation_id_periodic_evaluations_id_fk": {
+ "name": "evaluation_submissions_periodic_evaluation_id_periodic_evaluations_id_fk",
+ "tableFrom": "evaluation_submissions",
+ "tableTo": "periodic_evaluations",
+ "columnsFrom": [
+ "periodic_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_submissions_company_id_vendors_id_fk": {
+ "name": "evaluation_submissions_company_id_vendors_id_fk",
+ "tableFrom": "evaluation_submissions",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "evaluation_submissions_submission_id_unique": {
+ "name": "evaluation_submissions_submission_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "submission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.general_evaluation_responses": {
+ "name": "general_evaluation_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "general_evaluation_id": {
+ "name": "general_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_text": {
+ "name": "response_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_attachments": {
+ "name": "has_attachments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "general_evaluation_responses_submission_id_evaluation_submissions_id_fk": {
+ "name": "general_evaluation_responses_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "general_evaluation_responses",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "general_evaluation_responses_general_evaluation_id_general_evaluations_id_fk": {
+ "name": "general_evaluation_responses_general_evaluation_id_general_evaluations_id_fk",
+ "tableFrom": "general_evaluation_responses",
+ "tableTo": "general_evaluations",
+ "columnsFrom": [
+ "general_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.general_evaluations": {
+ "name": "general_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "general_evaluations_serial_number_unique": {
+ "name": "general_evaluations_serial_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "serial_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_evaluation_attachments": {
+ "name": "vendor_evaluation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "general_evaluation_response_id": {
+ "name": "general_evaluation_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stored_file_name": {
+ "name": "stored_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_evaluation_attachments_submission_id_evaluation_submissions_id_fk": {
+ "name": "vendor_evaluation_attachments_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "vendor_evaluation_attachments",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_evaluation_attachments_general_evaluation_response_id_general_evaluation_responses_id_fk": {
+ "name": "vendor_evaluation_attachments_general_evaluation_response_id_general_evaluation_responses_id_fk",
+ "tableFrom": "vendor_evaluation_attachments",
+ "tableTo": "general_evaluation_responses",
+ "columnsFrom": [
+ "general_evaluation_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_evaluation_attachments_file_id_unique": {
+ "name": "vendor_evaluation_attachments_file_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "file_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_target_reviewers": {
+ "name": "evaluation_target_reviewers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name_from": {
+ "name": "department_name_from",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "assigned_by": {
+ "name": "assigned_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_target_reviewers_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "evaluation_target_reviewers_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviewers_reviewer_user_id_users_id_fk": {
+ "name": "evaluation_target_reviewers_reviewer_user_id_users_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "reviewer_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviewers_assigned_by_users_id_fk": {
+ "name": "evaluation_target_reviewers_assigned_by_users_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "assigned_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_target_department": {
+ "name": "unique_target_department",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_target_reviews": {
+ "name": "evaluation_target_reviews",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_approved": {
+ "name": "is_approved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comment": {
+ "name": "review_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_target_reviews_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "evaluation_target_reviews_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "evaluation_target_reviews",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviews_reviewer_user_id_users_id_fk": {
+ "name": "evaluation_target_reviews_reviewer_user_id_users_id_fk",
+ "tableFrom": "evaluation_target_reviews",
+ "tableTo": "users",
+ "columnsFrom": [
+ "reviewer_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_target_reviewer": {
+ "name": "unique_target_reviewer",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "reviewer_user_id",
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_targets": {
+ "name": "evaluation_targets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_user_id": {
+ "name": "admin_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_targets_vendor_id_vendors_id_fk": {
+ "name": "evaluation_targets_vendor_id_vendors_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_targets_admin_user_id_users_id_fk": {
+ "name": "evaluation_targets_admin_user_id_users_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "admin_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_targets_confirmed_by_users_id_fk": {
+ "name": "evaluation_targets_confirmed_by_users_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "confirmed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.periodic_evaluations": {
+ "name": "periodic_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_grade": {
+ "name": "evaluation_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "periodic_evaluations_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "periodic_evaluations_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "periodic_evaluations",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "periodic_evaluations_finalized_by_users_id_fk": {
+ "name": "periodic_evaluations_finalized_by_users_id_fk",
+ "tableFrom": "periodic_evaluations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "finalized_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_evaluation_target": {
+ "name": "unique_evaluation_target",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "evaluation_period"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluation_attachments": {
+ "name": "reviewer_evaluation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reviewer_evaluation_detail_id": {
+ "name": "reviewer_evaluation_detail_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stored_file_name": {
+ "name": "stored_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_path": {
+ "name": "public_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_extension": {
+ "name": "file_extension",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "reviewer_evaluation_detail_id_idx": {
+ "name": "reviewer_evaluation_detail_id_idx",
+ "columns": [
+ {
+ "expression": "reviewer_evaluation_detail_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "reviewer_evaluation_attachments_reviewer_evaluation_detail_id_reviewer_evaluation_details_id_fk": {
+ "name": "reviewer_evaluation_attachments_reviewer_evaluation_detail_id_reviewer_evaluation_details_id_fk",
+ "tableFrom": "reviewer_evaluation_attachments",
+ "tableTo": "reviewer_evaluation_details",
+ "columnsFrom": [
+ "reviewer_evaluation_detail_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluation_attachments_uploaded_by_users_id_fk": {
+ "name": "reviewer_evaluation_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "reviewer_evaluation_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluation_details": {
+ "name": "reviewer_evaluation_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reviewer_evaluation_id": {
+ "name": "reviewer_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reg_eval_criteria_details_id": {
+ "name": "reg_eval_criteria_details_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reviewer_evaluation_details_reviewer_evaluation_id_reviewer_evaluations_id_fk": {
+ "name": "reviewer_evaluation_details_reviewer_evaluation_id_reviewer_evaluations_id_fk",
+ "tableFrom": "reviewer_evaluation_details",
+ "tableTo": "reviewer_evaluations",
+ "columnsFrom": [
+ "reviewer_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluation_details_reg_eval_criteria_details_id_reg_eval_criteria_details_id_fk": {
+ "name": "reviewer_evaluation_details_reg_eval_criteria_details_id_reg_eval_criteria_details_id_fk",
+ "tableFrom": "reviewer_evaluation_details",
+ "tableTo": "reg_eval_criteria_details",
+ "columnsFrom": [
+ "reg_eval_criteria_details_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_reviewer_criteria": {
+ "name": "unique_reviewer_criteria",
+ "nullsNotDistinct": false,
+ "columns": [
+ "reviewer_evaluation_id",
+ "reg_eval_criteria_details_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluations": {
+ "name": "reviewer_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_target_reviewer_id": {
+ "name": "evaluation_target_reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_completed": {
+ "name": "is_completed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reviewer_evaluations_periodic_evaluation_id_periodic_evaluations_id_fk": {
+ "name": "reviewer_evaluations_periodic_evaluation_id_periodic_evaluations_id_fk",
+ "tableFrom": "reviewer_evaluations",
+ "tableTo": "periodic_evaluations",
+ "columnsFrom": [
+ "periodic_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluations_evaluation_target_reviewer_id_evaluation_target_reviewers_id_fk": {
+ "name": "reviewer_evaluations_evaluation_target_reviewer_id_evaluation_target_reviewers_id_fk",
+ "tableFrom": "reviewer_evaluations",
+ "tableTo": "evaluation_target_reviewers",
+ "columnsFrom": [
+ "evaluation_target_reviewer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_reviewer_evaluation": {
+ "name": "unique_reviewer_evaluation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "periodic_evaluation_id",
+ "evaluation_target_reviewer_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reg_eval_criteria": {
+ "name": "reg_eval_criteria",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "category2": {
+ "name": "category2",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'processScore'"
+ },
+ "item": {
+ "name": "item",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "range": {
+ "name": "range",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_score_min ": {
+ "name": "variable_score_min ",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_score_max ": {
+ "name": "variable_score_max ",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_score_unit ": {
+ "name": "variable_score_unit ",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_type": {
+ "name": "score_type",
+ "type": "score_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'fixed'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reg_eval_criteria_created_by_users_id_fk": {
+ "name": "reg_eval_criteria_created_by_users_id_fk",
+ "tableFrom": "reg_eval_criteria",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "reg_eval_criteria_updated_by_users_id_fk": {
+ "name": "reg_eval_criteria_updated_by_users_id_fk",
+ "tableFrom": "reg_eval_criteria",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reg_eval_criteria_details": {
+ "name": "reg_eval_criteria_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score_equip_ship": {
+ "name": "score_equip_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_equip_marine": {
+ "name": "score_equip_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_ship": {
+ "name": "score_bulk_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_marine": {
+ "name": "score_bulk_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reg_eval_criteria_details_criteria_id_reg_eval_criteria_id_fk": {
+ "name": "reg_eval_criteria_details_criteria_id_reg_eval_criteria_id_fk",
+ "tableFrom": "reg_eval_criteria_details",
+ "tableTo": "reg_eval_criteria",
+ "columnsFrom": [
+ "criteria_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_gtc_files": {
+ "name": "project_gtc_files",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_gtc_files_project_id_projects_id_fk": {
+ "name": "project_gtc_files_project_id_projects_id_fk",
+ "tableFrom": "project_gtc_files",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.menu_assignments": {
+ "name": "menu_assignments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "menu_assignments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "menu_path": {
+ "name": "menu_path",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "menu_title": {
+ "name": "menu_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "menu_description": {
+ "name": "menu_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "menu_group": {
+ "name": "menu_group",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "section_title": {
+ "name": "section_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'evcp'"
+ },
+ "manager1_id": {
+ "name": "manager1_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager2_id": {
+ "name": "manager2_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "menu_assignments_path_idx": {
+ "name": "menu_assignments_path_idx",
+ "columns": [
+ {
+ "expression": "menu_path",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_manager1_idx": {
+ "name": "menu_assignments_manager1_idx",
+ "columns": [
+ {
+ "expression": "manager1_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_manager2_idx": {
+ "name": "menu_assignments_manager2_idx",
+ "columns": [
+ {
+ "expression": "manager2_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_domain_idx": {
+ "name": "menu_assignments_domain_idx",
+ "columns": [
+ {
+ "expression": "domain",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "menu_assignments_manager1_id_users_id_fk": {
+ "name": "menu_assignments_manager1_id_users_id_fk",
+ "tableFrom": "menu_assignments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "manager1_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "menu_assignments_manager2_id_users_id_fk": {
+ "name": "menu_assignments_manager2_id_users_id_fk",
+ "tableFrom": "menu_assignments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "manager2_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "menu_assignments_menu_path_unique": {
+ "name": "menu_assignments_menu_path_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "menu_path"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.page_information": {
+ "name": "page_information",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "page_path": {
+ "name": "page_path",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "page_name": {
+ "name": "page_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "information_content": {
+ "name": "information_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_file_name": {
+ "name": "attachment_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_file_path": {
+ "name": "attachment_file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_file_size": {
+ "name": "attachment_file_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "page_information_page_path_unique": {
+ "name": "page_information_page_path_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "page_path"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna": {
+ "name": "qna",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "qna_category",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_qna_author": {
+ "name": "idx_qna_author",
+ "columns": [
+ {
+ "expression": "author",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_author_users_id_fk": {
+ "name": "qna_author_users_id_fk",
+ "tableFrom": "qna",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna_answer": {
+ "name": "qna_answer",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "qna_id": {
+ "name": "qna_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_answer_qna": {
+ "name": "idx_answer_qna",
+ "columns": [
+ {
+ "expression": "qna_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_answer_author": {
+ "name": "idx_answer_author",
+ "columns": [
+ {
+ "expression": "author",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_answer_qna_id_qna_id_fk": {
+ "name": "qna_answer_qna_id_qna_id_fk",
+ "tableFrom": "qna_answer",
+ "tableTo": "qna",
+ "columnsFrom": [
+ "qna_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "qna_answer_author_users_id_fk": {
+ "name": "qna_answer_author_users_id_fk",
+ "tableFrom": "qna_answer",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna_comments": {
+ "name": "qna_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_id": {
+ "name": "answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_comment_answer": {
+ "name": "idx_comment_answer",
+ "columns": [
+ {
+ "expression": "answer_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_comment_parent": {
+ "name": "idx_comment_parent",
+ "columns": [
+ {
+ "expression": "parent_comment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_comments_author_users_id_fk": {
+ "name": "qna_comments_author_users_id_fk",
+ "tableFrom": "qna_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "qna_comments_answer_id_qna_answer_id_fk": {
+ "name": "qna_comments_answer_id_qna_answer_id_fk",
+ "tableFrom": "qna_comments",
+ "tableTo": "qna_answer",
+ "columnsFrom": [
+ "answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notice": {
+ "name": "notice",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "page_path": {
+ "name": "page_path",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author_id": {
+ "name": "author_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notice_author_id_users_id_fk": {
+ "name": "notice_author_id_users_id_fk",
+ "tableFrom": "notice",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.daily_access_stats": {
+ "name": "daily_access_stats",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "date": {
+ "name": "date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_visits": {
+ "name": "total_visits",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "unique_users": {
+ "name": "unique_users",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_sessions": {
+ "name": "total_sessions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "avg_session_duration": {
+ "name": "avg_session_duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_download_logs": {
+ "name": "file_download_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_email": {
+ "name": "user_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_name": {
+ "name": "user_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_role": {
+ "name": "user_role",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_ip": {
+ "name": "user_ip",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "downloaded_at": {
+ "name": "downloaded_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_id": {
+ "name": "request_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "referer": {
+ "name": "referer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "download_duration_ms": {
+ "name": "download_duration_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.login_sessions": {
+ "name": "login_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "login_at": {
+ "name": "login_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "logout_at": {
+ "name": "logout_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_token": {
+ "name": "session_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "nextauth_session_id": {
+ "name": "nextauth_session_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_method": {
+ "name": "auth_method",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "last_activity_at": {
+ "name": "last_activity_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "session_expired_at": {
+ "name": "session_expired_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "login_sessions_user_id_users_id_fk": {
+ "name": "login_sessions_user_id_users_id_fk",
+ "tableFrom": "login_sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "login_sessions_session_token_unique": {
+ "name": "login_sessions_session_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "session_token"
+ ]
+ },
+ "login_sessions_nextauth_session_id_unique": {
+ "name": "login_sessions_nextauth_session_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "nextauth_session_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.page_visits": {
+ "name": "page_visits",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "route": {
+ "name": "route",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "page_title": {
+ "name": "page_title",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "referrer": {
+ "name": "referrer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "visited_at": {
+ "name": "visited_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "query_params": {
+ "name": "query_params",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "browser_name": {
+ "name": "browser_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "os_name": {
+ "name": "os_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "page_visits_user_id_users_id_fk": {
+ "name": "page_visits_user_id_users_id_fk",
+ "tableFrom": "page_visits",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "page_visits_session_id_login_sessions_id_fk": {
+ "name": "page_visits_session_id_login_sessions_id_fk",
+ "tableFrom": "page_visits",
+ "tableTo": "login_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.temp_auth_sessions": {
+ "name": "temp_auth_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "temp_auth_key": {
+ "name": "temp_auth_key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_method": {
+ "name": "auth_method",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_used": {
+ "name": "is_used",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "temp_auth_sessions_user_id_users_id_fk": {
+ "name": "temp_auth_sessions_user_id_users_id_fk",
+ "tableFrom": "temp_auth_sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "temp_auth_sessions_temp_auth_key_unique": {
+ "name": "temp_auth_sessions_temp_auth_key_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "temp_auth_key"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_download_stats": {
+ "name": "user_download_stats",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "date": {
+ "name": "date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_downloads": {
+ "name": "total_downloads",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_bytes": {
+ "name": "total_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "unique_files": {
+ "name": "unique_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_download_at": {
+ "name": "last_download_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notifications": {
+ "name": "notifications",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "related_record_id": {
+ "name": "related_record_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "related_record_type": {
+ "name": "related_record_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "read_at": {
+ "name": "read_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_notifications_user_id": {
+ "name": "idx_notifications_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_created_at": {
+ "name": "idx_notifications_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_is_read": {
+ "name": "idx_notifications_is_read",
+ "columns": [
+ {
+ "expression": "is_read",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_user_read": {
+ "name": "idx_notifications_user_read",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_read",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_history": {
+ "name": "template_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_description": {
+ "name": "change_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_by": {
+ "name": "changed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_history_template_id_templates_id_fk": {
+ "name": "template_history_template_id_templates_id_fk",
+ "tableFrom": "template_history",
+ "tableTo": "templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "template_history_changed_by_users_id_fk": {
+ "name": "template_history_changed_by_users_id_fk",
+ "tableFrom": "template_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "changed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_variables": {
+ "name": "template_variables",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_name": {
+ "name": "variable_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_type": {
+ "name": "variable_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "default_value": {
+ "name": "default_value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validation_rule": {
+ "name": "validation_rule",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_variables_template_id_templates_id_fk": {
+ "name": "template_variables_template_id_templates_id_fk",
+ "tableFrom": "template_variables",
+ "tableTo": "templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.templates": {
+ "name": "templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sample_data": {
+ "name": "sample_data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{}'::jsonb"
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "templates_created_by_users_id_fk": {
+ "name": "templates_created_by_users_id_fk",
+ "tableFrom": "templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "templates_slug_unique": {
+ "name": "templates_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_clauses": {
+ "name": "gtc_clauses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_clauses_document_item_number_idx": {
+ "name": "gtc_clauses_document_item_number_idx",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "item_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_document_idx": {
+ "name": "gtc_clauses_document_idx",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_parent_idx": {
+ "name": "gtc_clauses_parent_idx",
+ "columns": [
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_full_path_idx": {
+ "name": "gtc_clauses_full_path_idx",
+ "columns": [
+ {
+ "expression": "full_path",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_clauses_document_id_gtc_documents_id_fk": {
+ "name": "gtc_clauses_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_clauses_created_by_id_users_id_fk": {
+ "name": "gtc_clauses_created_by_id_users_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_clauses_updated_by_id_users_id_fk": {
+ "name": "gtc_clauses_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_documents": {
+ "name": "gtc_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {
+ "gtc_project_revision_idx": {
+ "name": "gtc_project_revision_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_type_idx": {
+ "name": "gtc_type_idx",
+ "columns": [
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_project_idx": {
+ "name": "gtc_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_created_at_idx": {
+ "name": "gtc_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_updated_at_idx": {
+ "name": "gtc_updated_at_idx",
+ "columns": [
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_documents_project_id_projects_id_fk": {
+ "name": "gtc_documents_project_id_projects_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_documents_created_by_id_users_id_fk": {
+ "name": "gtc_documents_created_by_id_users_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_documents_updated_by_id_users_id_fk": {
+ "name": "gtc_documents_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_negotiation_history": {
+ "name": "gtc_negotiation_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_clause_id": {
+ "name": "vendor_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_status": {
+ "name": "previous_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_fields": {
+ "name": "changed_fields",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachments": {
+ "name": "attachments",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_type": {
+ "name": "actor_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "actor_id": {
+ "name": "actor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_name": {
+ "name": "actor_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_email": {
+ "name": "actor_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "gtc_negotiation_history_vendor_clause_idx": {
+ "name": "gtc_negotiation_history_vendor_clause_idx",
+ "columns": [
+ {
+ "expression": "vendor_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_negotiation_history_action_idx": {
+ "name": "gtc_negotiation_history_action_idx",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_negotiation_history_created_at_idx": {
+ "name": "gtc_negotiation_history_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_negotiation_history_vendor_clause_id_gtc_vendor_clauses_id_fk": {
+ "name": "gtc_negotiation_history_vendor_clause_id_gtc_vendor_clauses_id_fk",
+ "tableFrom": "gtc_negotiation_history",
+ "tableTo": "gtc_vendor_clauses",
+ "columnsFrom": [
+ "vendor_clause_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_negotiation_history_actor_id_users_id_fk": {
+ "name": "gtc_negotiation_history_actor_id_users_id_fk",
+ "tableFrom": "gtc_negotiation_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "actor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_templates": {
+ "name": "gtc_templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'1.0'"
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_metadata": {
+ "name": "variable_metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_templates_name_idx": {
+ "name": "gtc_templates_name_idx",
+ "columns": [
+ {
+ "expression": "name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_templates_is_default_idx": {
+ "name": "gtc_templates_is_default_idx",
+ "columns": [
+ {
+ "expression": "is_default",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_templates_document_id_gtc_documents_id_fk": {
+ "name": "gtc_templates_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_templates_created_by_id_users_id_fk": {
+ "name": "gtc_templates_created_by_id_users_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_templates_updated_by_id_users_id_fk": {
+ "name": "gtc_templates_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_vendor_clauses": {
+ "name": "gtc_vendor_clauses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_document_id": {
+ "name": "vendor_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_clause_id": {
+ "name": "base_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_item_number": {
+ "name": "modified_item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_category": {
+ "name": "modified_category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_subtitle": {
+ "name": "modified_subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_content": {
+ "name": "modified_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_number_modified": {
+ "name": "is_number_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_category_modified": {
+ "name": "is_category_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_subtitle_modified": {
+ "name": "is_subtitle_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_content_modified": {
+ "name": "is_content_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_note": {
+ "name": "negotiation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_excluded": {
+ "name": "is_excluded",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_vendor_clauses_vendor_base_idx": {
+ "name": "gtc_vendor_clauses_vendor_base_idx",
+ "columns": [
+ {
+ "expression": "vendor_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "base_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_vendor_document_idx": {
+ "name": "gtc_vendor_clauses_vendor_document_idx",
+ "columns": [
+ {
+ "expression": "vendor_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_base_clause_idx": {
+ "name": "gtc_vendor_clauses_base_clause_idx",
+ "columns": [
+ {
+ "expression": "base_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_parent_idx": {
+ "name": "gtc_vendor_clauses_parent_idx",
+ "columns": [
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_review_status_idx": {
+ "name": "gtc_vendor_clauses_review_status_idx",
+ "columns": [
+ {
+ "expression": "review_status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_vendor_clauses_vendor_document_id_gtc_vendor_documents_id_fk": {
+ "name": "gtc_vendor_clauses_vendor_document_id_gtc_vendor_documents_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "gtc_vendor_documents",
+ "columnsFrom": [
+ "vendor_document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_base_clause_id_gtc_clauses_id_fk": {
+ "name": "gtc_vendor_clauses_base_clause_id_gtc_clauses_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "gtc_clauses",
+ "columnsFrom": [
+ "base_clause_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_created_by_id_users_id_fk": {
+ "name": "gtc_vendor_clauses_created_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_updated_by_id_users_id_fk": {
+ "name": "gtc_vendor_clauses_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_vendor_documents": {
+ "name": "gtc_vendor_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "base_document_id": {
+ "name": "base_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'1.0'"
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_start_date": {
+ "name": "negotiation_start_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "negotiation_end_date": {
+ "name": "negotiation_end_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_date": {
+ "name": "approval_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_name": {
+ "name": "final_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_path": {
+ "name": "final_file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_size": {
+ "name": "final_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_vendor_documents_base_vendor_idx": {
+ "name": "gtc_vendor_documents_base_vendor_idx",
+ "columns": [
+ {
+ "expression": "base_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_vendor_idx": {
+ "name": "gtc_vendor_documents_vendor_idx",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_base_document_idx": {
+ "name": "gtc_vendor_documents_base_document_idx",
+ "columns": [
+ {
+ "expression": "base_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_review_status_idx": {
+ "name": "gtc_vendor_documents_review_status_idx",
+ "columns": [
+ {
+ "expression": "review_status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_vendor_documents_base_document_id_gtc_documents_id_fk": {
+ "name": "gtc_vendor_documents_base_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "base_document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_vendor_id_vendors_id_fk": {
+ "name": "gtc_vendor_documents_vendor_id_vendors_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_created_by_id_users_id_fk": {
+ "name": "gtc_vendor_documents_created_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_updated_by_id_users_id_fk": {
+ "name": "gtc_vendor_documents_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.code_groups": {
+ "name": "code_groups",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_format": {
+ "name": "code_format",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expressions": {
+ "name": "expressions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "control_type": {
+ "name": "control_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "code_groups_project_id_projects_id_fk": {
+ "name": "code_groups_project_id_projects_id_fk",
+ "tableFrom": "code_groups",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_group_id": {
+ "name": "unique_project_group_id",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.combo_box_settings": {
+ "name": "combo_box_settings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "combo_box_settings_code_group_id_code_groups_id_fk": {
+ "name": "combo_box_settings_code_group_id_code_groups_id_fk",
+ "tableFrom": "combo_box_settings",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_code_group_code": {
+ "name": "unique_code_group_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code_group_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_class_options_new": {
+ "name": "document_class_options_new",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_class_id": {
+ "name": "document_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "option_code": {
+ "name": "option_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_class_options_new_document_class_id_document_classes_id_fk": {
+ "name": "document_class_options_new_document_class_id_document_classes_id_fk",
+ "tableFrom": "document_class_options_new",
+ "tableTo": "document_classes",
+ "columnsFrom": [
+ "document_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_document_class_option": {
+ "name": "unique_document_class_option",
+ "nullsNotDistinct": false,
+ "columns": [
+ "document_class_id",
+ "option_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_classes": {
+ "name": "document_classes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_classes_project_id_projects_id_fk": {
+ "name": "document_classes_project_id_projects_id_fk",
+ "tableFrom": "document_classes",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "document_classes_code_group_id_code_groups_id_fk": {
+ "name": "document_classes_code_group_id_code_groups_id_fk",
+ "tableFrom": "document_classes",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_code": {
+ "name": "unique_project_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "code"
+ ]
+ },
+ "unique_project_value": {
+ "name": "unique_project_value",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "value"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_number_type_configs": {
+ "name": "document_number_type_configs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_number_type_id": {
+ "name": "document_number_type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sdq": {
+ "name": "sdq",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_number_type_configs_document_number_type_id_document_number_types_id_fk": {
+ "name": "document_number_type_configs_document_number_type_id_document_number_types_id_fk",
+ "tableFrom": "document_number_type_configs",
+ "tableTo": "document_number_types",
+ "columnsFrom": [
+ "document_number_type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "document_number_type_configs_code_group_id_code_groups_id_fk": {
+ "name": "document_number_type_configs_code_group_id_code_groups_id_fk",
+ "tableFrom": "document_number_type_configs",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_document_number_type_sdq": {
+ "name": "unique_document_number_type_sdq",
+ "nullsNotDistinct": false,
+ "columns": [
+ "document_number_type_id",
+ "sdq"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_number_types": {
+ "name": "document_number_types",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_number_types_project_id_projects_id_fk": {
+ "name": "document_number_types_project_id_projects_id_fk",
+ "tableFrom": "document_number_types",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_name": {
+ "name": "unique_project_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_attachments": {
+ "name": "legal_work_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_auto_generated": {
+ "name": "is_auto_generated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'request'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_attachments_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_attachments_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_attachments",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_requests": {
+ "name": "legal_work_requests",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_department": {
+ "name": "review_department",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inquiry_type": {
+ "name": "inquiry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "request_content": {
+ "name": "request_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "contract_project_name": {
+ "name": "contract_project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_amount": {
+ "name": "contract_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_counterparty": {
+ "name": "contract_counterparty",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "counterparty_type": {
+ "name": "counterparty_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "factual_relation": {
+ "name": "factual_relation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_number": {
+ "name": "project_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipowner_orderer": {
+ "name": "shipowner_orderer",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "governing_law": {
+ "name": "governing_law",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_type": {
+ "name": "project_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_requests_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_requests_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_requests",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_responses": {
+ "name": "legal_work_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_content": {
+ "name": "response_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_reviewer": {
+ "name": "response_reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_confirmer": {
+ "name": "response_confirmer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_approver": {
+ "name": "response_approver",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_re_revision": {
+ "name": "is_re_revision",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "parent_response_id": {
+ "name": "parent_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_responses_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_responses_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_responses",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_works": {
+ "name": "legal_works",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_urgent": {
+ "name": "is_urgent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "request_date": {
+ "name": "request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consultation_date": {
+ "name": "consultation_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expected_answer_date": {
+ "name": "expected_answer_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_completion_date": {
+ "name": "legal_completion_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer": {
+ "name": "reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_responder": {
+ "name": "legal_responder",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachment": {
+ "name": "has_attachment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_works_company_id_vendors_id_fk": {
+ "name": "legal_works_company_id_vendors_id_fk",
+ "tableFrom": "legal_works",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.consent_logs": {
+ "name": "consent_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "consent_logs_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_type": {
+ "name": "consent_type",
+ "type": "consent_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "consent_action",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "policy_version": {
+ "name": "policy_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_timestamp": {
+ "name": "action_timestamp",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "additional_data": {
+ "name": "additional_data",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "consent_logs_user_action_timestamp_idx": {
+ "name": "consent_logs_user_action_timestamp_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "action_timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "consent_logs_consent_type_idx": {
+ "name": "consent_logs_consent_type_idx",
+ "columns": [
+ {
+ "expression": "consent_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "consent_logs_action_idx": {
+ "name": "consent_logs_action_idx",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "consent_logs_user_id_users_id_fk": {
+ "name": "consent_logs_user_id_users_id_fk",
+ "tableFrom": "consent_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.policy_versions": {
+ "name": "policy_versions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "policy_versions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "policy_type": {
+ "name": "policy_type",
+ "type": "policy_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "effective_date": {
+ "name": "effective_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_current": {
+ "name": "is_current",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "policy_versions_type_version_idx": {
+ "name": "policy_versions_type_version_idx",
+ "columns": [
+ {
+ "expression": "policy_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "policy_versions_current_idx": {
+ "name": "policy_versions_current_idx",
+ "columns": [
+ {
+ "expression": "is_current",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "policy_versions_effective_date_idx": {
+ "name": "policy_versions_effective_date_idx",
+ "columns": [
+ {
+ "expression": "effective_date",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_consents": {
+ "name": "user_consents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_consents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_type": {
+ "name": "consent_type",
+ "type": "consent_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_status": {
+ "name": "consent_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "policy_version": {
+ "name": "policy_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consented_at": {
+ "name": "consented_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revoke_reason": {
+ "name": "revoke_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "user_consents_user_type_idx": {
+ "name": "user_consents_user_type_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "consent_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_consents_consented_at_idx": {
+ "name": "user_consents_consented_at_idx",
+ "columns": [
+ {
+ "expression": "consented_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_consents_policy_version_idx": {
+ "name": "user_consents_policy_version_idx",
+ "columns": [
+ {
+ "expression": "policy_version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_consents_user_id_users_id_fk": {
+ "name": "user_consents_user_id_users_id_fk",
+ "tableFrom": "user_consents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_companies": {
+ "name": "bidding_companies",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "invitation_status": {
+ "name": "invitation_status",
+ "type": "invitation_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "invited_at": {
+ "name": "invited_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_amount": {
+ "name": "pre_quote_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_submitted_at": {
+ "name": "pre_quote_submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote_selected": {
+ "name": "is_pre_quote_selected",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "final_quote_amount": {
+ "name": "final_quote_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_quote_submitted_at": {
+ "name": "final_quote_submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_winner": {
+ "name": "is_winner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_companies_bidding_id_biddings_id_fk": {
+ "name": "bidding_companies_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_companies",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_companies_company_id_vendors_id_fk": {
+ "name": "bidding_companies_company_id_vendors_id_fk",
+ "tableFrom": "bidding_companies",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_conditions": {
+ "name": "bidding_conditions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_conditions": {
+ "name": "tax_conditions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_delivery_date": {
+ "name": "contract_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_price_adjustment_applicable": {
+ "name": "is_price_adjustment_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_port": {
+ "name": "shipping_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destination_port": {
+ "name": "destination_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spare_part_options": {
+ "name": "spare_part_options",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_conditions_bidding_id_biddings_id_fk": {
+ "name": "bidding_conditions_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_conditions",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_documents": {
+ "name": "bidding_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "specification_meeting_id": {
+ "name": "specification_meeting_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "document_type": {
+ "name": "document_type",
+ "type": "document_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_documents_bidding_id_biddings_id_fk": {
+ "name": "bidding_documents_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_company_id_vendors_id_fk": {
+ "name": "bidding_documents_company_id_vendors_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_pr_item_id_pr_items_for_bidding_id_fk": {
+ "name": "bidding_documents_pr_item_id_pr_items_for_bidding_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "pr_items_for_bidding",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_specification_meeting_id_specification_meetings_id_fk": {
+ "name": "bidding_documents_specification_meeting_id_specification_meetings_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "specification_meetings",
+ "columnsFrom": [
+ "specification_meeting_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_notice_template": {
+ "name": "bidding_notice_template",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'standard'"
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'표준 입찰공고문'"
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.biddings": {
+ "name": "biddings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_number": {
+ "name": "bidding_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "contract_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bidding_type": {
+ "name": "bidding_type",
+ "type": "bidding_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "award_count": {
+ "name": "award_count",
+ "type": "award_count",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'single'"
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_date": {
+ "name": "pre_quote_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_registration_date": {
+ "name": "bidding_registration_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_start_date": {
+ "name": "submission_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_end_date": {
+ "name": "submission_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_date": {
+ "name": "evaluation_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_specification_meeting": {
+ "name": "has_specification_meeting",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "budget": {
+ "name": "budget",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_price": {
+ "name": "target_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_bid_price": {
+ "name": "final_bid_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_pr_document": {
+ "name": "has_pr_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "status": {
+ "name": "status",
+ "type": "bidding_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bidding_generated'"
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_email": {
+ "name": "manager_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_phone": {
+ "name": "manager_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "biddings_project_id_projects_id_fk": {
+ "name": "biddings_project_id_projects_id_fk",
+ "tableFrom": "biddings",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "biddings_bidding_number_unique": {
+ "name": "biddings_bidding_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "bidding_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_condition_responses": {
+ "name": "company_condition_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_company_id": {
+ "name": "bidding_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms_response": {
+ "name": "payment_terms_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_conditions_response": {
+ "name": "tax_conditions_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_contract_delivery_date": {
+ "name": "proposed_contract_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "price_adjustment_response": {
+ "name": "price_adjustment_response",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_response": {
+ "name": "incoterms_response",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_shipping_port": {
+ "name": "proposed_shipping_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_destination_port": {
+ "name": "proposed_destination_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spare_part_response": {
+ "name": "spare_part_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "additional_proposals": {
+ "name": "additional_proposals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote": {
+ "name": "is_pre_quote",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "company_condition_responses_bidding_company_id_bidding_companies_id_fk": {
+ "name": "company_condition_responses_bidding_company_id_bidding_companies_id_fk",
+ "tableFrom": "company_condition_responses",
+ "tableTo": "bidding_companies",
+ "columnsFrom": [
+ "bidding_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_pr_item_bids": {
+ "name": "company_pr_item_bids",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_company_id": {
+ "name": "bidding_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "proposed_delivery_date": {
+ "name": "proposed_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_unit_price": {
+ "name": "bid_unit_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_amount": {
+ "name": "bid_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "technical_specification": {
+ "name": "technical_specification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote": {
+ "name": "is_pre_quote",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "company_pr_item_bids_bidding_company_id_bidding_companies_id_fk": {
+ "name": "company_pr_item_bids_bidding_company_id_bidding_companies_id_fk",
+ "tableFrom": "company_pr_item_bids",
+ "tableTo": "bidding_companies",
+ "columnsFrom": [
+ "bidding_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "company_pr_item_bids_pr_item_id_pr_items_for_bidding_id_fk": {
+ "name": "company_pr_item_bids_pr_item_id_pr_items_for_bidding_id_fk",
+ "tableFrom": "company_pr_item_bids",
+ "tableTo": "pr_items_for_bidding",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_documents": {
+ "name": "pr_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "document_name": {
+ "name": "document_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "registered_by": {
+ "name": "registered_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_documents_bidding_id_biddings_id_fk": {
+ "name": "pr_documents_bidding_id_biddings_id_fk",
+ "tableFrom": "pr_documents",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_items_for_bidding": {
+ "name": "pr_items_for_bidding",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_info": {
+ "name": "project_info",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_info": {
+ "name": "item_info",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi": {
+ "name": "shi",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_delivery_date": {
+ "name": "requested_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "annual_unit_price": {
+ "name": "annual_unit_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity_unit": {
+ "name": "quantity_unit",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_weight": {
+ "name": "total_weight",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "weight_unit": {
+ "name": "weight_unit",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_spec_document": {
+ "name": "has_spec_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_items_for_bidding_bidding_id_biddings_id_fk": {
+ "name": "pr_items_for_bidding_bidding_id_biddings_id_fk",
+ "tableFrom": "pr_items_for_bidding",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.specification_meetings": {
+ "name": "specification_meetings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "meeting_date": {
+ "name": "meeting_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "meeting_time": {
+ "name": "meeting_time",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "location": {
+ "name": "location",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agenda": {
+ "name": "agenda",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "materials": {
+ "name": "materials",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "specification_meetings_bidding_id_biddings_id_fk": {
+ "name": "specification_meetings_bidding_id_biddings_id_fk",
+ "tableFrom": "specification_meetings",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_selection_results": {
+ "name": "vendor_selection_results",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selected_company_id": {
+ "name": "selected_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selection_reason": {
+ "name": "selection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_summary": {
+ "name": "evaluation_summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_result_documents": {
+ "name": "has_result_documents",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "selected_at": {
+ "name": "selected_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "selected_by": {
+ "name": "selected_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_selection_results_bidding_id_biddings_id_fk": {
+ "name": "vendor_selection_results_bidding_id_biddings_id_fk",
+ "tableFrom": "vendor_selection_results",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_selection_results_selected_company_id_vendors_id_fk": {
+ "name": "vendor_selection_results_selected_company_id_vendors_id_fk",
+ "tableFrom": "vendor_selection_results",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "selected_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_additional_info": {
+ "name": "vendor_additional_info",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "business_type": {
+ "name": "business_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "industry_type": {
+ "name": "industry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_size": {
+ "name": "company_size",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revenue": {
+ "name": "revenue",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "factory_established_date": {
+ "name": "factory_established_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_contract_terms": {
+ "name": "preferred_contract_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_additional_info_vendor_id_vendors_id_fk": {
+ "name": "vendor_additional_info_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_additional_info",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_business_contacts": {
+ "name": "vendor_business_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_type": {
+ "name": "contact_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "position": {
+ "name": "position",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department": {
+ "name": "department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "responsibility": {
+ "name": "responsibility",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_business_contacts_vendor_id_vendors_id_fk": {
+ "name": "vendor_business_contacts_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_business_contacts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_regular_registrations": {
+ "name": "vendor_regular_registrations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'audit_pass'"
+ },
+ "potential_code": {
+ "name": "potential_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_items": {
+ "name": "major_items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registration_request_date": {
+ "name": "registration_request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_department": {
+ "name": "assigned_department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_department_code": {
+ "name": "assigned_department_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_user": {
+ "name": "assigned_user",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_user_code": {
+ "name": "assigned_user_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_regular_registrations_vendor_id_vendors_id_fk": {
+ "name": "vendor_regular_registrations_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_regular_registrations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_assignment_history": {
+ "name": "department_domain_assignment_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_assignment_history_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "assignment_id": {
+ "name": "assignment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_values": {
+ "name": "previous_values",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_values": {
+ "name": "new_values",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_by": {
+ "name": "changed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_assignments": {
+ "name": "department_domain_assignments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_assignments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_domain": {
+ "name": "assigned_domain",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_mappings": {
+ "name": "department_domain_mappings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_mappings_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "assignment_id": {
+ "name": "assignment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_company_code": {
+ "name": "old_company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_department_code": {
+ "name": "old_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_department_name": {
+ "name": "old_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_company_code": {
+ "name": "new_company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_department_code": {
+ "name": "new_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_department_name": {
+ "name": "new_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mapping_status": {
+ "name": "mapping_status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "mapped_by": {
+ "name": "mapped_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mapped_at": {
+ "name": "mapped_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER": {
+ "name": "CUSTOMER_MASTER_BP_HEADER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_HEADER_unique": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_HEADER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "BP_HEADER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRNO": {
+ "name": "ADDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SMTP_ADDR": {
+ "name": "SMTP_ADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "FAX_EXTENS": {
+ "name": "FAX_EXTENS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_NUMBER": {
+ "name": "FAX_NUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CITY1": {
+ "name": "CITY1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY2": {
+ "name": "CITY2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOUSE_NUM1": {
+ "name": "HOUSE_NUM1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANGU": {
+ "name": "LANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME1": {
+ "name": "NAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME2": {
+ "name": "NAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME3": {
+ "name": "NAME3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME4": {
+ "name": "NAME4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NATION": {
+ "name": "NATION",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POST_CODE1": {
+ "name": "POST_CODE1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POST_CODE2": {
+ "name": "POST_CODE2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PO_BOX": {
+ "name": "PO_BOX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGION": {
+ "name": "REGION",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SORT1": {
+ "name": "SORT1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SORT2": {
+ "name": "SORT2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STREET": {
+ "name": "STREET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAXJURCODE": {
+ "name": "TAXJURCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TIME_ZONE": {
+ "name": "TIME_ZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TITLE": {
+ "name": "TITLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANSPZONE": {
+ "name": "TRANSPZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "R3_USER": {
+ "name": "R3_USER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_EXTENS": {
+ "name": "TEL_EXTENS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_NUMBER": {
+ "name": "TEL_NUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URI_ADDR": {
+ "name": "URI_ADDR",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANRED": {
+ "name": "ANRED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUFSD": {
+ "name": "AUFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAKSD": {
+ "name": "FAKSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GFORM": {
+ "name": "GFORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JMJAH": {
+ "name": "JMJAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JMZAH": {
+ "name": "JMZAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFREPRE": {
+ "name": "J_1KFREPRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFTBUS": {
+ "name": "J_1KFTBUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFTIND": {
+ "name": "J_1KFTIND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KATR1": {
+ "name": "KATR1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KDKG1": {
+ "name": "KDKG1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTOKD": {
+ "name": "KTOKD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KUNNR": {
+ "name": "KUNNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LIFNR": {
+ "name": "LIFNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LIFSD": {
+ "name": "LIFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NIELS": {
+ "name": "NIELS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NODEL": {
+ "name": "NODEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUGRP": {
+ "name": "PUGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPERR": {
+ "name": "SPERR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD1": {
+ "name": "STCD1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD2": {
+ "name": "STCD2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD3": {
+ "name": "STCD3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD4": {
+ "name": "STCD4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCEG": {
+ "name": "STCEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMJAH": {
+ "name": "UMJAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UWAER": {
+ "name": "UWAER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VBUND": {
+ "name": "VBUND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT_C": {
+ "name": "ZZAPPDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM_C": {
+ "name": "ZZAPPTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS_C": {
+ "name": "ZZAPPUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBA": {
+ "name": "ZZBA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBRSCH_C": {
+ "name": "ZZBRSCH_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCRMCD": {
+ "name": "ZZCRMCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKAR_C": {
+ "name": "ZZDOKAR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKNR_C": {
+ "name": "ZZDOKNR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKTL_C": {
+ "name": "ZZDOKTL_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKVR_C": {
+ "name": "ZZDOKVR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDUNS": {
+ "name": "ZZDUNS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTBU": {
+ "name": "ZZFTBU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTBUNM": {
+ "name": "ZZFTBUNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTDT": {
+ "name": "ZZFTDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTDTNM": {
+ "name": "ZZFTDTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTGT": {
+ "name": "ZZFTGT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTGTNM": {
+ "name": "ZZFTGTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZINBFLGC": {
+ "name": "ZZINBFLGC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT_C": {
+ "name": "ZZLAMDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM_C": {
+ "name": "ZZLAMTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS_C": {
+ "name": "ZZLAMUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZORT01_C": {
+ "name": "ZZORT01_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZORT02_C": {
+ "name": "ZZORT02_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREASON": {
+ "name": "ZZREASON",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT_C": {
+ "name": "ZZREGDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM_C": {
+ "name": "ZZREGTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS_C": {
+ "name": "ZZREGUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTCDT_C": {
+ "name": "ZZSTCDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTRAS_C": {
+ "name": "ZZSTRAS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSUBSEQ_C": {
+ "name": "ZZSUBSEQ_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AKONT": {
+ "name": "AKONT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BUKRS": {
+ "name": "BUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "FDGRV": {
+ "name": "FDGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPERR": {
+ "name": "SPERR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZAHLS": {
+ "name": "ZAHLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZTERM": {
+ "name": "ZTERM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZUAWA": {
+ "name": "ZUAWA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZWELS": {
+ "name": "ZWELS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AUFSD": {
+ "name": "AUFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AWAHR": {
+ "name": "AWAHR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BZIRK": {
+ "name": "BZIRK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAKSD": {
+ "name": "FAKSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO1": {
+ "name": "INCO1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO2": {
+ "name": "INCO2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KALKS": {
+ "name": "KALKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KDGRP": {
+ "name": "KDGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KONDA": {
+ "name": "KONDA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTGRD": {
+ "name": "KTGRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KURST": {
+ "name": "KURST",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KZAZU": {
+ "name": "KZAZU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LIFSD": {
+ "name": "LIFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LPRIO": {
+ "name": "LPRIO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLTYP": {
+ "name": "PLTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VERSG": {
+ "name": "VERSG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKBUR": {
+ "name": "VKBUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKGRP": {
+ "name": "VKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKORG": {
+ "name": "VKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VSBED": {
+ "name": "VSBED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VTWEG": {
+ "name": "VTWEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VWERK": {
+ "name": "VWERK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS": {
+ "name": "WAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZTERM": {
+ "name": "ZTERM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEFPA": {
+ "name": "DEFPA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KUNN2": {
+ "name": "KUNN2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PARVW": {
+ "name": "PARVW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PARZA": {
+ "name": "PARZA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ALAND": {
+ "name": "ALAND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TATYP": {
+ "name": "TATYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TAXKD": {
+ "name": "TAXKD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LAND1": {
+ "name": "LAND1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "STCEG": {
+ "name": "STCEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "TAXNUM": {
+ "name": "TAXNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAXTYPE": {
+ "name": "TAXTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BICD": {
+ "name": "BICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZAREA": {
+ "name": "BIZAREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CCCD": {
+ "name": "CCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COMPCD": {
+ "name": "COMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DEPTLVL": {
+ "name": "DEPTLVL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPTPOSNO": {
+ "name": "DEPTPOSNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHEMPID": {
+ "name": "DHEMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GNCD": {
+ "name": "GNCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PCCD": {
+ "name": "PCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDEPTCD": {
+ "name": "PDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDFROMDT": {
+ "name": "VALIDFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDTODT": {
+ "name": "VALIDTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_unique": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "DEPTCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRCNTRY": {
+ "name": "ADDRCNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AEDAT": {
+ "name": "AEDAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AENAM": {
+ "name": "AENAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AEZET": {
+ "name": "AEZET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BICD": {
+ "name": "BICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZAREA": {
+ "name": "BIZAREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSCADDR": {
+ "name": "BSCADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COMPCD": {
+ "name": "COMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COUNTRYCD": {
+ "name": "COUNTRYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSFROMDT": {
+ "name": "CSFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTODT": {
+ "name": "CSTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTIROLE": {
+ "name": "CTIROLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL": {
+ "name": "DEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPENDDT": {
+ "name": "DEPENDDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHJOBGRDCD": {
+ "name": "DHJOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHNAME": {
+ "name": "DHNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHSINGLID": {
+ "name": "DHSINGLID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISPATCH": {
+ "name": "DISPATCH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DPSTARTDT": {
+ "name": "DPSTARTDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTLADDR": {
+ "name": "DTLADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTLADDR2": {
+ "name": "DTLADDR2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMAIL": {
+ "name": "EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMPADR": {
+ "name": "EMPADR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMPTYPE": {
+ "name": "EMPTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ENGNAME": {
+ "name": "ENGNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EPID": {
+ "name": "EPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERDAT": {
+ "name": "ERDAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERNAM": {
+ "name": "ERNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERZET": {
+ "name": "ERZET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FORIGNFLG": {
+ "name": "FORIGNFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBCD": {
+ "name": "GJOBCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBDUTYCD": {
+ "name": "GJOBDUTYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBGRDCD": {
+ "name": "GJOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GNCD": {
+ "name": "GNCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HRMANAGE": {
+ "name": "HRMANAGE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IDNO": {
+ "name": "IDNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBCD": {
+ "name": "JOBCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBCLASS": {
+ "name": "JOBCLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBDUTYCD": {
+ "name": "JOBDUTYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDCD": {
+ "name": "JOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTL_EMP": {
+ "name": "KTL_EMP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVABSENCE": {
+ "name": "LVABSENCE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MBPHONE": {
+ "name": "MBPHONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME": {
+ "name": "NAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OKTL_EMPL": {
+ "name": "OKTL_EMPL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGBICD": {
+ "name": "ORGBICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGCOMPCD": {
+ "name": "ORGCOMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGCORPCD": {
+ "name": "ORGCORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGDEPTCD": {
+ "name": "ORGDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGPDEPCD": {
+ "name": "ORGPDEPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PAYPLC": {
+ "name": "PAYPLC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDEPTCD": {
+ "name": "PDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTLCODE": {
+ "name": "PSTLCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RETIRE": {
+ "name": "RETIRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SEX": {
+ "name": "SEX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SINGLEID": {
+ "name": "SINGLEID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SINGLRQ": {
+ "name": "SINGLRQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOCIALID": {
+ "name": "SOCIALID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOCIALID_DECR": {
+ "name": "SOCIALID_DECR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOJRNEMP": {
+ "name": "SOJRNEMP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNUM": {
+ "name": "TELNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TMPJDIV": {
+ "name": "TMPJDIV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USEDSYS": {
+ "name": "USEDSYS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALFROMDT": {
+ "name": "VALFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALTODT": {
+ "name": "VALTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WFREQUIRE": {
+ "name": "WFREQUIRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WORKPLC": {
+ "name": "WORKPLC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZPRFLG": {
+ "name": "ZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBUKRS": {
+ "name": "ZZBUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_unique": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "EMPID"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GTEXT": {
+ "name": "GTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BINM": {
+ "name": "BINM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COUNTRYNM": {
+ "name": "COUNTRYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "PCCD": {
+ "name": "PCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "KTEXT": {
+ "name": "KTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBGRDNM": {
+ "name": "JOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBDUTYNM": {
+ "name": "GJOBDUTYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBGRDNM": {
+ "name": "GJOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ISEXECUT": {
+ "name": "ISEXECUT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDTYPE": {
+ "name": "JOBGRDTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBNM": {
+ "name": "GJOBNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GNNM": {
+ "name": "GNNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBDUTYNM": {
+ "name": "JOBDUTYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ISEXECUT": {
+ "name": "ISEXECUT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDNM": {
+ "name": "JOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDTYPE": {
+ "name": "JOBGRDTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBNM": {
+ "name": "JOBNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BINM": {
+ "name": "BINM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADTL_01": {
+ "name": "ADTL_01",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADTL_02": {
+ "name": "ADTL_02",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "GRPCD": {
+ "name": "GRPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAINCD": {
+ "name": "MAINCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VALIDFROMDT": {
+ "name": "VALIDFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDTODT": {
+ "name": "VALIDTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_unique": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "GRPCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME",
+ "schema": "mdg",
+ "columns": {
+ "GRPCD": {
+ "name": "GRPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "NAME": {
+ "name": "NAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_GRPCD_EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_fk": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_GRPCD_EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_fk",
+ "tableFrom": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME",
+ "tableTo": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "GRPCD"
+ ],
+ "columnsTo": [
+ "GRPCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL": {
+ "name": "EQUP_MASTER_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EQUP_MASTER_MATL_MATNR_unique": {
+ "name": "EQUP_MASTER_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_CHARASGN": {
+ "name": "EQUP_MASTER_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_CHARASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_CHARASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_CHARASGN",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_CLASSASGN": {
+ "name": "EQUP_MASTER_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_CLASSASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_CLASSASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_CLASSASGN",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_DESC": {
+ "name": "EQUP_MASTER_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_DESC_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_DESC_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_DESC",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_PLNT": {
+ "name": "EQUP_MASTER_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_PLNT_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_PLNT_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_PLNT",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_UNIT": {
+ "name": "EQUP_MASTER_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_UNIT_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_UNIT_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_UNIT",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL": {
+ "name": "MATERIAL_MASTER_PART_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZACT": {
+ "name": "ZZACT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCERT": {
+ "name": "ZZCERT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZINSP": {
+ "name": "ZZINSP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMMTYP": {
+ "name": "ZZMMTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMRC": {
+ "name": "ZZMRC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPJT": {
+ "name": "ZZPJT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPLMID": {
+ "name": "ZZPLMID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRCD_SCV_CTLP": {
+ "name": "ZZPRCD_SCV_CTLP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREPMAT": {
+ "name": "ZZREPMAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_DIA": {
+ "name": "ZZREP_DIA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_DIA_UOM": {
+ "name": "ZZREP_DIA_UOM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_ITM_MATL": {
+ "name": "ZZREP_ITM_MATL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSMID": {
+ "name": "ZZSMID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTL": {
+ "name": "ZZSTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MATERIAL_MASTER_PART_MATL_MATNR_unique": {
+ "name": "MATERIAL_MASTER_PART_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_CHARASGN": {
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_CHARASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_CHARASGN",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_CLASSASGN": {
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_CLASSASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_CLASSASGN",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_DESC": {
+ "name": "MATERIAL_MASTER_PART_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_DESC_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_DESC_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_DESC",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_PLNT": {
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_PLNT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_PLNT",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_UNIT": {
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BREIT": {
+ "name": "BREIT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOEHE": {
+ "name": "HOEHE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAENG": {
+ "name": "LAENG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLUM": {
+ "name": "VOLUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_UNIT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_UNIT",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE": {
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_CD": {
+ "name": "MAT_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAT_ID": {
+ "name": "MAT_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_MAT_CD_unique": {
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_MAT_CD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MAT_CD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL": {
+ "name": "MODEL_MASTER_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKAR": {
+ "name": "ZZDOKAR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKNR": {
+ "name": "ZZDOKNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKTL": {
+ "name": "ZZDOKTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKVR": {
+ "name": "ZZDOKVR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMMTYP": {
+ "name": "ZZMMTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MODEL_MASTER_MATL_MATNR_unique": {
+ "name": "MODEL_MASTER_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_CHARASGN": {
+ "name": "MODEL_MASTER_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_CHARASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_CHARASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_CHARASGN",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_CLASSASGN": {
+ "name": "MODEL_MASTER_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_CLASSASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_CLASSASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_CLASSASGN",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_DESC": {
+ "name": "MODEL_MASTER_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_DESC_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_DESC_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_DESC",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_PLNT": {
+ "name": "MODEL_MASTER_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_PLNT_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_PLNT_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_PLNT",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_UNIT": {
+ "name": "MODEL_MASTER_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BREIT": {
+ "name": "BREIT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOEHE": {
+ "name": "HOEHE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAENG": {
+ "name": "LAENG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLUM": {
+ "name": "VOLUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_UNIT_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_UNIT_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_UNIT",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_CCTR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ABTEI": {
+ "name": "ABTEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ANRED": {
+ "name": "ANRED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZER": {
+ "name": "BKZER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZKP": {
+ "name": "BKZKP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZKS": {
+ "name": "BKZKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZOB": {
+ "name": "BKZOB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BUKRS": {
+ "name": "BUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CCTR": {
+ "name": "CCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATAB": {
+ "name": "DATAB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATBI": {
+ "name": "DATBI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATLT": {
+ "name": "DATLT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DRNAM": {
+ "name": "DRNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FUNC_AREA": {
+ "name": "FUNC_AREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GSBER": {
+ "name": "GSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KHINR": {
+ "name": "KHINR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOKRS": {
+ "name": "KOKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KOSAR": {
+ "name": "KOSAR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAND1": {
+ "name": "LAND1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MGEFL": {
+ "name": "MGEFL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME1": {
+ "name": "NAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME2": {
+ "name": "NAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME3": {
+ "name": "NAME3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME4": {
+ "name": "NAME4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORT01": {
+ "name": "ORT01",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORT02": {
+ "name": "ORT02",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PFACH": {
+ "name": "PFACH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZER": {
+ "name": "PKZER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZKP": {
+ "name": "PKZKP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZKS": {
+ "name": "PKZKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTL2": {
+ "name": "PSTL2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTLZ": {
+ "name": "PSTLZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGIO": {
+ "name": "REGIO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STRAS": {
+ "name": "STRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELBX": {
+ "name": "TELBX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELF1": {
+ "name": "TELF1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELF2": {
+ "name": "TELF2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELFX": {
+ "name": "TELFX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELTX": {
+ "name": "TELTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELX1": {
+ "name": "TELX1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXJCD": {
+ "name": "TXJCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK": {
+ "name": "VERAK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK_USE": {
+ "name": "VERAK_USE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VMETH": {
+ "name": "VMETH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS": {
+ "name": "WAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBRANCH": {
+ "name": "ZZBRANCH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFCTRI": {
+ "name": "ZZFCTRI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSECCODE": {
+ "name": "ZZSECCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSEGMENT": {
+ "name": "ZZSEGMENT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "CCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT",
+ "schema": "mdg",
+ "columns": {
+ "CCTR": {
+ "name": "CCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "KTEXT": {
+ "name": "KTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_fk": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_fk",
+ "tableFrom": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT",
+ "tableTo": "ORGANIZATION_MASTER_HRHMTB_CCTR",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "CCTR"
+ ],
+ "columnsTo": [
+ "CCTR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "CCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_PCTR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ABTEI": {
+ "name": "ABTEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATAB": {
+ "name": "DATAB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATBI": {
+ "name": "DATBI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KHINR": {
+ "name": "KHINR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOKRS": {
+ "name": "KOKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LOCK_IND": {
+ "name": "LOCK_IND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PCTR": {
+ "name": "PCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SEGMENT": {
+ "name": "SEGMENT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXJCD": {
+ "name": "TXJCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK": {
+ "name": "VERAK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK_USE": {
+ "name": "VERAK_USE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_PCTR_PCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR_PCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "PCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZBUKRS": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CURR_BUKR": {
+ "name": "CURR_BUKR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBUKRS": {
+ "name": "ZBUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZBUTXT": {
+ "name": "ZZBUTXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCITY": {
+ "name": "ZZCITY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCOUNTRY": {
+ "name": "ZZCOUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLANGU": {
+ "name": "ZZLANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_ZBUKRS_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_ZBUKRS_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZBUKRS"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZEKGRP": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZEKGRP": {
+ "name": "ZEKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKNAM": {
+ "name": "ZZEKNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKTEL": {
+ "name": "ZZEKTEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEMPNUM": {
+ "name": "ZZEMPNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSINGLE": {
+ "name": "ZZSINGLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZTELFX": {
+ "name": "ZZTELFX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZTEL_NUM": {
+ "name": "ZZTEL_NUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_ZEKGRP_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_ZEKGRP_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZEKGRP"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZEKORG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZEKORG": {
+ "name": "ZEKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKOTX": {
+ "name": "ZZEKOTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZEKORG_ZEKORG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG_ZEKORG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZEKORG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZGSBER": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZGSBER": {
+ "name": "ZGSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZGSBER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT",
+ "schema": "mdg",
+ "columns": {
+ "ZGSBER": {
+ "name": "ZGSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LANGU": {
+ "name": "LANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TXTMI": {
+ "name": "TXTMI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_fk": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_fk",
+ "tableFrom": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT",
+ "tableTo": "ORGANIZATION_MASTER_HRHMTB_ZGSBER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "ZGSBER"
+ ],
+ "columnsTo": [
+ "ZGSBER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZGSBER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZLGORT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZLGORT": {
+ "name": "ZLGORT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZWERKS": {
+ "name": "ZWERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLGOBE": {
+ "name": "ZZLGOBE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZLGORT_ZLGORT_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT_ZLGORT_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZLGORT"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZSPART": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZSPART": {
+ "name": "ZSPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZSPART_ZSPART_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART_ZSPART_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZSPART"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKBUR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CTRY_SOFF": {
+ "name": "CTRY_SOFF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_SOFF": {
+ "name": "LANG_SOFF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZVKBUR": {
+ "name": "ZVKBUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_ZVKBUR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_ZVKBUR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKBUR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKGRP": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVKGRP": {
+ "name": "ZVKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_ZVKGRP_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_ZVKGRP_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKGRP"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKORG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVKORG": {
+ "name": "ZVKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZBOAVO": {
+ "name": "ZZBOAVO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZKUNNR": {
+ "name": "ZZKUNNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZVKOKL": {
+ "name": "ZZVKOKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZWAERS": {
+ "name": "ZZWAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKORG_ZVKORG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG_ZVKORG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKORG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVSTEL": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ALAN_VSTE": {
+ "name": "ALAN_VSTE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AZON_VSTE": {
+ "name": "AZON_VSTE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTRY_SHPT": {
+ "name": "CTRY_SHPT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_SHPT": {
+ "name": "LANG_SHPT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZVSTEL": {
+ "name": "ZVSTEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFABKL": {
+ "name": "ZZFABKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAZBS": {
+ "name": "ZZLAZBS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZRIZBS": {
+ "name": "ZZRIZBS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_ZVSTEL_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_ZVSTEL_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVSTEL"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVTWEG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVTWEG": {
+ "name": "ZVTWEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_ZVTWEG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_ZVTWEG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVTWEG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZWERKS": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CTRY_PLNT": {
+ "name": "CTRY_PLNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_PLNT": {
+ "name": "LANG_PLNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZWERKS": {
+ "name": "ZWERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFABKL": {
+ "name": "ZZFABKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME1": {
+ "name": "ZZNAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME2": {
+ "name": "ZZNAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZWERKS_ZWERKS_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS_ZWERKS_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZWERKS"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.PROJECT_MASTER_CMCTB_PROJ_MAST": {
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AS_GRNT_PRD": {
+ "name": "AS_GRNT_PRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZLOC_CD": {
+ "name": "BIZLOC_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_DMN": {
+ "name": "BIZ_DMN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BP_DL_DT": {
+ "name": "BP_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHN_PROJ_TP": {
+ "name": "CHN_PROJ_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_CNTN_YN": {
+ "name": "CNRT_CNTN_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DL_DT": {
+ "name": "CNRT_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DT": {
+ "name": "CNRT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_RESV_YN": {
+ "name": "CNRT_RESV_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_PO_NO": {
+ "name": "CSTM_PO_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIGT_PDT_GRP": {
+ "name": "DIGT_PDT_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_BF_PROJ_NM": {
+ "name": "DL_BF_PROJ_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_CSTM_CD": {
+ "name": "DL_CSTM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_CD": {
+ "name": "DOCK_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_CHRGR": {
+ "name": "DSN_CHRGR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_GRNT_FN_DT": {
+ "name": "FIN_GRNT_FN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GENT_CNT": {
+ "name": "GENT_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOV": {
+ "name": "GOV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRNT_STDT": {
+ "name": "GRNT_STDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IMO_NO": {
+ "name": "IMO_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_NO": {
+ "name": "INQY_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_SEQ": {
+ "name": "INQY_SEQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IO_GB": {
+ "name": "IO_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNG_ACOT_DMN": {
+ "name": "MNG_ACOT_DMN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_ENGN_TP_CD": {
+ "name": "MN_ENGN_TP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSHIP_NO": {
+ "name": "MSHIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTTP": {
+ "name": "NTTP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_FN_DT": {
+ "name": "ORDR_GRNT_FN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_PRD": {
+ "name": "ORDR_GRNT_PRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_1": {
+ "name": "OWN_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_AB": {
+ "name": "OWN_AB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_NM": {
+ "name": "OWN_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_LVL_4": {
+ "name": "PDT_LVL_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRGS_STAT": {
+ "name": "PRGS_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_DT": {
+ "name": "PROJ_CRTE_REQ_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_EMPNO": {
+ "name": "PROJ_CRTE_REQ_EMPNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_PLN_DT": {
+ "name": "PROJ_DL_PLN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_RT_DT": {
+ "name": "PROJ_DL_RT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DSC": {
+ "name": "PROJ_DSC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DTL_TP": {
+ "name": "PROJ_DTL_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_ETC_TP": {
+ "name": "PROJ_ETC_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_GB": {
+ "name": "PROJ_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PROJ_PRGS_YN": {
+ "name": "PROJ_PRGS_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PROF": {
+ "name": "PROJ_PROF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_SCP": {
+ "name": "PROJ_SCP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_WBS_TP": {
+ "name": "PROJ_WBS_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRO_PROJ_NO": {
+ "name": "PRO_PROJ_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REF_NO": {
+ "name": "REF_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RLTD_PROJ": {
+ "name": "RLTD_PROJ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RL_DL_DT": {
+ "name": "RL_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SA_DT": {
+ "name": "SA_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_NO": {
+ "name": "SERS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_YN": {
+ "name": "SERS_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE": {
+ "name": "SHTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_GRP": {
+ "name": "SHTYPE_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND": {
+ "name": "SKND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRC_SYS_ID": {
+ "name": "SRC_SYS_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STDT": {
+ "name": "STDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_ACOT_CLSD_DT": {
+ "name": "SYS_ACOT_CLSD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_CNRT_CNT": {
+ "name": "TOT_CNRT_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WP_PROJ_TP": {
+ "name": "WP_PROJ_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "PROJECT_MASTER_CMCTB_PROJ_MAST_PROJ_NO_unique": {
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST_PROJ_NO_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "PROJ_NO"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER": {
+ "name": "VENDOR_MASTER_BP_HEADER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "VENDOR_MASTER_BP_HEADER_VNDRCD_unique": {
+ "name": "VENDOR_MASTER_BP_HEADER_VNDRCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "VNDRCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRNO": {
+ "name": "ADDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_TMZ": {
+ "name": "ADR_TMZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAX_JRDT_ZONE_CD": {
+ "name": "TAX_JRDT_ZONE_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_TAXNUM": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP_TP": {
+ "name": "ACNT_GRP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZR_NO": {
+ "name": "BIZR_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_CD": {
+ "name": "BIZ_UOM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_NM": {
+ "name": "BIZ_UOM_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_REG_NO": {
+ "name": "CO_REG_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_VLM": {
+ "name": "CO_VLM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_HOLD_ORDR": {
+ "name": "DEL_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_CD": {
+ "name": "DMST_TOP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_NM": {
+ "name": "DMST_TOP_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DNS_NO": {
+ "name": "DNS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_TP": {
+ "name": "DOC_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_VER": {
+ "name": "DOC_VER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIR_NM": {
+ "name": "FIR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_CD": {
+ "name": "GBL_TOP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_NM": {
+ "name": "GBL_TOP_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GIRO_VNDR_ORDR": {
+ "name": "GIRO_VNDR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INB_FLAG": {
+ "name": "INB_FLAG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_LCTN_CHK_NUM": {
+ "name": "INTL_LCTN_CHK_NUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS_CD": {
+ "name": "OVLAP_CAUS_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNT_VNDRCD": {
+ "name": "PTNT_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTN_DOC": {
+ "name": "PTN_DOC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_EMAIL": {
+ "name": "QLT_CHRGR_EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_NM": {
+ "name": "QLT_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_TELNO": {
+ "name": "QLT_CHRGR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_TM": {
+ "name": "REG_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_RESNO": {
+ "name": "REPR_RESNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TEL_NO": {
+ "name": "REP_TEL_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SB_WKA_SEQ": {
+ "name": "SB_WKA_SEQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCETX_RP_SEX_KEY": {
+ "name": "SRCETX_RP_SEX_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_CD_4": {
+ "name": "TX_CD_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VAT_REG_NO": {
+ "name": "VAT_REG_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNO": {
+ "name": "VNDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ACOT_CHRGR_FAXNO": {
+ "name": "ACOT_CHRGR_FAXNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_TELNO": {
+ "name": "ACOT_CHRGR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUTH_GRP": {
+ "name": "AUTH_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BF_VNDRCD": {
+ "name": "BF_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CSTM_VNDR_CLR_ORDR": {
+ "name": "CSTM_VNDR_CLR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTL_ACNT": {
+ "name": "CTL_ACNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_ACT_DT": {
+ "name": "FIN_IR_ACT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_CALC_DT": {
+ "name": "FIN_IR_CALC_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IATA_BIC_GB": {
+ "name": "IATA_BIC_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOGST_VNDR_TP": {
+ "name": "LOGST_VNDR_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEMO": {
+ "name": "MEMO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MIN_ORDR": {
+ "name": "MIN_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_CHRGR_EMAIL": {
+ "name": "MK_CHRGR_EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MOFFC_ACNT_NO": {
+ "name": "MOFFC_ACNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_INVC_ORDR": {
+ "name": "OVLAP_INVC_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLN_GRP": {
+ "name": "PLN_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TP": {
+ "name": "REP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_HOLD_ORDR": {
+ "name": "SPLY_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_MTHD": {
+ "name": "SPLY_MTHD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRT_SPLY_ORDR": {
+ "name": "SPRT_SPLY_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_CD": {
+ "name": "SRCE_TX_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NTN_CD": {
+ "name": "SRCE_TX_NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_BANK_SHRT_KEY": {
+ "name": "TRD_BANK_SHRT_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_ACNT_NO": {
+ "name": "VNDR_ACNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CHRGR_NM": {
+ "name": "VNDR_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DCHAG_CAUS": {
+ "name": "DCHAG_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CERT_NO": {
+ "name": "DCHAG_CERT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ED_DT": {
+ "name": "DCHAG_ED_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ST_DT": {
+ "name": "DCHAG_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RECIP_TP": {
+ "name": "RECIP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_IDENT_NO": {
+ "name": "SRCE_TX_IDENT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NO": {
+ "name": "SRCE_TX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_REL_ORDR": {
+ "name": "SRCE_TX_REL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_TP": {
+ "name": "SRCE_TX_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AT_PUR_ORD_ORDR": {
+ "name": "AT_PUR_ORD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CALC_SHM_GRP": {
+ "name": "CALC_SHM_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNFM_CTL_KEY": {
+ "name": "CNFM_CTL_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GR_BSE_INVC_VR": {
+ "name": "GR_BSE_INVC_VR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORD_CNFM_REQ_ORDR": {
+ "name": "ORD_CNFM_REQ_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_CAUS": {
+ "name": "PUR_HOLD_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_ORD_CUR": {
+ "name": "PUR_ORD_CUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_CHRGR_NM": {
+ "name": "SALE_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TELNO": {
+ "name": "VNDR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_REF_VNDRCD": {
+ "name": "ETC_REF_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_NO": {
+ "name": "PLNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDR_SUB_NO": {
+ "name": "VNDR_SUB_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "soap.soap_logs": {
+ "name": "soap_logs",
+ "schema": "soap",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "direction": {
+ "name": "direction",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "system": {
+ "name": "system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interface": {
+ "name": "interface",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endedAt": {
+ "name": "endedAt",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isSuccess": {
+ "name": "isSuccess",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "requestData": {
+ "name": "requestData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responseData": {
+ "name": "responseData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd": {
+ "name": "cmctb_cd",
+ "schema": "nonsap",
+ "columns": {
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD": {
+ "name": "CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD2": {
+ "name": "CD2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD3": {
+ "name": "CD3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "USR_DF_CHAR_1": {
+ "name": "USR_DF_CHAR_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_2": {
+ "name": "USR_DF_CHAR_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_3": {
+ "name": "USR_DF_CHAR_3",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_4": {
+ "name": "USR_DF_CHAR_4",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_5": {
+ "name": "USR_DF_CHAR_5",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_6": {
+ "name": "USR_DF_CHAR_6",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_7": {
+ "name": "USR_DF_CHAR_7",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_8": {
+ "name": "USR_DF_CHAR_8",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_9": {
+ "name": "USR_DF_CHAR_9",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_10": {
+ "name": "USR_DF_CHAR_10",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_11": {
+ "name": "USR_DF_CHAR_11",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_12": {
+ "name": "USR_DF_CHAR_12",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_13": {
+ "name": "USR_DF_CHAR_13",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_14": {
+ "name": "USR_DF_CHAR_14",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_15": {
+ "name": "USR_DF_CHAR_15",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_16": {
+ "name": "USR_DF_CHAR_16",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_17": {
+ "name": "USR_DF_CHAR_17",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_18": {
+ "name": "USR_DF_CHAR_18",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_19": {
+ "name": "USR_DF_CHAR_19",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_20": {
+ "name": "USR_DF_CHAR_20",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_1": {
+ "name": "USR_DF_CHK_1",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_2": {
+ "name": "USR_DF_CHK_2",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_3": {
+ "name": "USR_DF_CHK_3",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_4": {
+ "name": "USR_DF_CHK_4",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_5": {
+ "name": "USR_DF_CHK_5",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_6": {
+ "name": "USR_DF_CHK_6",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_7": {
+ "name": "USR_DF_CHK_7",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_8": {
+ "name": "USR_DF_CHK_8",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_1": {
+ "name": "USR_DF_DT_1",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_2": {
+ "name": "USR_DF_DT_2",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_3": {
+ "name": "USR_DF_DT_3",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_4": {
+ "name": "USR_DF_DT_4",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_1": {
+ "name": "USR_DF_TM_1",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_2": {
+ "name": "USR_DF_TM_2",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_3": {
+ "name": "USR_DF_TM_3",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_4": {
+ "name": "USR_DF_TM_4",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd_clf": {
+ "name": "cmctb_cd_clf",
+ "schema": "nonsap",
+ "columns": {
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd_clf_nm": {
+ "name": "cmctb_cd_clf_nm",
+ "schema": "nonsap",
+ "columns": {
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF_NM": {
+ "name": "CD_CLF_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRP_DSC": {
+ "name": "GRP_DSC",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cdnm": {
+ "name": "cmctb_cdnm",
+ "schema": "nonsap",
+ "columns": {
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD": {
+ "name": "CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD2": {
+ "name": "CD2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD3": {
+ "name": "CD3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CDNM": {
+ "name": "CDNM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRP_DSC": {
+ "name": "GRP_DSC",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_addr": {
+ "name": "cmctb_customer_addr",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOUSE_NR1": {
+ "name": "HOUSE_NR1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_cfpn": {
+ "name": "cmctb_customer_cfpn",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_compny": {
+ "name": "cmctb_customer_compny",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AR_ACNT_HDL_GB": {
+ "name": "AR_ACNT_HDL_GB",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AMT_RNE_GB": {
+ "name": "AMT_RNE_GB",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_PAY_FRM": {
+ "name": "VNDR_PAY_FRM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BILL_PAY_COND_CD": {
+ "name": "BILL_PAY_COND_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BILL_PAY_BLOC_CD": {
+ "name": "BILL_PAY_BLOC_CD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_general": {
+ "name": "cmctb_customer_general",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS": {
+ "name": "OVLAP_CAUS",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_TP": {
+ "name": "CSTM_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_BLOCK": {
+ "name": "DEL_BLOCK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COND_GRP_1": {
+ "name": "COND_GRP_1",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_GRP_NM": {
+ "name": "CSTM_GRP_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_2": {
+ "name": "TX_NO_2",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_3": {
+ "name": "TX_NO_3",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_4": {
+ "name": "TX_NO_4",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_REG_NO": {
+ "name": "TX_REG_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BA_CD": {
+ "name": "BA_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCH_COND_1": {
+ "name": "SRCH_COND_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCH_COND_2": {
+ "name": "SRCH_COND_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_DISP_NM": {
+ "name": "CITY_DISP_NM",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRM_CD": {
+ "name": "CRM_CD",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IN_FLAG": {
+ "name": "IN_FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDST_CD": {
+ "name": "INDST_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_TP": {
+ "name": "TX_NO_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DTM": {
+ "name": "REG_DTM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTGT_CD": {
+ "name": "FTGT_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTGT_NM": {
+ "name": "FTGT_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTDT_CD": {
+ "name": "FTDT_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTDT_NM": {
+ "name": "FTDT_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTBU_CD": {
+ "name": "FTBU_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTBU_NM": {
+ "name": "FTBU_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_repremail": {
+ "name": "cmctb_customer_repremail",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprfax": {
+ "name": "cmctb_customer_reprfax",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprtel": {
+ "name": "cmctb_customer_reprtel",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprurl": {
+ "name": "cmctb_customer_reprurl",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_sorg": {
+ "name": "cmctb_customer_sorg",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_REGN": {
+ "name": "SALE_REGN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_OFC": {
+ "name": "SALE_OFC",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_GRP": {
+ "name": "CSTM_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSBL": {
+ "name": "PSBL",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_CUR": {
+ "name": "TRD_CUR",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXRAT_TP": {
+ "name": "EXRAT_TP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRC_PRCS_DSC_CD": {
+ "name": "PRC_PRCS_DSC_CD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_STAT_GRP": {
+ "name": "CSTM_STAT_GRP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHIPMT_COND": {
+ "name": "SHIPMT_COND",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAX_TRD_QTY": {
+ "name": "MAX_TRD_QTY",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(84)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_ASGN_GRP": {
+ "name": "ACNT_ASGN_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_taxcd": {
+ "name": "cmctb_customer_taxcd",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DPRT_NTN": {
+ "name": "DPRT_NTN",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_CTG": {
+ "name": "TX_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CSTM_TX_CLF": {
+ "name": "CSTM_TX_CLF",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_taxnum": {
+ "name": "cmctb_customer_taxnum",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_bse": {
+ "name": "cmctb_mat_bse",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SM_CD": {
+ "name": "SM_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_ID": {
+ "name": "MAT_ID",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_TP": {
+ "name": "MAT_TP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_GB": {
+ "name": "MAT_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_DTL": {
+ "name": "MAT_DTL",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_DTL_SPEC": {
+ "name": "MAT_DTL_SPEC",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATL": {
+ "name": "MATL",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OLD_MAT_NO": {
+ "name": "OLD_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SBST_MAT_NO": {
+ "name": "SBST_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UOM": {
+ "name": "UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MRC": {
+ "name": "MRC",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STOR_MAT_ORDR": {
+ "name": "STOR_MAT_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STYPE": {
+ "name": "STYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS": {
+ "name": "CLS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGT": {
+ "name": "WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NET_WGT": {
+ "name": "NET_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGT_UOM": {
+ "name": "WGT_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH": {
+ "name": "LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH_2": {
+ "name": "LTH_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH": {
+ "name": "WTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH_2": {
+ "name": "WTH_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "THK": {
+ "name": "THK",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STD": {
+ "name": "STD",
+ "type": "varchar(70)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROF_STD": {
+ "name": "PROF_STD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CBL_OUT_DIA": {
+ "name": "CBL_OUT_DIA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTRM_MAT_YN": {
+ "name": "LTRM_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNT_AREA": {
+ "name": "PNT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTIN_AREA": {
+ "name": "PNTIN_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTIN_SPEC": {
+ "name": "PNTIN_SPEC",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_AREA": {
+ "name": "PNTOUT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_1": {
+ "name": "PNTOUT_SPEC_1",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_2": {
+ "name": "PNTOUT_SPEC_2",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_3": {
+ "name": "PNTOUT_SPEC_3",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RT_INSPEC": {
+ "name": "RT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UT_INSPEC": {
+ "name": "UT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MT_INSPEC": {
+ "name": "MT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PT_INSPEC": {
+ "name": "PT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_DWG_NO": {
+ "name": "MK_DWG_NO",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CUT_DWG_NO": {
+ "name": "CUT_DWG_NO",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_SPL_NO": {
+ "name": "PIPE_SPL_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_LINE_NO": {
+ "name": "PIPE_LINE_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_CLAS": {
+ "name": "PIPE_CLAS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FLUID_KND": {
+ "name": "FLUID_KND",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_ITM_MATL": {
+ "name": "REP_ITM_MATL",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA": {
+ "name": "REP_DIA",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA_UOM": {
+ "name": "REP_DIA_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_SCH": {
+ "name": "REP_SCH",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA_LTH": {
+ "name": "REP_DIA_LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DBLN_GB": {
+ "name": "DBLN_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_GRD": {
+ "name": "PIPE_GRD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HTRET_YN": {
+ "name": "HTRET_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BA_GALV_SPEC": {
+ "name": "BA_GALV_SPEC",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SSIDE_YN": {
+ "name": "SSIDE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTR_PIPE_YN": {
+ "name": "PNTR_PIPE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UBOLT_YN": {
+ "name": "UBOLT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTLP_PRCD_PNT": {
+ "name": "CTLP_PRCD_PNT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCD_SCV_CTLP": {
+ "name": "PRCD_SCV_CTLP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PMI_INSPEC": {
+ "name": "PMI_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTRPRS": {
+ "name": "WTRPRS",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLV_FIT_NO": {
+ "name": "VLV_FIT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_NO": {
+ "name": "TAG_NO",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_SB_NO": {
+ "name": "TAG_SB_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NM_PLATE_TP": {
+ "name": "NM_PLATE_TP",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NM_PLATE_SVC_NM": {
+ "name": "NM_PLATE_SVC_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VRCS_MAT_NO": {
+ "name": "VRCS_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRSM_FIT_NO": {
+ "name": "TRSM_FIT_NO",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLV_OPT_CD_LIST": {
+ "name": "VLV_OPT_CD_LIST",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_REQ_NO": {
+ "name": "PUR_REQ_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ITM_NO": {
+ "name": "ITM_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MDL_NO": {
+ "name": "MDL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BL_NO": {
+ "name": "BL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_EQP_NO": {
+ "name": "VNDR_EQP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BOX_NO": {
+ "name": "BOX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMT_NO": {
+ "name": "MMT_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INSTL_LOC": {
+ "name": "INSTL_LOC",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_EQP_YN": {
+ "name": "MN_EQP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIXED_MAT_YN": {
+ "name": "FIXED_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRE_YN": {
+ "name": "SPRE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOOL_YN": {
+ "name": "TOOL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CBL_YN": {
+ "name": "CBL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_INSTL_MAT_YN": {
+ "name": "OWN_INSTL_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NONINSTL_MAT_YN": {
+ "name": "NONINSTL_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BLK_NO": {
+ "name": "BLK_NO",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GYEL": {
+ "name": "GYEL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LNK_PTLST_NO": {
+ "name": "LNK_PTLST_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AREA": {
+ "name": "AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STOR_LOC": {
+ "name": "STOR_LOC",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SGUB_WGT": {
+ "name": "SGUB_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DGUB_WGT": {
+ "name": "DGUB_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_SKL": {
+ "name": "DSN_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RMK": {
+ "name": "RMK",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_DT": {
+ "name": "DEL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_STAT": {
+ "name": "MAT_STAT",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_SYS_NO": {
+ "name": "IF_SYS_NO",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_1": {
+ "name": "GLAND_SPEC_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_2": {
+ "name": "GLAND_SPEC_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_3": {
+ "name": "GLAND_SPEC_3",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MCT_MDLE_STD_1": {
+ "name": "MCT_MDLE_STD_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MCT_MDLE_STD_2": {
+ "name": "MCT_MDLE_STD_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BEELE_RISE": {
+ "name": "BEELE_RISE",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAX_DRUM_LTH": {
+ "name": "MAX_DRUM_LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DTM": {
+ "name": "AGR_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISPLN": {
+ "name": "DISPLN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LRG_KWK": {
+ "name": "LRG_KWK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTL_KWK": {
+ "name": "DTL_KWK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SP_INSP_GB": {
+ "name": "SP_INSP_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_4": {
+ "name": "PNTOUT_SPEC_4",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFE_MAT_NO": {
+ "name": "OFE_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFE_CAB_YN": {
+ "name": "OFE_CAB_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INSTL_PSB_CNT": {
+ "name": "INSTL_PSB_CNT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CUTL_ML_GB": {
+ "name": "CUTL_ML_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FCM_INSP": {
+ "name": "FCM_INSP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_DT": {
+ "name": "HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_LIFT_DT": {
+ "name": "HOLD_LIFT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_KND_GB": {
+ "name": "MAT_KND_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BATCH_MNG_ORDR": {
+ "name": "BATCH_MNG_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INPR_ID": {
+ "name": "FS_INPR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INP_DTM": {
+ "name": "FS_INP_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHGR_ID": {
+ "name": "FIN_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHG_DTM": {
+ "name": "FIN_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DWG_FILE_NM": {
+ "name": "DWG_FILE_NM",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_NO_CHG_DT": {
+ "name": "TAG_NO_CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SUB_EQP_YN": {
+ "name": "SUB_EQP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATT_MAT_YN": {
+ "name": "ATT_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_REV_NO": {
+ "name": "DSN_REV_NO",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR1": {
+ "name": "USR_DF_CHAR1",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR2": {
+ "name": "USR_DF_CHAR2",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR3": {
+ "name": "USR_DF_CHAR3",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR4": {
+ "name": "USR_DF_CHAR4",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR5": {
+ "name": "USR_DF_CHAR5",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_clas": {
+ "name": "cmctb_mat_clas",
+ "schema": "nonsap",
+ "columns": {
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CLAS_NM": {
+ "name": "CLAS_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_DTL": {
+ "name": "CLAS_DTL",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRNT_CLAS_CD": {
+ "name": "PRNT_CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_LVL": {
+ "name": "CLAS_LVL",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UOM": {
+ "name": "UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STYPE": {
+ "name": "STYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRD_MATL": {
+ "name": "GRD_MATL",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSE_UOM": {
+ "name": "BSE_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_clas_spchar": {
+ "name": "cmctb_mat_clas_spchar",
+ "schema": "nonsap",
+ "columns": {
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_SEQ": {
+ "name": "SPCHAR_SEQ",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNDT_YN": {
+ "name": "MNDT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_clas_spchar_CLAS_CD_SPCHAR_CD_pk": {
+ "name": "cmctb_mat_clas_spchar_CLAS_CD_SPCHAR_CD_pk",
+ "columns": [
+ "CLAS_CD",
+ "SPCHAR_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_dsc": {
+ "name": "cmctb_mat_dsc",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAT_DTL": {
+ "name": "MAT_DTL",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_plnt": {
+ "name": "cmctb_mat_plnt",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PLNT": {
+ "name": "PLNT",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DELV_UOM": {
+ "name": "DELV_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EA_BTCH_ND_GB": {
+ "name": "EA_BTCH_ND_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_CLF": {
+ "name": "PRCR_CLF",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_CHRGR_CD": {
+ "name": "PUR_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_CHRGR_CD": {
+ "name": "PRCR_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOODS_CHRGR_CD": {
+ "name": "GOODS_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_LT": {
+ "name": "PUR_LT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MRP_TP": {
+ "name": "MRP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_STAT": {
+ "name": "MAT_STAT",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BULK_MAT_ORDR": {
+ "name": "BULK_MAT_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_TP": {
+ "name": "PRCR_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SFTY_STCK_QTY": {
+ "name": "SFTY_STCK_QTY",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SER_PROF": {
+ "name": "SER_PROF",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BATCH_MNG_ORDR": {
+ "name": "BATCH_MNG_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SP_PRCR_TP": {
+ "name": "SP_PRCR_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar": {
+ "name": "cmctb_mat_spchar",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_DTL": {
+ "name": "SPCHAR_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_CD": {
+ "name": "SPCHAR_VAL_CD",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_DTL": {
+ "name": "SPCHAR_VAL_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_NUM": {
+ "name": "SPCHAR_VAL_NUM",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_UOM": {
+ "name": "SPCHAR_VAL_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar_mast": {
+ "name": "cmctb_mat_spchar_mast",
+ "schema": "nonsap",
+ "columns": {
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_DTL": {
+ "name": "SPCHAR_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_TP": {
+ "name": "SPCHAR_TP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_UOM": {
+ "name": "SPCHAR_VAL_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_YN": {
+ "name": "SPCHAR_VAL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_GRP": {
+ "name": "SPCHAR_GRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_spchar_mast_SPCHAR_CD_pk": {
+ "name": "cmctb_mat_spchar_mast_SPCHAR_CD_pk",
+ "columns": [
+ "SPCHAR_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar_val": {
+ "name": "cmctb_mat_spchar_val",
+ "schema": "nonsap",
+ "columns": {
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_VAL_CD": {
+ "name": "SPCHAR_VAL_CD",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_VAL_DTL": {
+ "name": "SPCHAR_VAL_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_spchar_val_SPCHAR_CD_SPCHAR_VAL_CD_pk": {
+ "name": "cmctb_mat_spchar_val_SPCHAR_CD_SPCHAR_VAL_CD_pk",
+ "columns": [
+ "SPCHAR_CD",
+ "SPCHAR_VAL_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_uom": {
+ "name": "cmctb_mat_uom",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SBST_UOM": {
+ "name": "SBST_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CNVRT_FCTR_1": {
+ "name": "CNVRT_FCTR_1",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNVRT_FCTR_2": {
+ "name": "CNVRT_FCTR_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH": {
+ "name": "LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH": {
+ "name": "WTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HGT": {
+ "name": "HGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SZ_UOM": {
+ "name": "SZ_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_bizcls": {
+ "name": "cmctb_proj_bizcls",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_mast": {
+ "name": "cmctb_proj_mast",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MSHIP_NO": {
+ "name": "MSHIP_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_NO": {
+ "name": "SERS_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REF_NO": {
+ "name": "REF_NO",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND": {
+ "name": "SKND",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE": {
+ "name": "SHTYPE",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_CD": {
+ "name": "DOCK_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_1": {
+ "name": "OWN_1",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DT": {
+ "name": "CNRT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DL_DT": {
+ "name": "CNRT_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DSC": {
+ "name": "PROJ_DSC",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_GB": {
+ "name": "PROJ_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_NM": {
+ "name": "OWN_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_SKND2": {
+ "name": "NEW_SKND2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_AB": {
+ "name": "OWN_AB",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHINA_YN": {
+ "name": "CHINA_YN",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DTL_TP": {
+ "name": "PROJ_DTL_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PROF": {
+ "name": "PROJ_PROF",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_NO": {
+ "name": "INQY_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_SEQ": {
+ "name": "INQY_SEQ",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTTP": {
+ "name": "NTTP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RLTD_PROJ": {
+ "name": "RLTD_PROJ",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIGT_PDT_GRP": {
+ "name": "DIGT_PDT_GRP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WP_PROJ_TP": {
+ "name": "WP_PROJ_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_CNRT_CNT": {
+ "name": "TOT_CNRT_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_ETC_TP": {
+ "name": "PROJ_ETC_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRC_SYS_ID": {
+ "name": "SRC_SYS_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRGS_STAT": {
+ "name": "PRGS_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_CSTM_CD": {
+ "name": "DL_CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_LVL_4": {
+ "name": "PDT_LVL_4",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AS_GRNT_PRD": {
+ "name": "AS_GRNT_PRD",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RL_DL_DT": {
+ "name": "RL_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SA_DT": {
+ "name": "SA_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOV": {
+ "name": "GOV",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_BF_PROJ_NM": {
+ "name": "DL_BF_PROJ_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IMO_NO": {
+ "name": "IMO_NO",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZLOC_CD": {
+ "name": "BIZLOC_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNG_ACOT_DMN": {
+ "name": "MNG_ACOT_DMN",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_DMN": {
+ "name": "BIZ_DMN",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_CNTN_YN": {
+ "name": "CNRT_CNTN_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_RESV_YN": {
+ "name": "CNRT_RESV_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PRGS_YN": {
+ "name": "PROJ_PRGS_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_ACOT_CLSD_DT": {
+ "name": "SYS_ACOT_CLSD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_SCP": {
+ "name": "PROJ_SCP",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOA": {
+ "name": "LOA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_ENGN_TP_CD": {
+ "name": "MN_ENGN_TP_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPD": {
+ "name": "SPD",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GT": {
+ "name": "GT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BP_DL_DT": {
+ "name": "BP_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_GRP": {
+ "name": "SHTYPE_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_EMPNO": {
+ "name": "PROJ_CRTE_REQ_EMPNO",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_DT": {
+ "name": "PROJ_CRTE_REQ_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IO_GB": {
+ "name": "IO_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_PO_NO": {
+ "name": "CSTM_PO_NO",
+ "type": "varchar(35)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GENT_CNT": {
+ "name": "GENT_CNT",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_PRD": {
+ "name": "ORDR_GRNT_PRD",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_FN_DT": {
+ "name": "ORDR_GRNT_FN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_CHRGR": {
+ "name": "DSN_CHRGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_PROJ_NM": {
+ "name": "DL_AF_PROJ_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_RL_CLNT": {
+ "name": "DL_AF_RL_CLNT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_SHPSRV_SCP": {
+ "name": "DL_AF_SHPSRV_SCP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_NTTP": {
+ "name": "DL_AF_NTTP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_CLS": {
+ "name": "DL_AF_CLS",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_CALL_SIGN": {
+ "name": "DL_AF_CALL_SIGN",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_TEL_NO": {
+ "name": "DL_AF_TEL_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_FAX_NO": {
+ "name": "DL_AF_FAX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_EMAIL_ADR": {
+ "name": "DL_AF_EMAIL_ADR",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_WBS_TP": {
+ "name": "PROJ_WBS_TP",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHN_PROJ_TP": {
+ "name": "CHN_PROJ_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_GRNT_FN_DT": {
+ "name": "FIN_GRNT_FN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STDT": {
+ "name": "STDT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_YN": {
+ "name": "SERS_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRO_PROJ_NO": {
+ "name": "PRO_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PBSD_PROJ_NO": {
+ "name": "PBSD_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PBSD_SHIP_NM": {
+ "name": "PBSD_SHIP_NM",
+ "type": "varchar(150)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_PLN_DT": {
+ "name": "PROJ_DL_PLN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_RT_DT": {
+ "name": "PROJ_DL_RT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_AREA": {
+ "name": "TOT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXMPT_AREA": {
+ "name": "EXMPT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXMPT_RAT": {
+ "name": "EXMPT_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNCT_PROJ_NO": {
+ "name": "CNCT_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EQP_DTL_YN": {
+ "name": "EQP_DTL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXP_YN": {
+ "name": "EXP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACT_MH_YN": {
+ "name": "ACT_MH_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPEC": {
+ "name": "SPEC",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSGN_LIFE": {
+ "name": "DSGN_LIFE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WK_ENV_WT_VAL_YN": {
+ "name": "WK_ENV_WT_VAL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRNT_STDT": {
+ "name": "GRNT_STDT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TMH_ADPT_YN": {
+ "name": "TMH_ADPT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZV_YN": {
+ "name": "ZV_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SEC_YN": {
+ "name": "SEC_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_wbs": {
+ "name": "cmctb_proj_wbs",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "WBS_ELMT": {
+ "name": "WBS_ELMT",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "WBS_ELMT_NM": {
+ "name": "WBS_ELMT_NM",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_LVL": {
+ "name": "WBS_LVL",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FLAG": {
+ "name": "FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_INSD_ELMT": {
+ "name": "WBS_INSD_ELMT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HGRK_WBS_ELMT": {
+ "name": "HGRK_WBS_ELMT",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_STAT": {
+ "name": "SYS_STAT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_1": {
+ "name": "WBS_ELMT_1",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_2": {
+ "name": "WBS_ELMT_2",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_3": {
+ "name": "WBS_ELMT_3",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_4": {
+ "name": "WBS_ELMT_4",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_5": {
+ "name": "WBS_ELMT_5",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_6": {
+ "name": "WBS_ELMT_6",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_7": {
+ "name": "WBS_ELMT_7",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_8": {
+ "name": "WBS_ELMT_8",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_9": {
+ "name": "WBS_ELMT_9",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_10": {
+ "name": "WBS_ELMT_10",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_addr": {
+ "name": "cmctb_vendor_addr",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAX_JRDT_ZONE_CD": {
+ "name": "TAX_JRDT_ZONE_CD",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_TMZ": {
+ "name": "ADR_TMZ",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_compny": {
+ "name": "cmctb_vendor_compny",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CTL_ACNT": {
+ "name": "CTL_ACNT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLN_GRP": {
+ "name": "PLN_GRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BF_VNDRCD": {
+ "name": "BF_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_INVC_ORDR": {
+ "name": "OVLAP_INVC_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_MTHD": {
+ "name": "SPLY_MTHD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_HOLD_ORDR": {
+ "name": "SPLY_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_BANK_SHRT_KEY": {
+ "name": "TRD_BANK_SHRT_KEY",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NTN_CD": {
+ "name": "SRCE_TX_NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MIN_ORDR": {
+ "name": "MIN_ORDR",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRT_SPLY_ORDR": {
+ "name": "SPRT_SPLY_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_VNDR_CLR_ORDR": {
+ "name": "CSTM_VNDR_CLR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_CD": {
+ "name": "SRCE_TX_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IATA_BIC_GB": {
+ "name": "IATA_BIC_GB",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TP": {
+ "name": "REP_TP",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOGST_VNDR_TP": {
+ "name": "LOGST_VNDR_TP",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_ACNT_NO": {
+ "name": "VNDR_ACNT_NO",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CHRGR_NM": {
+ "name": "VNDR_CHRGR_NM",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_TELNO": {
+ "name": "ACOT_CHRGR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUTH_GRP": {
+ "name": "AUTH_GRP",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_CALC_DT": {
+ "name": "FIN_IR_CALC_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_ACT_DT": {
+ "name": "FIN_IR_ACT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_FAXNO": {
+ "name": "ACOT_CHRGR_FAXNO",
+ "type": "varchar(31)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_CHRGR_EMAIL": {
+ "name": "MK_CHRGR_EMAIL",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEMO": {
+ "name": "MEMO",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MOFFC_ACNT_NO": {
+ "name": "MOFFC_ACNT_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_vendor_compny_VNDRCD_CO_CD_pk": {
+ "name": "cmctb_vendor_compny_VNDRCD_CO_CD_pk",
+ "columns": [
+ "VNDRCD",
+ "CO_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_general": {
+ "name": "cmctb_vendor_general",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP_TP": {
+ "name": "ACNT_GRP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DTM": {
+ "name": "REG_DTM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TEL_NO": {
+ "name": "REP_TEL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_FAX_NO": {
+ "name": "REP_FAX_NO",
+ "type": "varchar(31)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZR_NO": {
+ "name": "BIZR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_REG_NO": {
+ "name": "CO_REG_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_CD_4": {
+ "name": "TX_CD_4",
+ "type": "varchar(54)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_INST_DT": {
+ "name": "CO_INST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TP": {
+ "name": "VNDR_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_CD": {
+ "name": "GBL_TOP_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_NM": {
+ "name": "GBL_TOP_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_CD": {
+ "name": "DMST_TOP_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_NM": {
+ "name": "DMST_TOP_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_CD": {
+ "name": "BIZ_UOM_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_NM": {
+ "name": "BIZ_UOM_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DNS_NO": {
+ "name": "DNS_NO",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VAT_REG_NO": {
+ "name": "VAT_REG_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GIRO_VNDR_ORDR": {
+ "name": "GIRO_VNDR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNT_VNDRCD": {
+ "name": "PTNT_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_NM": {
+ "name": "QLT_CHRGR_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_TELNO": {
+ "name": "QLT_CHRGR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_EMAIL": {
+ "name": "QLT_CHRGR_EMAIL",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SB_WKA_SEQ": {
+ "name": "SB_WKA_SEQ",
+ "type": "varchar(16)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS_CD": {
+ "name": "OVLAP_CAUS_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_TP": {
+ "name": "DOC_TP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTN_DOC": {
+ "name": "PTN_DOC",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_VER": {
+ "name": "DOC_VER",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INB_FLAG": {
+ "name": "INB_FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_HOLD_ORDR": {
+ "name": "DEL_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_LCTN_CHK_NUM": {
+ "name": "INTL_LCTN_CHK_NUM",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCETX_RP_SEX_KEY": {
+ "name": "SRCETX_RP_SEX_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CNRT_CHRGR_1": {
+ "name": "VNDR_CNRT_CHRGR_1",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CNRT_CHRGR_2": {
+ "name": "VNDR_CNRT_CHRGR_2",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_RESNO": {
+ "name": "REPR_RESNO",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_VLM": {
+ "name": "CO_VLM",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_grp": {
+ "name": "cmctb_vendor_grp",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_GRP_CD": {
+ "name": "BIZ_GRP_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER_ID": {
+ "name": "CRTER_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_inco": {
+ "name": "cmctb_vendor_inco",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDRNM": {
+ "name": "VNDRNM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRTNR_GB": {
+ "name": "PRTNR_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_CD": {
+ "name": "INCO_PRTNR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_1": {
+ "name": "INCO_PRTNR_WKA_1",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_2": {
+ "name": "INCO_PRTNR_WKA_2",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_3": {
+ "name": "INCO_PRTNR_WKA_3",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JBTYPE_CD": {
+ "name": "JBTYPE_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JBTYPE_CD_2": {
+ "name": "JBTYPE_CD_2",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDV_CO_GB": {
+ "name": "INDV_CO_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_FOND_YN": {
+ "name": "INCO_FOND_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_NO": {
+ "name": "DOCK_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OCMP_INP_DT": {
+ "name": "OCMP_INP_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_DUSE_DT": {
+ "name": "INCO_DUSE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDST_INS_PMRAT": {
+ "name": "INDST_INS_PMRAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_PFRM_GRAMT": {
+ "name": "CNRT_PFRM_GRAMT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGE_RAT": {
+ "name": "WGE_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_DEPTCD_1": {
+ "name": "CRSPD_DEPTCD_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_DEPTCD_2": {
+ "name": "CRSPD_DEPTCD_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_TEAM_BLNG": {
+ "name": "CRSPD_TEAM_BLNG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_ITM_1": {
+ "name": "INCO_PRTNR_ITM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_ITM_2": {
+ "name": "INCO_PRTNR_ITM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFC_LOC": {
+ "name": "OFC_LOC",
+ "type": "varchar(240)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_OCMP_CARR": {
+ "name": "REP_OCMP_CARR",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_DUSE_CAUS": {
+ "name": "INCO_DUSE_CAUS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_NO": {
+ "name": "TEL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR1": {
+ "name": "ADR1",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR2": {
+ "name": "ADR2",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OLD_VNDRCD": {
+ "name": "OLD_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TREE_NUM": {
+ "name": "TREE_NUM",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_USR_ID": {
+ "name": "CRTE_USR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_USR_ID": {
+ "name": "CHG_USR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UPR_JBTYPE": {
+ "name": "UPR_JBTYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBYBP": {
+ "name": "ZBYBP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RMK": {
+ "name": "RMK",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WDL_PLN_YN": {
+ "name": "WDL_PLN_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGE_DELY_DVL": {
+ "name": "WGE_DELY_DVL",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESCROW_YN": {
+ "name": "ESCROW_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_porg": {
+ "name": "cmctb_vendor_porg",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORD_CUR": {
+ "name": "PUR_ORD_CUR",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CALC_SHM_GRP": {
+ "name": "CALC_SHM_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GR_BSE_INVC_VR": {
+ "name": "GR_BSE_INVC_VR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AT_PUR_ORD_ORDR": {
+ "name": "AT_PUR_ORD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORD_CNFM_REQ_ORDR": {
+ "name": "ORD_CNFM_REQ_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_CHRGR_NM": {
+ "name": "SALE_CHRGR_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TELNO": {
+ "name": "VNDR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNFM_CTL_KEY": {
+ "name": "CNFM_CTL_KEY",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_CAUS": {
+ "name": "PUR_HOLD_CAUS",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_repremail": {
+ "name": "cmctb_vendor_repremail",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprfax": {
+ "name": "cmctb_vendor_reprfax",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprtel": {
+ "name": "cmctb_vendor_reprtel",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprurl": {
+ "name": "cmctb_vendor_reprurl",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_taxnum": {
+ "name": "cmctb_vendor_taxnum",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_vfpn": {
+ "name": "cmctb_vendor_vfpn",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDR_SUB_NO": {
+ "name": "VNDR_SUB_NO",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ETC_REF_VNDRCD": {
+ "name": "ETC_REF_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_whthx": {
+ "name": "cmctb_vendor_whthx",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SRCE_TX_TP": {
+ "name": "SRCE_TX_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SRCE_TX_REL_ORDR": {
+ "name": "SRCE_TX_REL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RECIP_TP": {
+ "name": "RECIP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_IDENT_NO": {
+ "name": "SRCE_TX_IDENT_NO",
+ "type": "varchar(16)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NO": {
+ "name": "SRCE_TX_NO",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CERT_NO": {
+ "name": "DCHAG_CERT_NO",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_RAT": {
+ "name": "DCHAG_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ST_DT": {
+ "name": "DCHAG_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ED_DT": {
+ "name": "DCHAG_ED_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CAUS": {
+ "name": "DCHAG_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.plftb_estm_proj_mast": {
+ "name": "plftb_estm_proj_mast",
+ "schema": "nonsap",
+ "columns": {
+ "ESTM_PROJ_NO": {
+ "name": "ESTM_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AGND_NO": {
+ "name": "AGND_NO",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_PROJ_NM": {
+ "name": "ESTM_PROJ_NM",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_CLS": {
+ "name": "BIZ_CLS",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REV_NO": {
+ "name": "REV_NO",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_TYPE": {
+ "name": "ESTM_TYPE",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWNER_CD": {
+ "name": "OWNER_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_CNT": {
+ "name": "SERS_CNT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND_CD": {
+ "name": "SKND_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_SIZE": {
+ "name": "SHTYPE_SIZE",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHRTR_CD": {
+ "name": "CHRTR_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NATN_CD": {
+ "name": "NATN_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_3": {
+ "name": "CLS_3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATA_CRTE_GB": {
+ "name": "DATA_CRTE_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INPR_ID": {
+ "name": "FS_INPR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INP_DTM": {
+ "name": "FS_INP_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHGR_ID": {
+ "name": "FIN_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHG_DTM": {
+ "name": "FIN_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_1": {
+ "name": "VSL_VAG_1",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_2": {
+ "name": "VSL_VAG_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_3": {
+ "name": "VSL_VAG_3",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_4": {
+ "name": "VSL_VAG_4",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_APP_ID": {
+ "name": "ESTM_AOM_APP_ID",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT": {
+ "name": "ESTM_AOM_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT_CHGR_ID": {
+ "name": "ESTM_AOM_STAT_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT_CHG_DTM": {
+ "name": "ESTM_AOM_STAT_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TRGT_YN": {
+ "name": "IF_TRGT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "plftb_estm_proj_mast_ESTM_PROJ_NO_pk": {
+ "name": "plftb_estm_proj_mast_ESTM_PROJ_NO_pk",
+ "columns": [
+ "ESTM_PROJ_NO"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "ecc.PR_INFORMATION_T_BID_HEADER": {
+ "name": "PR_INFORMATION_T_BID_HEADER",
+ "schema": "ecc",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PR_INFORMATION_T_BID_HEADER_id_seq",
+ "schema": "ecc",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANFNR": {
+ "name": "ANFNR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EKGRP": {
+ "name": "EKGRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EKORG": {
+ "name": "EKORG",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBSART": {
+ "name": "ZBSART",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZRFQ_TRS_DT": {
+ "name": "ZRFQ_TRS_DT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZRFQ_TRS_TM": {
+ "name": "ZRFQ_TRS_TM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "PR_INFORMATION_T_BID_HEADER_ANFNR_unique": {
+ "name": "PR_INFORMATION_T_BID_HEADER_ANFNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ANFNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "ecc.PR_INFORMATION_T_BID_ITEM": {
+ "name": "PR_INFORMATION_T_BID_ITEM",
+ "schema": "ecc",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PR_INFORMATION_T_BID_ITEM_id_seq",
+ "schema": "ecc",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANFNR": {
+ "name": "ANFNR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ANFPS": {
+ "name": "ANFPS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AUFNR": {
+ "name": "AUFNR",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BANFN": {
+ "name": "BANFN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BANPO": {
+ "name": "BANPO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BPRME": {
+ "name": "BPRME",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "numeric(15, 3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISMM": {
+ "name": "DISMM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EBELP": {
+ "name": "EBELP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KNTTP": {
+ "name": "KNTTP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOSTL": {
+ "name": "KOSTL",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LFDAT": {
+ "name": "LFDAT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MENGE": {
+ "name": "MENGE",
+ "type": "numeric(15, 3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PEINH": {
+ "name": "PEINH",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PERNR": {
+ "name": "PERNR",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POSID": {
+ "name": "POSID",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PREIS": {
+ "name": "PREIS",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSPID": {
+ "name": "PSPID",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SAKTO": {
+ "name": "SAKTO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXZ01": {
+ "name": "TXZ01",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS1": {
+ "name": "WAERS1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS2": {
+ "name": "WAERS2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZCON_NO_PO": {
+ "name": "ZCON_NO_PO",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZREQ_FN": {
+ "name": "ZREQ_FN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZREQ_PO": {
+ "name": "ZREQ_PO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZRSLT_AMT": {
+ "name": "ZRSLT_AMT",
+ "type": "numeric(17, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.employee": {
+ "name": "employee",
+ "schema": "knox",
+ "columns": {
+ "ep_id": {
+ "name": "ep_id",
+ "type": "varchar(25)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "employee_number": {
+ "name": "employee_number",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "given_name": {
+ "name": "given_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sir_name": {
+ "name": "sir_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_code": {
+ "name": "title_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_name": {
+ "name": "title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email_address": {
+ "name": "email_address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "employee_status": {
+ "name": "employee_status",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "employee_type": {
+ "name": "employee_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "account_status": {
+ "name": "account_status",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security_level": {
+ "name": "security_level",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_language": {
+ "name": "preferred_language",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "en_company_name": {
+ "name": "en_company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_department_name": {
+ "name": "en_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_discription": {
+ "name": "en_discription",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_full_name": {
+ "name": "en_full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_given_name": {
+ "name": "en_given_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_grade_name": {
+ "name": "en_grade_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_sir_name": {
+ "name": "en_sir_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_title_name": {
+ "name": "en_title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_name": {
+ "name": "grade_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_title_indi_code": {
+ "name": "grade_title_indi_code",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "job_name": {
+ "name": "job_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "real_name_yn": {
+ "name": "real_name_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "server_location": {
+ "name": "server_location",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_sort_order": {
+ "name": "title_sort_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "knox_employee_company_department_idx": {
+ "name": "knox_employee_company_department_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "department_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_number_idx": {
+ "name": "knox_employee_number_idx",
+ "columns": [
+ {
+ "expression": "employee_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_user_id_idx": {
+ "name": "knox_employee_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_email_idx": {
+ "name": "knox_employee_email_idx",
+ "columns": [
+ {
+ "expression": "email_address",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.organization": {
+ "name": "organization",
+ "schema": "knox",
+ "columns": {
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_level": {
+ "name": "department_level",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_order": {
+ "name": "department_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_company_name": {
+ "name": "en_company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_department_name": {
+ "name": "en_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_manager_title": {
+ "name": "en_manager_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_sub_org_code": {
+ "name": "en_sub_org_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "in_department_code": {
+ "name": "in_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "low_department_yn": {
+ "name": "low_department_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_id": {
+ "name": "manager_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_title": {
+ "name": "manager_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_language": {
+ "name": "preferred_language",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_org_code": {
+ "name": "sub_org_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_org_name": {
+ "name": "sub_org_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upr_department_code": {
+ "name": "upr_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_upr_department_name": {
+ "name": "en_upr_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upr_department_name": {
+ "name": "upr_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_department_yn": {
+ "name": "hidden_department_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corp_code": {
+ "name": "corp_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corp_name": {
+ "name": "corp_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_corp_name": {
+ "name": "en_corp_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "knox_org_company_idx": {
+ "name": "knox_org_company_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "organization_company_code_department_code_pk": {
+ "name": "organization_company_code_department_code_pk",
+ "columns": [
+ "company_code",
+ "department_code"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.title": {
+ "name": "title",
+ "schema": "knox",
+ "columns": {
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title_code": {
+ "name": "title_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title_name": {
+ "name": "title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_title_name": {
+ "name": "en_title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "knox_title_company_idx": {
+ "name": "knox_title_company_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "title_company_code_title_code_pk": {
+ "name": "title_company_code_title_code_pk",
+ "columns": [
+ "company_code",
+ "title_code"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_lines": {
+ "name": "approval_lines",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "aplns": {
+ "name": "aplns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_lines_createdBy_users_id_fk": {
+ "name": "approval_lines_createdBy_users_id_fk",
+ "tableFrom": "approval_lines",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_logs": {
+ "name": "approval_logs",
+ "schema": "knox",
+ "columns": {
+ "ap_inf_id": {
+ "name": "ap_inf_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ep_id": {
+ "name": "ep_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_address": {
+ "name": "email_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "aplns": {
+ "name": "aplns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_template_history": {
+ "name": "approval_template_history",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "templateId": {
+ "name": "templateId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "changeDescription": {
+ "name": "changeDescription",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changedBy": {
+ "name": "changedBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_template_history_templateId_approval_templates_id_fk": {
+ "name": "approval_template_history_templateId_approval_templates_id_fk",
+ "tableFrom": "approval_template_history",
+ "tableTo": "approval_templates",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "templateId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "approval_template_history_changedBy_users_id_fk": {
+ "name": "approval_template_history_changedBy_users_id_fk",
+ "tableFrom": "approval_template_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "changedBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_template_variables": {
+ "name": "approval_template_variables",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "approvalTemplateId": {
+ "name": "approvalTemplateId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variableName": {
+ "name": "variableName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variableType": {
+ "name": "variableType",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "defaultValue": {
+ "name": "defaultValue",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_template_variables_approvalTemplateId_approval_templates_id_fk": {
+ "name": "approval_template_variables_approvalTemplateId_approval_templates_id_fk",
+ "tableFrom": "approval_template_variables",
+ "tableTo": "approval_templates",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "approvalTemplateId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "approval_template_variables_createdBy_users_id_fk": {
+ "name": "approval_template_variables_createdBy_users_id_fk",
+ "tableFrom": "approval_template_variables",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_templates": {
+ "name": "approval_templates",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approvalLineId": {
+ "name": "approvalLineId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_templates_approvalLineId_approval_lines_id_fk": {
+ "name": "approval_templates_approvalLineId_approval_lines_id_fk",
+ "tableFrom": "approval_templates",
+ "tableTo": "approval_lines",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "approvalLineId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "approval_templates_createdBy_users_id_fk": {
+ "name": "approval_templates_createdBy_users_id_fk",
+ "tableFrom": "approval_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.user_domain": {
+ "name": "user_domain",
+ "schema": "public",
+ "values": [
+ "pending",
+ "evcp",
+ "procurement",
+ "sales",
+ "engineering",
+ "partners"
+ ]
+ },
+ "public.score_type": {
+ "name": "score_type",
+ "schema": "public",
+ "values": [
+ "fixed",
+ "variable"
+ ]
+ },
+ "public.qna_category": {
+ "name": "qna_category",
+ "schema": "public",
+ "values": [
+ "engineering",
+ "procurement",
+ "technical_sales"
+ ]
+ },
+ "public.gtc_type": {
+ "name": "gtc_type",
+ "schema": "public",
+ "values": [
+ "standard",
+ "project"
+ ]
+ },
+ "public.review_status": {
+ "name": "review_status",
+ "schema": "public",
+ "values": [
+ "draft",
+ "pending",
+ "reviewing",
+ "approved",
+ "rejected",
+ "revised"
+ ]
+ },
+ "public.consent_action": {
+ "name": "consent_action",
+ "schema": "public",
+ "values": [
+ "consent",
+ "revoke",
+ "update"
+ ]
+ },
+ "public.consent_type": {
+ "name": "consent_type",
+ "schema": "public",
+ "values": [
+ "privacy_policy",
+ "terms_of_service",
+ "marketing",
+ "optional"
+ ]
+ },
+ "public.policy_type": {
+ "name": "policy_type",
+ "schema": "public",
+ "values": [
+ "privacy_policy",
+ "terms_of_service"
+ ]
+ },
+ "public.award_count": {
+ "name": "award_count",
+ "schema": "public",
+ "values": [
+ "single",
+ "multiple"
+ ]
+ },
+ "public.bidding_status": {
+ "name": "bidding_status",
+ "schema": "public",
+ "values": [
+ "bidding_generated",
+ "request_for_quotation",
+ "received_quotation",
+ "set_target_price",
+ "bidding_opened",
+ "bidding_closed",
+ "evaluation_of_bidding",
+ "bidding_disposal",
+ "vendor_selected"
+ ]
+ },
+ "public.bidding_type": {
+ "name": "bidding_type",
+ "schema": "public",
+ "values": [
+ "equipment",
+ "construction",
+ "service",
+ "lease",
+ "steel_stock",
+ "piping",
+ "transport",
+ "waste",
+ "sale"
+ ]
+ },
+ "public.contract_type": {
+ "name": "contract_type",
+ "schema": "public",
+ "values": [
+ "unit_price",
+ "general",
+ "sale"
+ ]
+ },
+ "public.document_type": {
+ "name": "document_type",
+ "schema": "public",
+ "values": [
+ "notice",
+ "specification",
+ "specification_meeting",
+ "contract_draft",
+ "company_proposal",
+ "financial_doc",
+ "technical_doc",
+ "certificate",
+ "pr_document",
+ "spec_document",
+ "evaluation_doc",
+ "bid_attachment",
+ "other"
+ ]
+ },
+ "public.invitation_status": {
+ "name": "invitation_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "sent",
+ "accepted",
+ "declined",
+ "submitted"
+ ]
+ },
+ "public.quantity_unit": {
+ "name": "quantity_unit",
+ "schema": "public",
+ "values": [
+ "ea",
+ "set",
+ "kg",
+ "ton",
+ "m",
+ "m2",
+ "m3",
+ "lot",
+ "other"
+ ]
+ },
+ "public.weight_unit": {
+ "name": "weight_unit",
+ "schema": "public",
+ "values": [
+ "kg",
+ "ton",
+ "lb",
+ "g"
+ ]
+ }
+ },
+ "schemas": {
+ "mdg": "mdg",
+ "soap": "soap",
+ "nonsap": "nonsap",
+ "ecc": "ecc",
+ "knox": "knox"
+ },
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {
+ "public.contracts_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contracts_detail_view_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_name": {
+ "name": "contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "end_date": {
+ "name": "end_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "partial_shipping_allowed": {
+ "name": "partial_shipping_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "partial_payment_allowed": {
+ "name": "partial_payment_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"contracts\".\"id\", \"contracts\".\"contract_no\", \"contracts\".\"contract_name\", \"contracts\".\"status\", \"contracts\".\"start_date\", \"contracts\".\"end_date\", \"contracts\".\"project_id\", \"projects\".\"code\", \"projects\".\"name\", \"contracts\".\"vendor_id\", \"vendors\".\"vendor_name\", \"contracts\".\"payment_terms\", \"contracts\".\"delivery_terms\", \"contracts\".\"delivery_date\", \"contracts\".\"delivery_location\", \"contracts\".\"currency\", \"contracts\".\"total_amount\", \"contracts\".\"discount\", \"contracts\".\"tax\", \"contracts\".\"shipping_fee\", \"contracts\".\"net_total\", \"contracts\".\"partial_shipping_allowed\", \"contracts\".\"partial_payment_allowed\", \"contracts\".\"remarks\", \"contracts\".\"version\", \"contracts\".\"created_at\", \"contracts\".\"updated_at\", EXISTS (\n SELECT 1 \n FROM \"contract_envelopes\" \n WHERE \"contract_envelopes\".\"contract_id\" = \"contracts\".\"id\"\n ) as \"has_signature\", COALESCE((\n SELECT json_agg(\n json_build_object(\n 'id', ci.id,\n 'itemId', ci.item_id,\n 'description', ci.description,\n 'quantity', ci.quantity,\n 'unitPrice', ci.unit_price,\n 'taxRate', ci.tax_rate,\n 'taxAmount', ci.tax_amount,\n 'totalLineAmount', ci.total_line_amount,\n 'remark', ci.remark,\n 'createdAt', ci.created_at,\n 'updatedAt', ci.updated_at\n )\n )\n FROM \"contract_items\" AS ci\n WHERE ci.contract_id = \"contracts\".\"id\"\n ), '[]') as \"items\", COALESCE((\n SELECT json_agg(\n json_build_object(\n 'id', ce.id,\n 'envelopeId', ce.envelope_id,\n 'documentId', ce.document_id,\n 'envelopeStatus', ce.envelope_status,\n 'fileName', ce.file_name,\n 'filePath', ce.file_path,\n 'createdAt', ce.created_at,\n 'updatedAt', ce.updated_at,\n 'signers', (\n SELECT json_agg(\n json_build_object(\n 'id', cs.id,\n 'vendorContactId', cs.vendor_contact_id,\n 'signerType', cs.signer_type,\n 'signerEmail', cs.signer_email,\n 'signerName', cs.signer_name,\n 'signerPosition', cs.signer_position,\n 'signerStatus', cs.signer_status,\n 'signedAt', cs.signed_at\n )\n )\n FROM \"contract_signers\" AS cs\n WHERE cs.envelope_id = ce.id\n )\n )\n )\n FROM \"contract_envelopes\" AS ce\n WHERE ce.contract_id = \"contracts\".\"id\"\n ), '[]') as \"envelopes\" from \"contracts\" left join \"projects\" on \"contracts\".\"project_id\" = \"projects\".\"id\" left join \"vendors\" on \"contracts\".\"vendor_id\" = \"vendors\".\"id\"",
+ "name": "contracts_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.poa_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "poa_detail_view_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_status": {
+ "name": "approval_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"poa\".\"id\", \"poa\".\"contract_no\", \"contracts\".\"project_id\", \"contracts\".\"vendor_id\", \"poa\".\"change_reason\", \"poa\".\"approval_status\", \"contracts\".\"contract_name\" as \"original_contract_name\", \"contracts\".\"status\" as \"original_status\", \"contracts\".\"start_date\" as \"original_start_date\", \"contracts\".\"end_date\" as \"original_end_date\", \"poa\".\"delivery_terms\", \"poa\".\"delivery_date\", \"poa\".\"delivery_location\", \"poa\".\"currency\", \"poa\".\"total_amount\", \"poa\".\"discount\", \"poa\".\"tax\", \"poa\".\"shipping_fee\", \"poa\".\"net_total\", \"poa\".\"created_at\", \"poa\".\"updated_at\", EXISTS (\n SELECT 1 \n FROM \"contract_envelopes\" \n WHERE \"contract_envelopes\".\"contract_id\" = \"poa\".\"id\"\n ) as \"has_signature\" from \"poa\" left join \"contracts\" on \"poa\".\"contract_no\" = \"contracts\".\"contract_no\"",
+ "name": "poa_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.project_approved_vendors": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "name_ko": {
+ "name": "name_ko",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_en": {
+ "name": "name_en",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ship'"
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendors\".\"id\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendors\".\"tax_id\", \"vendors\".\"email\", \"vendors\".\"phone\", \"vendors\".\"status\", \"vendor_types\".\"name_ko\", \"vendor_types\".\"name_en\", \"projects\".\"code\", \"projects\".\"name\", \"projects\".\"type\", \"vendor_pq_submissions\".\"submitted_at\", \"vendor_pq_submissions\".\"approved_at\" from \"vendors\" inner join \"vendor_pq_submissions\" on \"vendor_pq_submissions\".\"vendor_id\" = \"vendors\".\"id\" inner join \"projects\" on \"vendor_pq_submissions\".\"project_id\" = \"projects\".\"id\" left join \"vendor_types\" on \"vendors\".\"vendor_type_id\" = \"vendor_types\".\"id\" where \"vendor_pq_submissions\".\"status\" = 'APPROVED'",
+ "name": "project_approved_vendors",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_investigations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pq_submission_id": {
+ "name": "pq_submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "qm_manager_id": {
+ "name": "qm_manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_status": {
+ "name": "investigation_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "investigation_address": {
+ "name": "investigation_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_method": {
+ "name": "investigation_method",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_start_at": {
+ "name": "scheduled_start_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_end_at": {
+ "name": "scheduled_end_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "forecasted_at": {
+ "name": "forecasted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_result": {
+ "name": "evaluation_result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_notes": {
+ "name": "investigation_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pq_items": {
+ "name": "pq_items",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendor_investigations\".\"id\", \"vendor_investigations\".\"vendor_id\", \"vendor_investigations\".\"pq_submission_id\", \"vendor_investigations\".\"requester_id\", \"vendor_investigations\".\"qm_manager_id\", \"vendor_investigations\".\"investigation_status\", \"vendor_investigations\".\"investigation_address\", \"vendor_investigations\".\"investigation_method\", \"vendor_investigations\".\"scheduled_start_at\", \"vendor_investigations\".\"scheduled_end_at\", \"vendor_investigations\".\"forecasted_at\", \"vendor_investigations\".\"requested_at\", \"vendor_investigations\".\"confirmed_at\", \"vendor_investigations\".\"completed_at\", \"vendor_investigations\".\"evaluation_score\", \"vendor_investigations\".\"evaluation_result\", \"vendor_investigations\".\"investigation_notes\", \"vendor_investigations\".\"created_at\", \"vendor_investigations\".\"updated_at\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendor_pq_submissions\".\"pq_items\", requester.name as \"requesterName\", requester.email as \"requesterEmail\", qm_manager.name as \"qmManagerName\", qm_manager.email as \"qmManagerEmail\", (\n CASE \n WHEN EXISTS (\n SELECT 1 FROM vendor_investigation_attachments via \n WHERE via.investigation_id = \"vendor_investigations\".\"id\"\n ) \n THEN true \n ELSE false \n END\n ) as \"hasAttachments\" from \"vendor_investigations\" left join \"vendors\" on \"vendor_investigations\".\"vendor_id\" = \"vendors\".\"id\" left join users AS requester on \"vendor_investigations\".\"requester_id\" = requester.id left join users AS qm_manager on \"vendor_investigations\".\"qm_manager_id\" = qm_manager.id left join \"vendor_pq_submissions\" on \"vendor_investigations\".\"pq_submission_id\" = \"vendor_pq_submissions\".\"id\"",
+ "name": "vendor_investigations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.cbe_view": {
+ "columns": {},
+ "definition": "select \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"rfq_id\" as \"rfq_id\", \"cbe_evaluations\".\"vendor_id\" as \"vendor_id\", \"cbe_evaluations\".\"total_cost\" as \"total_cost\", \"cbe_evaluations\".\"currency\" as \"currency\", \"cbe_evaluations\".\"payment_terms\" as \"payment_terms\", \"cbe_evaluations\".\"incoterms\" as \"incoterms\", \"cbe_evaluations\".\"result\" as \"result\", \"cbe_evaluations\".\"notes\" as \"notes\", \"cbe_evaluations\".\"evaluated_by\" as \"evaluated_by\", \"cbe_evaluations\".\"evaluated_at\" as \"evaluated_at\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"users\".\"name\" as \"evaluator_name\", \"users\".\"email\" as \"evaluator_email\" from \"cbe_evaluations\" inner join \"rfqs\" on \"cbe_evaluations\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"cbe_evaluations\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" on \"cbe_evaluations\".\"evaluated_by\" = \"users\".\"id\"",
+ "name": "cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfqs_view": {
+ "columns": {},
+ "definition": "select \"rfqs\".\"id\" as \"rfq_id\", \"rfqs\".\"status\" as \"status\", \"rfqs\".\"created_at\" as \"created_at\", \"rfqs\".\"updated_at\" as \"updated_at\", \"rfqs\".\"created_by\" as \"created_by\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"rfqs\".\"parent_rfq_id\" as \"parent_rfq_id\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"users\".\"email\" as \"user_email\", \"users\".\"name\" as \"user_name\", (\n SELECT COUNT(*) \n FROM \"rfq_items\" \n WHERE \"rfq_items\".\"rfq_id\" = \"rfqs\".\"id\"\n ) as \"item_count\", (\n SELECT COUNT(*) \n FROM \"rfq_attachments\" \n WHERE \"rfq_attachments\".\"rfq_id\" = \"rfqs\".\"id\"\n ) as \"attachment_count\" from \"rfqs\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" on \"rfqs\".\"created_by\" = \"users\".\"id\"",
+ "name": "rfqs_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_cbe_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"id\" as \"vendor_response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"result\" as \"cbe_result\", \"cbe_evaluations\".\"notes\" as \"cbe_note\", \"cbe_evaluations\".\"updated_at\" as \"cbe_updated\", \"cbe_evaluations\".\"total_cost\" as \"total_cost\", \"cbe_evaluations\".\"currency\" as \"currency\", \"cbe_evaluations\".\"payment_terms\" as \"payment_terms\", \"cbe_evaluations\".\"incoterms\" as \"incoterms\", \"cbe_evaluations\".\"delivery_schedule\" as \"delivery_schedule\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"cbe_evaluations\" on (\"cbe_evaluations\".\"vendor_id\" = \"vendors\".\"id\" and \"cbe_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\")",
+ "name": "vendor_cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_cbe_view": {
+ "columns": {},
+ "definition": "select \"vendor_responses\".\"id\" as \"response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"vendor_id\" as \"vendor_id\", \"vendor_responses\".\"response_status\" as \"response_status\", \"vendor_responses\".\"notes\" as \"response_notes\", \"vendor_responses\".\"responded_by\" as \"responded_by\", \"vendor_responses\".\"responded_at\" as \"responded_at\", \"vendor_responses\".\"updated_at\" as \"response_updated_at\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"rfqs\".\"due_date\" as \"rfq_due_date\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"status\" as \"vendor_status\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"vendor_commercial_responses\".\"id\" as \"commercial_response_id\", \"vendor_commercial_responses\".\"response_status\" as \"commercial_response_status\", \"vendor_commercial_responses\".\"total_price\" as \"total_price\", \"vendor_commercial_responses\".\"currency\" as \"currency\", \"vendor_commercial_responses\".\"payment_terms\" as \"payment_terms\", \"vendor_commercial_responses\".\"incoterms\" as \"incoterms\", \"vendor_commercial_responses\".\"delivery_period\" as \"delivery_period\", \"vendor_commercial_responses\".\"warranty_period\" as \"warranty_period\", \"vendor_commercial_responses\".\"validity_period\" as \"validity_period\", \"vendor_commercial_responses\".\"price_breakdown\" as \"price_breakdown\", \"vendor_commercial_responses\".\"commercial_notes\" as \"commercial_notes\", \"vendor_commercial_responses\".\"created_at\" as \"commercial_created_at\", \"vendor_commercial_responses\".\"updated_at\" as \"commercial_updated_at\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"attachment_count\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"commercial_response_id\" = \"vendor_commercial_responses\".\"id\"\n ) as \"commercial_attachment_count\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n AND \"vendor_response_attachments\".\"attachment_type\" = 'TECHNICAL_SPEC'\n ) as \"technical_attachment_count\", (\n SELECT MAX(\"uploaded_at\") \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"latest_attachment_date\" from \"vendor_responses\" inner join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_commercial_responses\" on \"vendor_commercial_responses\".\"response_id\" = \"vendor_responses\".\"id\"",
+ "name": "vendor_response_cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_responses_view": {
+ "columns": {},
+ "definition": "select \"vendor_responses\".\"id\" as \"response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"vendor_id\" as \"vendor_id\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"rfqs\".\"due_date\" as \"rfq_due_date\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"created_at\" as \"rfq_created_at\", \"rfqs\".\"updated_at\" as \"rfq_updated_at\", \"rfqs\".\"created_by\" as \"rfq_created_by\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendor_responses\".\"response_status\" as \"response_status\", \"vendor_responses\".\"responded_at\" as \"responded_at\", CASE WHEN \"vendor_technical_responses\".\"id\" IS NOT NULL THEN TRUE ELSE FALSE END as \"has_technical_response\", \"vendor_technical_responses\".\"id\" as \"technical_response_id\", CASE WHEN \"vendor_commercial_responses\".\"id\" IS NOT NULL THEN TRUE ELSE FALSE END as \"has_commercial_response\", \"vendor_commercial_responses\".\"id\" as \"commercial_response_id\", \"vendor_commercial_responses\".\"total_price\" as \"total_price\", \"vendor_commercial_responses\".\"currency\" as \"currency\", \"rfq_evaluations\".\"id\" as \"tbe_id\", \"rfq_evaluations\".\"result\" as \"tbe_result\", \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"result\" as \"cbe_result\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"attachment_count\" from \"vendor_responses\" inner join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_technical_responses\" on \"vendor_technical_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"vendor_commercial_responses\" on \"vendor_commercial_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"rfq_evaluations\" on (\"rfq_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\" and \"rfq_evaluations\".\"vendor_id\" = \"vendor_responses\".\"vendor_id\" and \"rfq_evaluations\".\"eval_type\" = 'TBE') left join \"cbe_evaluations\" on (\"cbe_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\" and \"cbe_evaluations\".\"vendor_id\" = \"vendor_responses\".\"vendor_id\")",
+ "name": "vendor_responses_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_rfq_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\"",
+ "name": "vendor_rfq_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_tbe_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"id\" as \"vendor_response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"vendor_technical_responses\".\"id\" as \"technical_response_id\", \"vendor_technical_responses\".\"response_status\" as \"technical_response_status\", \"vendor_technical_responses\".\"summary\" as \"technical_summary\", \"vendor_technical_responses\".\"notes\" as \"technical_notes\", \"vendor_technical_responses\".\"updated_at\" as \"technical_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"rfq_evaluations\".\"id\" as \"tbe_id\", \"rfq_evaluations\".\"result\" as \"tbe_result\", \"rfq_evaluations\".\"notes\" as \"tbe_note\", \"rfq_evaluations\".\"updated_at\" as \"tbe_updated\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_technical_responses\" on \"vendor_technical_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"rfq_evaluations\" on (\"rfq_evaluations\".\"vendor_id\" = \"vendors\".\"id\" and \"rfq_evaluations\".\"eval_type\" = 'TBE' and \"rfq_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\")",
+ "name": "vendor_tbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.role_view": {
+ "columns": {},
+ "definition": "select \"roles\".\"id\" as \"id\", \"roles\".\"name\" as \"name\", \"roles\".\"description\" as \"description\", \"roles\".\"domain\" as \"domain\", \"roles\".\"created_at\" as \"created_at\", \"vendors\".\"id\" as \"company_id\", \"vendors\".\"vendor_name\" as \"company_name\", COUNT(\"users\".\"id\") as \"user_count\" from \"roles\" left join \"user_roles\" on \"user_roles\".\"role_id\" = \"roles\".\"id\" left join \"users\" on \"users\".\"id\" = \"user_roles\".\"user_id\" left join \"vendors\" on \"roles\".\"company_id\" = \"vendors\".\"id\" group by \"roles\".\"id\", \"vendors\".\"id\"",
+ "name": "role_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.user_view": {
+ "columns": {},
+ "definition": "select \"users\".\"id\" as \"user_id\", \"users\".\"name\" as \"user_name\", \"users\".\"phone\" as \"user_phone\", \"users\".\"email\" as \"user_email\", \"users\".\"domain\" as \"user_domain\", \"users\".\"image_url\" as \"user_image\", \"vendors\".\"id\" as \"company_id\", \"vendors\".\"vendor_name\" as \"company_name\", \n array_agg(\"roles\".\"name\")\n as \"roles\", \"users\".\"created_at\" as \"created_at\" from \"users\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"user_roles\" on \"users\".\"id\" = \"user_roles\".\"user_id\" left join \"roles\" on \"user_roles\".\"role_id\" = \"roles\".\"id\" group by \"users\".\"id\", \"vendors\".\"id\"",
+ "name": "user_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.form_lists_view": {
+ "columns": {},
+ "definition": "select \"tag_type_class_form_mappings\".\"id\" as \"id\", \"tag_type_class_form_mappings\".\"project_id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"tag_type_class_form_mappings\".\"tag_type_label\" as \"tag_type_label\", \"tag_type_class_form_mappings\".\"class_label\" as \"class_label\", \"tag_type_class_form_mappings\".\"form_code\" as \"form_code\", \"tag_type_class_form_mappings\".\"form_name\" as \"form_name\", \"tag_type_class_form_mappings\".\"ep\" as \"ep\", \"tag_type_class_form_mappings\".\"remark\" as \"remark\", \"tag_type_class_form_mappings\".\"created_at\" as \"created_at\", \"tag_type_class_form_mappings\".\"updated_at\" as \"updated_at\" from \"tag_type_class_form_mappings\" inner join \"projects\" on \"tag_type_class_form_mappings\".\"project_id\" = \"projects\".\"id\"",
+ "name": "form_lists_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.view_tag_subfields": {
+ "columns": {
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_description": {
+ "name": "attributes_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expression": {
+ "name": "expression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delimiter": {
+ "name": "delimiter",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"tag_subfields\".\"id\" as \"id\", \"tag_subfields\".\"tag_type_code\", \"tag_types\".\"description\", \"tag_subfields\".\"attributes_id\", \"tag_subfields\".\"attributes_description\", \"tag_subfields\".\"expression\", \"tag_subfields\".\"delimiter\", \"tag_subfields\".\"sort_order\", \"tag_subfields\".\"created_at\", \"tag_subfields\".\"updated_at\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\", \"projects\".\"name\" from \"tag_subfields\" inner join \"tag_types\" on (\"tag_subfields\".\"tag_type_code\" = \"tag_types\".\"code\" and \"tag_subfields\".\"project_id\" = \"tag_types\".\"project_id\") inner join \"projects\" on \"tag_subfields\".\"project_id\" = \"projects\".\"id\"",
+ "name": "view_tag_subfields",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.document_stages_only_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n d.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM documents d\n LEFT JOIN issue_stages ist ON d.id = ist.document_id\n GROUP BY d.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n -- 문서별 스테이지 집계 (리비전 제외)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'description', ist.description,\n 'notes', ist.notes,\n 'reminderDays', ist.reminder_days\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.doc_number,\n d.drawing_kind,\n d.vendor_doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n -- 프로젝트 및 벤더 정보\n p.code as project_code,\n v.vendor_name as vendor_name,\n v.vendor_code as vendor_code,\n c.vendor_id as vendor_id,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 전체 스테이지 (리비전 제외)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 메타 정보\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- 프로젝트 및 벤더 정보 JOIN\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN projects p ON c.project_id = p.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n -- 스테이지 관련 정보 JOIN\n LEFT JOIN document_stats ds ON d.id = ds.document_id\n LEFT JOIN current_stage_info csi ON d.id = csi.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "document_stages_only_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.document_stages_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_count": {
+ "name": "stage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_list": {
+ "name": "stage_list",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT\n d.id AS document_id,\n d.doc_number,\n d.title,\n d.status,\n d.issued_date,\n d.contract_id,\n (SELECT COUNT(*) FROM issue_stages WHERE document_id = d.id) AS stage_count,\n COALESCE( \n (SELECT json_agg(i.stage_name) FROM issue_stages i WHERE i.document_id = d.id), \n '[]'\n ) AS stage_list,\n d.created_at,\n d.updated_at\n FROM documents d\n",
+ "name": "document_stages_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.enhanced_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision": {
+ "name": "latest_revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_status": {
+ "name": "latest_revision_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_name": {
+ "name": "latest_revision_uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_submitted_date": {
+ "name": "latest_submitted_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n d.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM documents d\n LEFT JOIN issue_stages ist ON d.id = ist.document_id\n GROUP BY d.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n latest_revision_info AS (\n SELECT DISTINCT ON (ist.document_id)\n ist.document_id,\n r.id as latest_revision_id,\n r.revision as latest_revision,\n r.revision_status as latest_revision_status,\n r.uploader_name as latest_revision_uploader_name,\n r.submitted_date as latest_submitted_date\n FROM revisions r\n JOIN issue_stages ist ON r.issue_stage_id = ist.id\n ORDER BY ist.document_id, r.created_at DESC\n ),\n -- 리비전별 첨부파일 집계\n revision_attachments AS (\n SELECT \n r.id as revision_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', da.id,\n 'revisionId', da.revision_id,\n 'fileName', da.file_name,\n 'filePath', da.file_path,\n 'fileSize', da.file_size,\n 'fileType', da.file_type,\n 'createdAt', da.created_at,\n 'updatedAt', da.updated_at\n ) ORDER BY da.created_at\n ) FILTER (WHERE da.id IS NOT NULL),\n '[]'::json\n ) as attachments\n FROM revisions r\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY r.id\n ),\n -- 스테이지별 리비전 집계 (첨부파일 포함)\n stage_revisions AS (\n SELECT \n ist.id as stage_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', r.id,\n 'issueStageId', r.issue_stage_id,\n 'revision', r.revision,\n 'uploaderType', r.uploader_type,\n 'uploaderId', r.uploader_id,\n 'uploaderName', r.uploader_name,\n 'comment', r.comment,\n 'usage', r.usage,\n 'revisionStatus', r.revision_status,\n 'submittedDate', r.submitted_date,\n 'uploadedAt', r.uploaded_at,\n 'approvedDate', r.approved_date,\n 'reviewStartDate', r.review_start_date,\n 'rejectedDate', r.rejected_date,\n 'reviewerId', r.reviewer_id,\n 'reviewerName', r.reviewer_name,\n 'reviewComments', r.review_comments,\n 'createdAt', r.created_at,\n 'updatedAt', r.updated_at,\n 'attachments', ra.attachments\n ) ORDER BY r.created_at\n ) FILTER (WHERE r.id IS NOT NULL),\n '[]'::json\n ) as revisions\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN revision_attachments ra ON r.id = ra.revision_id\n GROUP BY ist.id\n ),\n -- 문서별 스테이지 집계 (리비전 포함)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'revisions', sr.revisions\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n LEFT JOIN stage_revisions sr ON ist.id = sr.stage_id\n GROUP BY ist.document_id\n ),\n attachment_counts AS (\n SELECT \n ist.document_id,\n COUNT(da.id) as attachment_count\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.doc_number,\n d.drawing_kind,\n d.vendor_doc_number, -- ✅ 벤더 문서 번호 추가\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n\n d.c_gbn,\n d.d_gbn,\n d.degree_gbn,\n d.dept_gbn,\n d.s_gbn,\n d.j_gbn,\n\n\n \n -- ✅ 프로젝트 및 벤더 정보 추가\n c.project_id as project_id,\n p.code as project_code,\n v.vendor_name as vendor_name,\n v.vendor_code as vendor_code,\n c.vendor_id as vendor_id,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 최신 리비전 정보\n lri.latest_revision_id,\n lri.latest_revision,\n lri.latest_revision_status,\n lri.latest_revision_uploader_name,\n lri.latest_submitted_date,\n \n -- 전체 스테이지 (리비전 및 첨부파일 포함)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 기타\n COALESCE(ac.attachment_count, 0) as attachment_count,\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- ✅ contracts, projects, vendors 테이블 JOIN 추가\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN projects p ON c.project_id = p.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n LEFT JOIN document_stats ds ON d.id = ds.document_id\n LEFT JOIN current_stage_info csi ON d.id = csi.document_id\n LEFT JOIN latest_revision_info lri ON d.id = lri.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n LEFT JOIN attachment_counts ac ON d.id = ac.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "enhanced_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.simplified_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_move_gbn": {
+ "name": "drawing_move_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discipline": {
+ "name": "discipline",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_document_id": {
+ "name": "external_document_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_system_type": {
+ "name": "external_system_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_synced_at": {
+ "name": "external_synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_drawing_no": {
+ "name": "shi_drawing_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager": {
+ "name": "manager",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_enm": {
+ "name": "manager_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_no": {
+ "name": "manager_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group": {
+ "name": "register_group",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group_id": {
+ "name": "register_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_no": {
+ "name": "create_user_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_id": {
+ "name": "create_user_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_enm": {
+ "name": "create_user_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_id": {
+ "name": "first_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_name": {
+ "name": "first_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_plan_date": {
+ "name": "first_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_actual_date": {
+ "name": "first_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_id": {
+ "name": "second_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_name": {
+ "name": "second_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_plan_date": {
+ "name": "second_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_actual_date": {
+ "name": "second_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH \n -- 리비전별 첨부파일 집계\n revision_attachments AS (\n SELECT \n r.id as revision_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', da.id,\n 'revisionId', da.revision_id,\n 'fileName', da.file_name,\n 'filePath', da.file_path,\n 'fileSize', da.file_size,\n 'fileType', da.file_type,\n 'createdAt', da.created_at,\n 'updatedAt', da.updated_at\n ) ORDER BY da.created_at\n ) FILTER (WHERE da.id IS NOT NULL),\n '[]'::json\n ) as attachments\n FROM revisions r\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY r.id\n ),\n \n -- 스테이지별 리비전 집계 (첨부파일 포함)\n stage_revisions AS (\n SELECT \n ist.id as stage_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', r.id,\n 'issueStageId', r.issue_stage_id,\n 'revision', r.revision,\n 'uploaderType', r.uploader_type,\n 'uploaderId', r.uploader_id,\n 'uploaderName', r.uploader_name,\n 'comment', r.comment,\n 'usage', r.usage,\n 'usageType', r.usage_type,\n 'revisionStatus', r.revision_status,\n 'submittedDate', r.submitted_date,\n 'uploadedAt', r.uploaded_at,\n 'approvedDate', r.approved_date,\n 'reviewStartDate', r.review_start_date,\n 'rejectedDate', r.rejected_date,\n 'reviewerId', r.reviewer_id,\n 'reviewerName', r.reviewer_name,\n 'reviewComments', r.review_comments,\n 'createdAt', r.created_at,\n 'updatedAt', r.updated_at,\n 'attachments', COALESCE(ra.attachments, '[]'::json)\n ) ORDER BY r.created_at\n ) FILTER (WHERE r.id IS NOT NULL),\n '[]'::json\n ) as revisions\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN revision_attachments ra ON r.id = ra.revision_id\n GROUP BY ist.id\n ),\n \n -- 문서별 스테이지 집계 (리비전 포함)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'revisions', COALESCE(sr.revisions, '[]'::json)\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n LEFT JOIN stage_revisions sr ON ist.id = sr.stage_id\n GROUP BY ist.document_id\n ),\n \n -- 첫 번째 스테이지 정보 (drawingKind에 따라 다른 조건)\n first_stage_info AS (\n SELECT \n document_id,\n first_stage_id,\n first_stage_name,\n first_stage_plan_date,\n first_stage_actual_date\n FROM (\n SELECT \n ist.document_id,\n ist.id as first_stage_id,\n ist.stage_name as first_stage_name,\n ist.plan_date as first_stage_plan_date,\n ist.actual_date as first_stage_actual_date,\n ROW_NUMBER() OVER (PARTITION BY ist.document_id ORDER BY ist.stage_order ASC) as rn\n FROM issue_stages ist\n JOIN documents d ON ist.document_id = d.id\n WHERE \n (d.drawing_kind = 'B4' AND LOWER(ist.stage_name) LIKE '%pre%') OR\n (d.drawing_kind = 'B3' AND LOWER(ist.stage_name) LIKE '%approval%') OR\n (d.drawing_kind = 'B5' AND LOWER(ist.stage_name) LIKE '%first%')\n ) ranked\n WHERE rn = 1\n ),\n \n -- 두 번째 스테이지 정보 (drawingKind에 따라 다른 조건)\n second_stage_info AS (\n SELECT \n document_id,\n second_stage_id,\n second_stage_name,\n second_stage_plan_date,\n second_stage_actual_date\n FROM (\n SELECT \n ist.document_id,\n ist.id as second_stage_id,\n ist.stage_name as second_stage_name,\n ist.plan_date as second_stage_plan_date,\n ist.actual_date as second_stage_actual_date,\n ROW_NUMBER() OVER (PARTITION BY ist.document_id ORDER BY ist.stage_order ASC) as rn\n FROM issue_stages ist\n JOIN documents d ON ist.document_id = d.id\n WHERE \n (d.drawing_kind = 'B4' AND LOWER(ist.stage_name) LIKE '%work%') OR\n (d.drawing_kind = 'B3' AND LOWER(ist.stage_name) LIKE '%work%') OR\n (d.drawing_kind = 'B5' AND LOWER(ist.stage_name) LIKE '%second%')\n ) ranked\n WHERE rn = 1\n ),\n \n -- 첨부파일 수 집계\n attachment_counts AS (\n SELECT \n ist.document_id,\n COUNT(da.id) as attachment_count\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.project_id,\n d.vendor_id,\n d.doc_number,\n d.drawing_kind,\n d.drawing_move_gbn,\n d.discipline,\n d.vendor_doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n -- 외부 시스템 연동 정보\n d.external_document_id,\n d.external_system_type,\n d.external_synced_at,\n \n -- DOLCE 응답의 추가 정보들\n d.shi_drawing_no,\n d.manager,\n d.manager_enm,\n d.manager_no,\n d.register_group,\n d.register_group_id,\n \n -- 생성자 정보\n d.create_user_no,\n d.create_user_id,\n d.create_user_enm,\n \n -- 프로젝트 및 벤더 정보\n p.code as project_code,\n v.vendor_name,\n v.vendor_code,\n \n -- B4 전용 필드들\n d.c_gbn,\n d.d_gbn,\n d.degree_gbn,\n d.dept_gbn,\n d.s_gbn,\n d.j_gbn,\n \n -- 첫 번째 스테이지 정보\n fsi.first_stage_id,\n fsi.first_stage_name,\n fsi.first_stage_plan_date,\n fsi.first_stage_actual_date,\n \n -- 두 번째 스테이지 정보\n ssi.second_stage_id,\n ssi.second_stage_name,\n ssi.second_stage_plan_date,\n ssi.second_stage_actual_date,\n \n -- 전체 스테이지 (리비전 및 첨부파일 포함)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 기타\n COALESCE(ac.attachment_count, 0) as attachment_count,\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- projects, vendors 테이블 JOIN (projectId가 이제 documents에 직접 있음)\n LEFT JOIN projects p ON d.project_id = p.id AND p.type = 'ship'\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n -- 스테이지 정보 JOIN\n LEFT JOIN first_stage_info fsi ON d.id = fsi.document_id\n LEFT JOIN second_stage_info ssi ON d.id = ssi.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n LEFT JOIN attachment_counts ac ON d.id = ac.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "simplified_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.stage_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n sd.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM stage_documents sd\n LEFT JOIN stage_issue_stages ist ON sd.id = ist.document_id\n GROUP BY sd.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM stage_issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n -- 문서별 스테이지 집계 (리비전 제외)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'description', ist.description,\n 'notes', ist.notes,\n 'reminderDays', ist.reminder_days\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM stage_issue_stages ist\n GROUP BY ist.document_id\n )\n \n SELECT \n sd.id as document_id,\n sd.doc_number,\n sd.vendor_doc_number,\n sd.title,\n sd.status,\n sd.issued_date,\n \n -- 프로젝트 및 벤더 정보 (직접 참조로 간소화)\n sd.project_id,\n sd.contract_id,\n p.code as project_code,\n sd.vendor_id,\n v.vendor_name,\n v.vendor_code,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 전체 스테이지 (리비전 제외)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 메타 정보\n sd.created_at,\n sd.updated_at\n \n FROM stage_documents sd\n -- 간소화된 JOIN (vendors는 vendor_id로 직접 조인)\n LEFT JOIN projects p ON sd.project_id = p.id\n LEFT JOIN vendors v ON sd.vendor_id = v.id\n \n -- 스테이지 관련 정보 JOIN\n LEFT JOIN document_stats ds ON sd.id = ds.document_id\n LEFT JOIN current_stage_info csi ON sd.id = csi.document_id\n LEFT JOIN stage_aggregation sa ON sd.id = sa.document_id\n \n ORDER BY sd.created_at DESC\n",
+ "name": "stage_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.sync_status_view": {
+ "columns": {
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_changes": {
+ "name": "total_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pending_changes": {
+ "name": "pending_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "synced_changes": {
+ "name": "synced_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "failed_changes": {
+ "name": "failed_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_sync_at": {
+ "name": "last_sync_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "next_sync_at": {
+ "name": "next_sync_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_enabled": {
+ "name": "sync_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n WITH change_stats AS (\n SELECT \n cl.vendor_id,\n sc.target_system,\n COUNT(*) as total_changes,\n COUNT(CASE WHEN cl.is_synced = false AND cl.sync_attempts < sc.retry_max_attempts THEN 1 END) as pending_changes,\n COUNT(CASE WHEN cl.is_synced = true THEN 1 END) as synced_changes,\n COUNT(CASE WHEN cl.sync_attempts >= sc.retry_max_attempts AND cl.is_synced = false THEN 1 END) as failed_changes,\n MAX(cl.synced_at) as last_sync_at\n FROM change_logs cl\n CROSS JOIN sync_configs sc \n WHERE cl.vendor_id = sc.vendor_id\n AND (cl.target_systems IS NULL OR cl.target_systems @> to_jsonb(ARRAY[sc.target_system]))\n GROUP BY cl.vendor_id, sc.target_system\n )\n SELECT \n cs.vendor_id,\n cs.target_system,\n COALESCE(cs.total_changes, 0) as total_changes,\n COALESCE(cs.pending_changes, 0) as pending_changes,\n COALESCE(cs.synced_changes, 0) as synced_changes,\n COALESCE(cs.failed_changes, 0) as failed_changes,\n cs.last_sync_at,\n CASE \n WHEN sc.sync_enabled = true AND sc.last_successful_sync IS NOT NULL \n THEN sc.last_successful_sync + (sc.sync_interval_minutes || ' minutes')::interval\n ELSE NULL\n END as next_sync_at,\n sc.sync_enabled\n FROM sync_configs sc\n LEFT JOIN change_stats cs ON sc.vendor_id = cs.vendor_id AND sc.target_system = cs.target_system\n",
+ "name": "sync_status_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_documents_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latest_stage_id": {
+ "name": "latest_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_name": {
+ "name": "latest_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_plan_date": {
+ "name": "latest_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_actual_date": {
+ "name": "latest_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision": {
+ "name": "latest_revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_type": {
+ "name": "latest_revision_uploader_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_name": {
+ "name": "latest_revision_uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT \n d.id, \n d.doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n (SELECT id FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_id,\n (SELECT stage_name FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_name,\n (SELECT plan_date FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_plan_date,\n (SELECT actual_date FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_actual_date,\n \n (SELECT r.id FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_id,\n (SELECT r.revision FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision,\n (SELECT r.uploader_type FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_uploader_type,\n (SELECT r.uploader_name FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_uploader_name,\n \n (SELECT COUNT(*) FROM document_attachments a JOIN revisions r ON a.revision_id = r.id JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id) AS attachment_count,\n \n d.created_at,\n d.updated_at\n FROM documents d\n JOIN contracts c ON d.contract_id = c.id\n ",
+ "name": "vendor_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_candidates_with_vendor_info": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'COLLECTED'"
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendor_candidates\".\"id\", \"vendor_candidates\".\"company_name\", \"vendor_candidates\".\"contact_email\", \"vendor_candidates\".\"contact_phone\", \"vendor_candidates\".\"tax_id\", \"vendor_candidates\".\"address\", \"vendor_candidates\".\"country\", \"vendor_candidates\".\"source\", \"vendor_candidates\".\"status\", \"vendor_candidates\".\"items\", \"vendor_candidates\".\"remark\", \"vendor_candidates\".\"created_at\", \"vendor_candidates\".\"updated_at\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendors\".\"created_at\" as \"vendor_created_at\", (\n SELECT l2.\"created_at\"\n FROM \"vendor_candidate_logs\" l2\n WHERE l2.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l2.\"action\" = 'status_change'\n ORDER BY l2.\"created_at\" DESC\n LIMIT 1\n ) as \"last_status_change_at\", (\n SELECT u.\"name\"\n FROM \"users\" u\n JOIN \"vendor_candidate_logs\" l3\n ON l3.\"user_id\" = u.\"id\"\n WHERE l3.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l3.\"action\" = 'status_change'\n ORDER BY l3.\"created_at\" DESC\n LIMIT 1\n ) as \"last_status_change_by\", (\n SELECT l4.\"created_at\"\n FROM \"vendor_candidate_logs\" l4\n WHERE l4.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l4.\"action\" = 'invite_sent'\n ORDER BY l4.\"created_at\" DESC\n LIMIT 1\n ) as \"last_invitation_at\", (\n SELECT u2.\"name\"\n FROM \"users\" u2\n JOIN \"vendor_candidate_logs\" l5\n ON l5.\"user_id\" = u2.\"id\"\n WHERE l5.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l5.\"action\" = 'invite_sent'\n ORDER BY l5.\"created_at\" DESC\n LIMIT 1\n ) as \"last_invitation_by\" from \"vendor_candidates\" left join \"vendors\" on \"vendor_candidates\".\"vendor_id\" = \"vendors\".\"id\"",
+ "name": "vendor_candidates_with_vendor_info",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "business_size": {
+ "name": "business_size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corporate_registration_number": {
+ "name": "corporate_registration_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_agency": {
+ "name": "credit_agency",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_rating": {
+ "name": "credit_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cash_flow_rating": {
+ "name": "cash_flow_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"id\", \"vendor_name\", \"vendor_code\", \"tax_id\", \"address\", \"business_size\", \"country\", \"phone\", \"email\", \"website\", \"status\", \"representative_name\", \"representative_birth\", \"representative_email\", \"representative_phone\", \"corporate_registration_number\", \"credit_agency\", \"credit_rating\", \"cash_flow_rating\", \"created_at\", \"updated_at\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', c.id,\n 'contactName', c.contact_name,\n 'contactPosition', c.contact_position,\n 'contactEmail', c.contact_email,\n 'contactPhone', c.contact_phone,\n 'isPrimary', c.is_primary\n )\n ),\n '[]'::json\n )\n FROM vendor_contacts c\n WHERE c.vendor_id = vendors.id)\n as \"contacts\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', a.id,\n 'fileName', a.file_name,\n 'filePath', a.file_path,\n 'attachmentType', a.attachment_type,\n 'createdAt', a.created_at\n )\n ORDER BY a.attachment_type, a.created_at DESC\n ),\n '[]'::json\n )\n FROM vendor_attachments a\n WHERE a.vendor_id = vendors.id)\n as \"attachments\", \n (SELECT COUNT(*)\n FROM vendor_attachments a\n WHERE a.vendor_id = vendors.id)\n as \"attachment_count\", \n (SELECT COUNT(*) \n FROM vendor_contacts c\n WHERE c.vendor_id = vendors.id)\n as \"contact_count\" from \"vendors\"",
+ "name": "vendor_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_items_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"vendor_possible_items\".\"id\", \"vendor_possible_items\".\"vendor_id\", \"items\".\"item_name\", \"items\".\"item_code\", \"items\".\"description\", \"vendor_possible_items\".\"created_at\", \"vendor_possible_items\".\"updated_at\" from \"vendor_possible_items\" left join \"items\" on \"vendor_possible_items\".\"item_code\" = \"items\".\"item_code\"",
+ "name": "vendor_items_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_materials_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"vendor_possible_materials\".\"id\", \"vendor_possible_materials\".\"vendor_id\", \"materials\".\"item_name\", \"materials\".\"item_code\", \"materials\".\"description\", \"materials\".\"unit_of_measure\", \"materials\".\"steel_type\", \"materials\".\"grade_material\", \"vendor_possible_materials\".\"created_at\", \"vendor_possible_materials\".\"updated_at\" from \"vendor_possible_materials\" left join \"materials\" on \"vendor_possible_materials\".\"item_code\" = \"materials\".\"item_code\"",
+ "name": "vendor_materials_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendors_with_types": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"tax_id\" as \"tax_id\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"phone\" as \"phone\", \"vendors\".\"email\" as \"email\", \"vendors\".\"business_size\" as \"business_size\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"status\", \"vendors\".\"vendor_type_id\" as \"vendor_type_id\", \"vendors\".\"representative_name\" as \"representative_name\", \"vendors\".\"representative_birth\" as \"representative_birth\", \"vendors\".\"representative_email\" as \"representative_email\", \"vendors\".\"representative_phone\" as \"representative_phone\", \"vendors\".\"corporate_registration_number\" as \"corporate_registration_number\", \"vendors\".\"items\" as \"items\", \"vendors\".\"credit_agency\" as \"credit_agency\", \"vendors\".\"credit_rating\" as \"credit_rating\", \"vendors\".\"cash_flow_rating\" as \"cash_flow_rating\", \"vendors\".\"created_at\" as \"created_at\", \"vendors\".\"updated_at\" as \"updated_at\", \"vendor_types\".\"name_ko\" as \"vendor_type_name\", \"vendor_types\".\"name_en\" as \"vendor_type_name_en\", \"vendor_types\".\"code\" as \"vendor_type_code\", \n CASE\n WHEN \"vendors\".\"status\" = 'ACTIVE' THEN '정규업체'\n WHEN \"vendors\".\"status\" IN ('INACTIVE', 'BLACKLISTED', 'REJECTED') THEN ''\n ELSE '잠재업체'\n END\n as \"vendor_category\" from \"vendors\" left join \"vendor_types\" on \"vendors\".\"vendor_type_id\" = \"vendor_types\".\"id\"",
+ "name": "vendors_with_types",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.basic_contract_view": {
+ "columns": {},
+ "definition": "select \"basic_contract\".\"id\" as \"id\", \"basic_contract\".\"template_id\" as \"template_id\", \"basic_contract\".\"vendor_id\" as \"vendor_id\", \"basic_contract\".\"requested_by\" as \"requested_by\", \"basic_contract\".\"status\" as \"basic_contract_status\", \"basic_contract\".\"created_at\" as \"created_at\", \"basic_contract\".\"updated_at\" as \"updated_at\", \"basic_contract\".\"completed_at\" as \"completed_at\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"email\" as \"vendor_email\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"users\".\"name\" as \"requested_by_name\", \"basic_contract_templates\".\"template_name\" as \"template_name\", \"basic_contract_templates\".\"revision\" as \"template_revision\", \"basic_contract_templates\".\"status\" as \"template_status\", \"basic_contract_templates\".\"validity_period\" as \"validity_period\", \"basic_contract_templates\".\"legal_review_required\" as \"legal_review_required\", \"basic_contract_templates\".\"shipbuilding_applicable\" as \"shipbuilding_applicable\", \"basic_contract_templates\".\"wind_applicable\" as \"wind_applicable\", \"basic_contract_templates\".\"pc_applicable\" as \"pc_applicable\", \"basic_contract_templates\".\"nb_applicable\" as \"nb_applicable\", \"basic_contract_templates\".\"rc_applicable\" as \"rc_applicable\", \"basic_contract_templates\".\"gy_applicable\" as \"gy_applicable\", \"basic_contract_templates\".\"sys_applicable\" as \"sys_applicable\", \"basic_contract_templates\".\"infra_applicable\" as \"infra_applicable\", \"basic_contract_templates\".\"file_path\" as \"template_file_path\", \"basic_contract_templates\".\"file_name\" as \"template_file_name\", \"basic_contract\".\"file_path\" as \"signed_file_path\", \"basic_contract\".\"file_name\" as \"signed_file_name\", \"basic_contract_templates\".\"created_at\" as \"template_created_at\", \"basic_contract_templates\".\"created_by\" as \"template_created_by\", \"basic_contract_templates\".\"updated_at\" as \"template_updated_at\", \"basic_contract_templates\".\"updated_by\" as \"template_updated_by\", \"basic_contract_templates\".\"disposed_at\" as \"template_disposed_at\", \"basic_contract_templates\".\"restored_at\" as \"template_restored_at\" from \"basic_contract\" left join \"vendors\" on \"basic_contract\".\"vendor_id\" = \"vendors\".\"id\" left join \"users\" on \"basic_contract\".\"requested_by\" = \"users\".\"id\" left join \"basic_contract_templates\" on \"basic_contract\".\"template_id\" = \"basic_contract_templates\".\"id\"",
+ "name": "basic_contract_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.pr_items_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_item": {
+ "name": "rfq_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item": {
+ "name": "pr_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_no": {
+ "name": "pr_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_category": {
+ "name": "material_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "acc": {
+ "name": "acc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "size": {
+ "name": "size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gross_weight": {
+ "name": "gross_weight",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "gw_uom": {
+ "name": "gw_uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_no": {
+ "name": "spec_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_url": {
+ "name": "spec_url",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tracking_no": {
+ "name": "tracking_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_yn": {
+ "name": "major_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "project_def": {
+ "name": "project_def",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_sc": {
+ "name": "project_sc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_kl": {
+ "name": "project_kl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_lc": {
+ "name": "project_lc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_dl": {
+ "name": "project_dl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"pr_items\".\"id\", \"pr_items\".\"procurement_rfqs_id\", \"pr_items\".\"rfq_item\", \"pr_items\".\"pr_item\", \"pr_items\".\"pr_no\", \"pr_items\".\"material_code\", \"pr_items\".\"material_category\", \"pr_items\".\"acc\", \"pr_items\".\"material_description\", \"pr_items\".\"size\", \"pr_items\".\"delivery_date\", \"pr_items\".\"quantity\", \"pr_items\".\"uom\", \"pr_items\".\"gross_weight\", \"pr_items\".\"gw_uom\", \"pr_items\".\"spec_no\", \"pr_items\".\"spec_url\", \"pr_items\".\"tracking_no\", \"pr_items\".\"major_yn\", \"pr_items\".\"project_def\", \"pr_items\".\"project_sc\", \"pr_items\".\"project_kl\", \"pr_items\".\"project_lc\", \"pr_items\".\"project_dl\", \"pr_items\".\"remark\", \"procurement_rfqs\".\"rfq_code\", \"procurement_rfqs\".\"item_code\", \"procurement_rfqs\".\"item_name\" from \"pr_items\" left join \"procurement_rfqs\" on \"pr_items\".\"procurement_rfqs_id\" = \"procurement_rfqs\".\"id\"",
+ "name": "pr_items_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.procurement_rfq_details_view": {
+ "columns": {},
+ "definition": "select \"rfq_details\".\"id\" as \"detail_id\", \"rfqs\".\"id\" as \"rfq_id\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"rfqs\".\"item_code\" as \"item_code\", \"rfqs\".\"item_name\" as \"item_name\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"country\" as \"vendor_country\", \"rfq_details\".\"currency\" as \"currency\", \"payment_terms\".\"code\" as \"payment_terms_code\", \"payment_terms\".\"description\" as \"payment_terms_description\", \"incoterms\".\"code\" as \"incoterms_code\", \"incoterms\".\"description\" as \"incoterms_description\", \"rfq_details\".\"incoterms_detail\" as \"incoterms_detail\", \"rfq_details\".\"delivery_date\" as \"delivery_date\", \"rfq_details\".\"tax_code\" as \"tax_code\", \"rfq_details\".\"place_of_shipping\" as \"place_of_shipping\", \"rfq_details\".\"place_of_destination\" as \"place_of_destination\", \"rfq_details\".\"material_price_related_yn\" as \"material_price_related_yn\", \"updated_by_user\".\"name\" as \"updated_by_user_name\", \"rfq_details\".\"updated_at\" as \"updated_at\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"rfqs\".\"id\"\n ) as \"pr_items_count\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"rfqs\".\"id\" \n AND major_yn = true\n ) as \"major_items_count\", (\n SELECT COUNT(*) \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"comment_count\", (\n SELECT created_at \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"last_comment_date\", (\n SELECT created_at \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\" AND is_vendor_comment = true\n ORDER BY created_at DESC LIMIT 1\n ) as \"last_vendor_comment_date\", (\n SELECT COUNT(*) \n FROM procurement_rfq_attachments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"attachment_count\", (\n SELECT COUNT(*) > 0\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"has_quotation\", (\n SELECT status\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"quotation_status\", (\n SELECT total_price\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"quotation_total_price\", (\n SELECT quotation_version\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY quotation_version DESC LIMIT 1\n ) as \"quotation_version\", (\n SELECT COUNT(DISTINCT quotation_version)\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"quotation_version_count\", (\n SELECT created_at\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY quotation_version DESC LIMIT 1\n ) as \"last_quotation_date\" from \"procurement_rfq_details\" \"rfq_details\" left join \"procurement_rfqs\" \"rfqs\" on \"rfq_details\".\"procurement_rfqs_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendors\" on \"rfq_details\".\"vendors_id\" = \"vendors\".\"id\" left join \"payment_terms\" on \"rfq_details\".\"payment_terms_code\" = \"payment_terms\".\"code\" left join \"incoterms\" on \"rfq_details\".\"incoterms_code\" = \"incoterms\".\"code\" left join \"users\" \"updated_by_user\" on \"rfq_details\".\"updated_by\" = \"updated_by_user\".\"id\"",
+ "name": "procurement_rfq_details_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.procurement_rfqs_view": {
+ "columns": {},
+ "definition": "select \"procurement_rfqs\".\"id\" as \"id\", \"procurement_rfqs\".\"rfq_code\" as \"rfq_code\", \"procurement_rfqs\".\"series\" as \"series\", \"procurement_rfqs\".\"rfq_sealed_yn\" as \"rfq_sealed_yn\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"procurement_rfqs\".\"item_code\" as \"item_code\", \"procurement_rfqs\".\"item_name\" as \"item_name\", \"procurement_rfqs\".\"status\" as \"status\", \"procurement_rfqs\".\"pic_code\" as \"pic_code\", \"procurement_rfqs\".\"rfq_send_date\" as \"rfq_send_date\", \"procurement_rfqs\".\"due_date\" as \"due_date\", (\n SELECT MIN(submitted_at)\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"procurement_rfqs\".\"id\"\n AND submitted_at IS NOT NULL\n ) as \"earliest_quotation_submitted_at\", \"created_by_user\".\"name\" as \"created_by_user_name\", \"sent_by_user\".\"name\" as \"sent_by_user_name\", \"procurement_rfqs\".\"updated_at\" as \"updated_at\", \"updated_by_user\".\"name\" as \"updated_by_user_name\", \"procurement_rfqs\".\"remark\" as \"remark\", (\n SELECT material_code \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n AND major_yn = true\n LIMIT 1\n ) as \"major_item_material_code\", (\n SELECT pr_no \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n AND major_yn = true\n LIMIT 1\n ) as \"po_no\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n ) as \"pr_items_count\" from \"procurement_rfqs\" left join \"projects\" on \"procurement_rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" \"created_by_user\" on \"procurement_rfqs\".\"created_by\" = \"created_by_user\".\"id\" left join \"users\" \"updated_by_user\" on \"procurement_rfqs\".\"updated_by\" = \"updated_by_user\".\"id\" left join \"users\" \"sent_by_user\" on \"procurement_rfqs\".\"sent_by\" = \"sent_by_user\".\"id\"",
+ "name": "procurement_rfqs_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.attachment_revision_history": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_id": {
+ "name": "client_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_no": {
+ "name": "client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_name": {
+ "name": "client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_path": {
+ "name": "client_file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_size": {
+ "name": "client_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_comment": {
+ "name": "client_revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_created_at": {
+ "name": "client_revision_created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest_client_revision": {
+ "name": "is_latest_client_revision",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_vendor_responses": {
+ "name": "total_vendor_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_vendors": {
+ "name": "responded_vendors",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pending_vendors": {
+ "name": "pending_vendors",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n ba.id as attachment_id,\n ba.attachment_type,\n ba.serial_no,\n \n -- 발주처 리비전 정보\n rev.id as client_revision_id,\n rev.revision_no as client_revision_no,\n rev.original_file_name as client_file_name,\n rev.file_size as client_file_size,\n rev.file_path as client_file_path,\n rev.revision_comment as client_revision_comment,\n rev.created_at as client_revision_created_at,\n rev.is_latest as is_latest_client_revision,\n \n -- 벤더 응답 통계\n COALESCE(response_stats.total_responses, 0) as total_vendor_responses,\n COALESCE(response_stats.responded_count, 0) as responded_vendors,\n COALESCE(response_stats.pending_count, 0) as pending_vendors,\n COALESCE(response_stats.total_files, 0) as total_response_files\n \n FROM b_rfqs br\n JOIN b_rfq_attachments ba ON br.id = ba.rfq_id\n JOIN b_rfq_attachment_revisions rev ON ba.id = rev.attachment_id\n LEFT JOIN (\n SELECT \n var.attachment_id,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN var.response_status = 'NOT_RESPONDED' THEN 1 END) as pending_count,\n COUNT(vra.id) as total_files\n FROM vendor_attachment_responses var\n LEFT JOIN vendor_response_attachments_b vra ON var.id = vra.vendor_response_id\n GROUP BY var.attachment_id\n ) response_stats ON ba.id = response_stats.attachment_id\n \n ORDER BY ba.id, rev.created_at DESC\n",
+ "name": "attachment_revision_history",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.attachments_with_latest_revision": {
+ "columns": {
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_comment": {
+ "name": "revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n a.id as attachment_id,\n a.attachment_type,\n a.serial_no,\n a.rfq_id,\n a.description,\n a.current_revision,\n \n r.id as revision_id,\n r.file_name,\n r.original_file_name,\n r.file_path,\n r.file_size,\n r.file_type,\n r.revision_comment,\n \n a.created_by,\n u.name as created_by_name,\n a.created_at,\n a.updated_at\n FROM b_rfq_attachments a\n LEFT JOIN b_rfq_attachment_revisions r ON a.latest_revision_id = r.id\n LEFT JOIN users u ON a.created_by = u.id\n ",
+ "name": "attachments_with_latest_revision",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.b_rfqs_master": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_type": {
+ "name": "project_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.description,\n br.status,\n br.due_date,\n br.pic_code,\n br.pic_name,\n br.eng_pic_name,\n br.package_no,\n br.package_name,\n br.project_id,\n p.code as project_code,\n p.name as project_name,\n p.type as project_type,\n br.project_company,\n br.project_flag,\n br.project_site,\n COALESCE(att_count.total_attachments, 0) as total_attachments,\n br.created_at,\n br.updated_at\n FROM b_rfqs br\n LEFT JOIN projects p ON br.project_id = p.id\n LEFT JOIN (\n SELECT rfq_id, COUNT(*) as total_attachments\n FROM b_rfq_attachments\n GROUP BY rfq_id\n ) att_count ON br.id = att_count.rfq_id\n",
+ "name": "b_rfqs_master",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.final_rfq_detail": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_rfq_id": {
+ "name": "final_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_rfq_status": {
+ "name": "final_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_description": {
+ "name": "incoterms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_description": {
+ "name": "payment_terms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "firsttime_yn": {
+ "name": "firsttime_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_remark": {
+ "name": "vendor_remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n fr.id as final_rfq_id,\n fr.final_rfq_status,\n fr.vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n fr.due_date,\n fr.valid_date,\n fr.delivery_date,\n fr.incoterms_code,\n inc.description as incoterms_description,\n fr.payment_terms_code,\n pt.description as payment_terms_description,\n fr.currency,\n fr.tax_code,\n fr.place_of_shipping,\n fr.place_of_destination,\n fr.short_list,\n fr.return_yn,\n fr.cp_request_yn,\n fr.prject_gtc_yn,\n fr.firsttime_yn,\n fr.material_price_related_yn,\n fr.return_revision,\n fr.gtc,\n fr.gtc_valid_date,\n fr.classification,\n fr.sparepart,\n fr.remark,\n fr.vendor_remark,\n fr.created_at,\n fr.updated_at\n FROM b_rfqs br\n JOIN final_rfq fr ON br.id = fr.rfq_id\n LEFT JOIN vendors v ON fr.vendor_id = v.id\n LEFT JOIN incoterms inc ON fr.incoterms_code = inc.code\n LEFT JOIN payment_terms pt ON fr.payment_terms_code = pt.code\n",
+ "name": "final_rfq_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.initial_rfq_detail": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_rfq_id": {
+ "name": "initial_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_rfq_status": {
+ "name": "initial_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_category": {
+ "name": "vendor_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_description": {
+ "name": "incoterms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_revision": {
+ "name": "rfq_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n ir.id as initial_rfq_id,\n ir.initial_rfq_status,\n ir.vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n v.vendor_category as vendor_category,\n ir.due_date,\n ir.valid_date,\n ir.incoterms_code,\n inc.description as incoterms_description,\n ir.short_list,\n ir.return_yn,\n ir.cp_request_yn,\n ir.prject_gtc_yn,\n ir.return_revision,\n ir.rfq_revision,\n ir.gtc,\n ir.gtc_valid_date,\n ir.classification,\n ir.sparepart,\n ir.created_at,\n ir.updated_at\n FROM b_rfqs br\n JOIN initial_rfq ir ON br.id = ir.rfq_id\n LEFT JOIN vendors_with_types v ON ir.vendor_id = v.id\n LEFT JOIN incoterms inc ON ir.incoterms_code = inc.code\n",
+ "name": "initial_rfq_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfq_dashboard": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_vendor_count": {
+ "name": "initial_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_vendor_count": {
+ "name": "final_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_response_rate": {
+ "name": "initial_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_response_rate": {
+ "name": "final_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "overall_progress": {
+ "name": "overall_progress",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_to_deadline": {
+ "name": "days_to_deadline",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by_name": {
+ "name": "updated_by_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by_email": {
+ "name": "updated_by_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n -- ② SELECT 절 확장 -------------------------------------------\n SELECT\n br.id AS rfq_id,\n br.rfq_code,\n br.description,\n br.status,\n br.due_date,\n p.code AS project_code,\n p.name AS project_name,\n br.package_no,\n br.package_name,\n br.pic_code,\n br.pic_name,\n br.eng_pic_name,\n br.project_company,\n br.project_flag,\n br.project_site,\n br.remark,\n \n -- 첨부/벤더 요약 -----------------------\n COALESCE(att_count.total_attachments, 0) AS total_attachments,\n COALESCE(init_summary.vendor_count, 0) AS initial_vendor_count,\n COALESCE(final_summary.vendor_count, 0) AS final_vendor_count,\n COALESCE(init_summary.avg_response_rate, 0) AS initial_response_rate,\n COALESCE(final_summary.avg_response_rate, 0) AS final_response_rate,\n \n -- 진행률·마감까지 일수 --------------\n CASE \n WHEN br.status = 'DRAFT' THEN 0\n WHEN br.status = 'Doc. Received' THEN 10\n WHEN br.status = 'PIC Assigned' THEN 20\n WHEN br.status = 'Doc. Confirmed' THEN 30\n WHEN br.status = 'Init. RFQ Sent' THEN 40\n WHEN br.status = 'Init. RFQ Answered' THEN 50\n WHEN br.status = 'TBE started' THEN 60\n WHEN br.status = 'TBE finished' THEN 70\n WHEN br.status = 'Final RFQ Sent' THEN 80\n WHEN br.status = 'Quotation Received' THEN 90\n WHEN br.status = 'Vendor Selected' THEN 100\n ELSE 0\n END AS overall_progress,\n (br.due_date - CURRENT_DATE) AS days_to_deadline,\n \n br.created_at,\n br.updated_at,\n \n -- 💡 추가되는 컬럼 -------------------\n upd.name AS updated_by_name,\n upd.email AS updated_by_email\n FROM b_rfqs br\n LEFT JOIN projects p ON br.project_id = p.id\n \n -- ③ 사용자 정보 조인 --------------------\n LEFT JOIN users upd ON br.updated_by = upd.id\n \n -- (나머지 이미 있던 JOIN 들은 그대로) -----\n LEFT JOIN (\n SELECT rfq_id, COUNT(*) AS total_attachments\n FROM b_rfq_attachments\n GROUP BY rfq_id\n ) att_count ON br.id = att_count.rfq_id\n \n LEFT JOIN (\n SELECT \n rfq_id, \n COUNT(DISTINCT vendor_id) AS vendor_count,\n AVG(response_rate) AS avg_response_rate\n FROM vendor_response_summary\n WHERE rfq_type = 'INITIAL'\n GROUP BY rfq_id\n ) init_summary ON br.id = init_summary.rfq_id\n \n LEFT JOIN (\n SELECT \n rfq_id, \n COUNT(DISTINCT vendor_id) AS vendor_count,\n AVG(response_rate) AS avg_response_rate\n FROM vendor_response_summary\n WHERE rfq_type = 'FINAL'\n GROUP BY rfq_id\n ) final_summary ON br.id = final_summary.rfq_id\n ",
+ "name": "rfq_dashboard",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfq_progress_summary": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_to_deadline": {
+ "name": "days_to_deadline",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachments_with_multiple_revisions": {
+ "name": "attachments_with_multiple_revisions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_client_revisions": {
+ "name": "total_client_revisions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_vendor_count": {
+ "name": "initial_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_total_responses": {
+ "name": "initial_total_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_responded_count": {
+ "name": "initial_responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_up_to_date_count": {
+ "name": "initial_up_to_date_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_version_mismatch_count": {
+ "name": "initial_version_mismatch_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_response_rate": {
+ "name": "initial_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_version_match_rate": {
+ "name": "initial_version_match_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_vendor_count": {
+ "name": "final_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_total_responses": {
+ "name": "final_total_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_responded_count": {
+ "name": "final_responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_up_to_date_count": {
+ "name": "final_up_to_date_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_version_mismatch_count": {
+ "name": "final_version_mismatch_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_response_rate": {
+ "name": "final_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_version_match_rate": {
+ "name": "final_version_match_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n br.due_date,\n (br.due_date - CURRENT_DATE) as days_to_deadline,\n \n -- 첨부파일 통계\n attachment_stats.total_attachments,\n attachment_stats.attachments_with_multiple_revisions,\n attachment_stats.total_client_revisions,\n \n -- Initial RFQ 통계\n COALESCE(initial_stats.vendor_count, 0) as initial_vendor_count,\n COALESCE(initial_stats.total_responses, 0) as initial_total_responses,\n COALESCE(initial_stats.responded_count, 0) as initial_responded_count,\n COALESCE(initial_stats.up_to_date_count, 0) as initial_up_to_date_count,\n COALESCE(initial_stats.version_mismatch_count, 0) as initial_version_mismatch_count,\n COALESCE(initial_stats.response_rate, 0) as initial_response_rate,\n COALESCE(initial_stats.version_match_rate, 0) as initial_version_match_rate,\n \n -- Final RFQ 통계\n COALESCE(final_stats.vendor_count, 0) as final_vendor_count,\n COALESCE(final_stats.total_responses, 0) as final_total_responses,\n COALESCE(final_stats.responded_count, 0) as final_responded_count,\n COALESCE(final_stats.up_to_date_count, 0) as final_up_to_date_count,\n COALESCE(final_stats.version_mismatch_count, 0) as final_version_mismatch_count,\n COALESCE(final_stats.response_rate, 0) as final_response_rate,\n COALESCE(final_stats.version_match_rate, 0) as final_version_match_rate,\n \n COALESCE(file_stats.total_files, 0) as total_response_files\n \n FROM b_rfqs br\n LEFT JOIN (\n SELECT \n ba.rfq_id,\n COUNT(*) as total_attachments,\n COUNT(CASE WHEN rev_count.total_revisions > 1 THEN 1 END) as attachments_with_multiple_revisions,\n SUM(rev_count.total_revisions) as total_client_revisions\n FROM b_rfq_attachments ba\n LEFT JOIN (\n SELECT \n attachment_id,\n COUNT(*) as total_revisions\n FROM b_rfq_attachment_revisions\n GROUP BY attachment_id\n ) rev_count ON ba.id = rev_count.attachment_id\n GROUP BY ba.rfq_id\n ) attachment_stats ON br.id = attachment_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(DISTINCT var.vendor_id) as vendor_count,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) as up_to_date_count,\n COUNT(CASE WHEN vrd.effective_status = 'VERSION_MISMATCH' THEN 1 END) as version_mismatch_count,\n ROUND(\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(*), 0), 2\n ) as response_rate,\n ROUND(\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END), 0), 2\n ) as version_match_rate\n FROM b_rfqs br\n JOIN vendor_response_detail vrd ON br.id = vrd.rfq_id\n JOIN vendor_attachment_responses var ON vrd.response_id = var.id\n WHERE var.rfq_type = 'INITIAL'\n GROUP BY br.id\n ) initial_stats ON br.id = initial_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(DISTINCT var.vendor_id) as vendor_count,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) as up_to_date_count,\n COUNT(CASE WHEN vrd.effective_status = 'VERSION_MISMATCH' THEN 1 END) as version_mismatch_count,\n ROUND(\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(*), 0), 2\n ) as response_rate,\n ROUND(\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END), 0), 2\n ) as version_match_rate\n FROM b_rfqs br\n JOIN vendor_response_detail vrd ON br.id = vrd.rfq_id\n JOIN vendor_attachment_responses var ON vrd.response_id = var.id\n WHERE var.rfq_type = 'FINAL'\n GROUP BY br.id\n ) final_stats ON br.id = final_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(vra.id) as total_files\n FROM b_rfqs br\n JOIN b_rfq_attachments ba ON br.id = ba.rfq_id\n JOIN vendor_attachment_responses var ON ba.id = var.attachment_id\n LEFT JOIN vendor_response_attachments_b vra ON var.id = vra.vendor_response_id\n GROUP BY br.id\n ) file_stats ON br.id = file_stats.rfq_id\n",
+ "name": "rfq_progress_summary",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_attachments_enhanced": {
+ "columns": {
+ "response_attachment_id": {
+ "name": "response_attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_id": {
+ "name": "latest_client_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_no": {
+ "name": "latest_client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_name": {
+ "name": "latest_client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_version_matched": {
+ "name": "is_version_matched",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version_lag": {
+ "name": "version_lag",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "needs_update": {
+ "name": "needs_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_sequence": {
+ "name": "file_sequence",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest_response_file": {
+ "name": "is_latest_response_file",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n vra.id as response_attachment_id,\n vra.vendor_response_id,\n vra.file_name,\n vra.original_file_name,\n vra.file_path,\n vra.file_size,\n vra.file_type,\n vra.description,\n vra.uploaded_at,\n \n -- 응답 기본 정보\n var.attachment_id,\n var.vendor_id,\n var.rfq_type,\n var.rfq_record_id,\n var.response_status,\n var.current_revision,\n var.responded_revision,\n \n -- 코멘트 (새로 추가된 필드 포함)\n var.response_comment,\n var.vendor_comment,\n var.revision_request_comment,\n \n -- 날짜 (새로 추가된 필드 포함)\n var.requested_at,\n var.responded_at,\n var.revision_requested_at,\n \n -- 첨부파일 정보\n ba.attachment_type,\n ba.serial_no,\n ba.rfq_id,\n \n -- 벤더 정보\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n \n -- 발주처 현재 리비전 정보\n latest_rev.id as latest_client_revision_id,\n latest_rev.revision_no as latest_client_revision_no,\n latest_rev.original_file_name as latest_client_file_name,\n \n -- 리비전 비교\n CASE \n WHEN var.responded_revision = ba.current_revision THEN true \n ELSE false \n END as is_version_matched,\n \n -- 버전 차이 계산 (Rev.0, Rev.1 형태 가정)\n CASE \n WHEN var.responded_revision IS NULL THEN NULL\n WHEN ba.current_revision IS NULL THEN NULL\n ELSE CAST(SUBSTRING(ba.current_revision FROM '[0-9]+') AS INTEGER) - \n CAST(SUBSTRING(var.responded_revision FROM '[0-9]+') AS INTEGER)\n END as version_lag,\n \n CASE \n WHEN var.response_status = 'RESPONDED' \n AND var.responded_revision != ba.current_revision THEN true \n ELSE false \n END as needs_update,\n \n -- 파일 순서\n ROW_NUMBER() OVER (\n PARTITION BY var.id \n ORDER BY vra.uploaded_at DESC\n ) as file_sequence,\n \n -- 최신 응답 파일 여부\n CASE \n WHEN ROW_NUMBER() OVER (\n PARTITION BY var.id \n ORDER BY vra.uploaded_at DESC\n ) = 1 THEN true \n ELSE false \n END as is_latest_response_file\n \n FROM vendor_response_attachments_b vra\n JOIN vendor_attachment_responses var ON vra.vendor_response_id = var.id\n JOIN b_rfq_attachments ba ON var.attachment_id = ba.id\n LEFT JOIN vendors v ON var.vendor_id = v.id\n LEFT JOIN b_rfq_attachment_revisions latest_rev ON ba.latest_revision_id = latest_rev.id\n",
+ "name": "vendor_response_attachments_enhanced",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_detail": {
+ "columns": {
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_description": {
+ "name": "attachment_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_no": {
+ "name": "latest_client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_name": {
+ "name": "latest_client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_size": {
+ "name": "latest_client_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_comment": {
+ "name": "latest_client_revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_version_matched": {
+ "name": "is_version_matched",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version_lag": {
+ "name": "version_lag",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "needs_update": {
+ "name": "needs_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_multiple_revisions": {
+ "name": "has_multiple_revisions",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_file_name": {
+ "name": "latest_response_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_file_size": {
+ "name": "latest_response_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_uploaded_at": {
+ "name": "latest_response_uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "effective_status": {
+ "name": "effective_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n var.id as response_id,\n ba.rfq_id,\n br.rfq_code,\n var.rfq_type,\n var.rfq_record_id,\n \n -- 첨부파일 정보\n ba.id as attachment_id,\n ba.attachment_type,\n ba.serial_no,\n ba.description as attachment_description,\n \n -- 벤더 정보\n v.id as vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n \n -- 응답 상태\n var.response_status,\n var.current_revision,\n var.responded_revision,\n \n -- 코멘트 (새로 추가된 필드 포함)\n var.response_comment,\n var.vendor_comment,\n var.revision_request_comment,\n \n -- 날짜 (새로 추가된 필드 포함)\n var.requested_at,\n var.responded_at,\n var.revision_requested_at,\n \n -- 발주처 최신 리비전\n latest_rev.revision_no as latest_client_revision_no,\n latest_rev.original_file_name as latest_client_file_name,\n latest_rev.file_size as latest_client_file_size,\n latest_rev.revision_comment as latest_client_revision_comment,\n \n -- 리비전 분석\n CASE \n WHEN var.responded_revision = ba.current_revision THEN true \n ELSE false \n END as is_version_matched,\n \n CASE \n WHEN var.responded_revision IS NULL OR ba.current_revision IS NULL THEN NULL\n ELSE CAST(SUBSTRING(ba.current_revision FROM '[0-9]+') AS INTEGER) - \n CAST(SUBSTRING(var.responded_revision FROM '[0-9]+') AS INTEGER)\n END as version_lag,\n \n CASE \n WHEN var.response_status = 'RESPONDED' \n AND var.responded_revision != ba.current_revision THEN true \n ELSE false \n END as needs_update,\n \n CASE \n WHEN revision_count.total_revisions > 1 THEN true \n ELSE false \n END as has_multiple_revisions,\n \n -- 응답 파일 정보\n COALESCE(file_stats.total_files, 0) as total_response_files,\n file_stats.latest_file_name as latest_response_file_name,\n file_stats.latest_file_size as latest_response_file_size,\n file_stats.latest_uploaded_at as latest_response_uploaded_at,\n \n -- 효과적인 상태\n CASE \n WHEN var.response_status = 'NOT_RESPONDED' THEN 'NOT_RESPONDED'\n WHEN var.response_status = 'WAIVED' THEN 'WAIVED'\n WHEN var.response_status = 'REVISION_REQUESTED' THEN 'REVISION_REQUESTED'\n WHEN var.response_status = 'RESPONDED' AND var.responded_revision = ba.current_revision THEN 'UP_TO_DATE'\n WHEN var.response_status = 'RESPONDED' AND var.responded_revision != ba.current_revision THEN 'VERSION_MISMATCH'\n ELSE var.response_status\n END as effective_status\n \n FROM vendor_attachment_responses var\n JOIN b_rfq_attachments ba ON var.attachment_id = ba.id\n JOIN b_rfqs br ON ba.rfq_id = br.id\n LEFT JOIN vendors v ON var.vendor_id = v.id\n LEFT JOIN b_rfq_attachment_revisions latest_rev ON ba.latest_revision_id = latest_rev.id\n LEFT JOIN (\n SELECT \n attachment_id,\n COUNT(*) as total_revisions\n FROM b_rfq_attachment_revisions\n GROUP BY attachment_id\n ) revision_count ON ba.id = revision_count.attachment_id\n LEFT JOIN (\n SELECT \n vendor_response_id,\n COUNT(*) as total_files,\n MAX(original_file_name) as latest_file_name,\n MAX(file_size) as latest_file_size,\n MAX(uploaded_at) as latest_uploaded_at\n FROM vendor_response_attachments_b\n GROUP BY vendor_response_id\n ) file_stats ON var.id = file_stats.vendor_response_id\n",
+ "name": "vendor_response_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_summary": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_count": {
+ "name": "responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pending_count": {
+ "name": "pending_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "waived_count": {
+ "name": "waived_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_count": {
+ "name": "revision_requested_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_rate": {
+ "name": "response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completion_rate": {
+ "name": "completion_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n v.id as vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n var.rfq_type,\n COUNT(var.id) as total_attachments,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN var.response_status = 'NOT_RESPONDED' THEN 1 END) as pending_count,\n COUNT(CASE WHEN var.response_status = 'WAIVED' THEN 1 END) as waived_count,\n COUNT(CASE WHEN var.response_status = 'REVISION_REQUESTED' THEN 1 END) as revision_requested_count,\n ROUND(\n (COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status != 'WAIVED' THEN 1 END), 0)), \n 2\n ) as response_rate,\n ROUND(\n ((COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) + \n COUNT(CASE WHEN var.response_status = 'WAIVED' THEN 1 END)) * 100.0 / COUNT(var.id)), \n 2\n ) as completion_rate\n FROM b_rfqs br\n JOIN b_rfq_attachments bra ON br.id = bra.rfq_id\n JOIN vendor_attachment_responses var ON bra.id = var.attachment_id\n JOIN vendors v ON var.vendor_id = v.id\n GROUP BY br.id, br.rfq_code, br.status, v.id, v.vendor_code, v.vendor_name, v.country, v.business_size, var.rfq_type\n",
+ "name": "vendor_response_summary",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.tech_vendor_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_eng": {
+ "name": "country_eng",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_fab": {
+ "name": "country_fab",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_name": {
+ "name": "agent_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_phone": {
+ "name": "agent_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_email": {
+ "name": "agent_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "tech_vendor_type": {
+ "name": "tech_vendor_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"id\", \"vendor_name\", \"vendor_code\", \"tax_id\", \"address\", \"country\", \"country_eng\", \"country_fab\", \"agent_name\", \"agent_phone\", \"agent_email\", \"phone\", \"email\", \"website\", \"status\", \"tech_vendor_type\", \"representative_name\", \"representative_email\", \"representative_phone\", \"representative_birth\", \"created_at\", \"updated_at\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', c.id,\n 'contactName', c.contact_name,\n 'contactPosition', c.contact_position,\n 'contactTitle', c.contact_title,\n 'contactEmail', c.contact_email,\n 'contactPhone', c.contact_phone,\n 'isPrimary', c.is_primary\n )\n ),\n '[]'::json\n )\n FROM tech_vendor_contacts c\n WHERE c.vendor_id = tech_vendors.id)\n as \"contacts\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', a.id,\n 'fileName', a.file_name,\n 'filePath', a.file_path,\n 'attachmentType', a.attachment_type,\n 'createdAt', a.created_at\n )\n ORDER BY a.attachment_type, a.created_at DESC\n ),\n '[]'::json\n )\n FROM tech_vendor_attachments a\n WHERE a.vendor_id = tech_vendors.id)\n as \"attachments\", \n (SELECT COUNT(*)\n FROM tech_vendor_attachments a\n WHERE a.vendor_id = tech_vendors.id)\n as \"attachment_count\", \n (SELECT COUNT(*) \n FROM vendor_contacts c\n WHERE c.vendor_id = tech_vendors.id)\n as \"contact_count\", \n (SELECT COUNT(*) \n FROM tech_vendor_possible_items i\n WHERE i.vendor_id = tech_vendors.id)\n as \"item_count\" from \"tech_vendors\"",
+ "name": "tech_vendor_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.esg_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"esg_evaluations\".\"id\", \"esg_evaluations\".\"serial_number\", \"esg_evaluations\".\"category\", \"esg_evaluations\".\"inspection_item\", \"esg_evaluations\".\"is_active\", \"esg_evaluations\".\"created_at\", \"esg_evaluations\".\"updated_at\", count(distinct \"esg_evaluation_items\".\"id\") as \"total_evaluation_items\", count(\"esg_answer_options\".\"id\") as \"total_answer_options\", coalesce(sum(\"esg_answer_options\".\"score\"), 0) as \"max_possible_score\", \n (\n SELECT array_agg(evaluation_item order by order_index) \n FROM esg_evaluation_items \n WHERE esg_evaluation_id = \"esg_evaluations\".\"id\" \n AND is_active = true \n AND evaluation_item is not null\n )\n as \"evaluation_items_list\" from \"esg_evaluations\" left join \"esg_evaluation_items\" on \"esg_evaluations\".\"id\" = \"esg_evaluation_items\".\"esg_evaluation_id\" AND \"esg_evaluation_items\".\"is_active\" = true left join \"esg_answer_options\" on \"esg_evaluation_items\".\"id\" = \"esg_answer_options\".\"esg_evaluation_item_id\" AND \"esg_answer_options\".\"is_active\" = true group by \"esg_evaluations\".\"id\", \"esg_evaluations\".\"serial_number\", \"esg_evaluations\".\"category\", \"esg_evaluations\".\"inspection_item\", \"esg_evaluations\".\"is_active\", \"esg_evaluations\".\"created_at\", \"esg_evaluations\".\"updated_at\"",
+ "name": "esg_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.evaluation_targets_with_departments": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"evaluation_targets\".\"id\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"evaluation_targets\".\"status\", \"evaluation_targets\".\"consensus_status\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"confirmed_at\", \"evaluation_targets\".\"confirmed_by\", \"evaluation_targets\".\"ld_claim_count\", \"evaluation_targets\".\"ld_claim_amount\", \"evaluation_targets\".\"ld_claim_currency\", \"evaluation_targets\".\"created_at\", \"evaluation_targets\".\"updated_at\", order_reviewer.name as \"order_reviewer_name\", order_reviewer.email as \"order_reviewer_email\", order_etr.department_name_from as \"order_department_name\", order_review.is_approved as \"order_is_approved\", order_review.reviewed_at as \"order_reviewed_at\", procurement_reviewer.name as \"procurement_reviewer_name\", procurement_reviewer.email as \"procurement_reviewer_email\", procurement_etr.department_name_from as \"procurement_department_name\", procurement_review.is_approved as \"procurement_is_approved\", procurement_review.reviewed_at as \"procurement_reviewed_at\", quality_reviewer.name as \"quality_reviewer_name\", quality_reviewer.email as \"quality_reviewer_email\", quality_etr.department_name_from as \"quality_department_name\", quality_review.is_approved as \"quality_is_approved\", quality_review.reviewed_at as \"quality_reviewed_at\", design_reviewer.name as \"design_reviewer_name\", design_reviewer.email as \"design_reviewer_email\", design_etr.department_name_from as \"design_department_name\", design_review.is_approved as \"design_is_approved\", design_review.reviewed_at as \"design_reviewed_at\", cs_reviewer.name as \"cs_reviewer_name\", cs_reviewer.email as \"cs_reviewer_email\", cs_etr.department_name_from as \"cs_department_name\", cs_review.is_approved as \"cs_is_approved\", cs_review.reviewed_at as \"cs_reviewed_at\" from \"evaluation_targets\" left join evaluation_target_reviewers order_etr on \"evaluation_targets\".\"id\" = order_etr.evaluation_target_id AND order_etr.department_code = 'ORDER_EVAL' left join users order_reviewer on order_etr.reviewer_user_id = order_reviewer.id left join evaluation_target_reviews order_review on \"evaluation_targets\".\"id\" = order_review.evaluation_target_id \n AND order_review.reviewer_user_id = order_reviewer.id \n AND order_review.department_code = 'ORDER_EVAL' left join evaluation_target_reviewers procurement_etr on \"evaluation_targets\".\"id\" = procurement_etr.evaluation_target_id AND procurement_etr.department_code = 'PROCUREMENT_EVAL' left join users procurement_reviewer on procurement_etr.reviewer_user_id = procurement_reviewer.id left join evaluation_target_reviews procurement_review on \"evaluation_targets\".\"id\" = procurement_review.evaluation_target_id \n AND procurement_review.reviewer_user_id = procurement_reviewer.id \n AND procurement_review.department_code = 'PROCUREMENT_EVAL' left join evaluation_target_reviewers quality_etr on \"evaluation_targets\".\"id\" = quality_etr.evaluation_target_id AND quality_etr.department_code = 'QUALITY_EVAL' left join users quality_reviewer on quality_etr.reviewer_user_id = quality_reviewer.id left join evaluation_target_reviews quality_review on \"evaluation_targets\".\"id\" = quality_review.evaluation_target_id \n AND quality_review.reviewer_user_id = quality_reviewer.id \n AND quality_review.department_code = 'QUALITY_EVAL' left join evaluation_target_reviewers design_etr on \"evaluation_targets\".\"id\" = design_etr.evaluation_target_id AND design_etr.department_code = 'DESIGN_EVAL' left join users design_reviewer on design_etr.reviewer_user_id = design_reviewer.id left join evaluation_target_reviews design_review on \"evaluation_targets\".\"id\" = design_review.evaluation_target_id \n AND design_review.reviewer_user_id = design_reviewer.id \n AND design_review.department_code = 'DESIGN_EVAL' left join evaluation_target_reviewers cs_etr on \"evaluation_targets\".\"id\" = cs_etr.evaluation_target_id AND cs_etr.department_code = 'CS_EVAL' left join users cs_reviewer on cs_etr.reviewer_user_id = cs_reviewer.id left join evaluation_target_reviews cs_review on \"evaluation_targets\".\"id\" = cs_review.evaluation_target_id \n AND cs_review.reviewer_user_id = cs_reviewer.id \n AND cs_review.department_code = 'CS_EVAL'",
+ "name": "evaluation_targets_with_departments",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.periodic_evaluations_aggregated_view": {
+ "columns": {
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select CONCAT(\"evaluation_year\", '_', \"vendor_id\") as \"id\", \"evaluation_year\", \"vendor_id\", \"vendor_code\", \"vendor_name\", \"domestic_foreign\", \"material_type\", ROUND(AVG(NULLIF(\"process_score\", 0)), 1) as \"process_score\", ROUND(AVG(NULLIF(\"price_score\", 0)), 1) as \"price_score\", ROUND(AVG(NULLIF(\"delivery_score\", 0)), 1) as \"delivery_score\", ROUND(AVG(NULLIF(\"self_evaluation_score\", 0)), 1) as \"self_evaluation_score\", ROUND(AVG(NULLIF(\"participation_bonus\", 0)), 1) as \"participation_bonus\", ROUND(AVG(NULLIF(\"quality_deduction\", 0)), 1) as \"quality_deduction\", ROUND(AVG(NULLIF(\"final_score\", 0)), 1) as \"final_score\", \n CASE \n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 90 THEN 'S'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 80 THEN 'A'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 70 THEN 'B'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 60 THEN 'C'\n ELSE 'D'\n END\n as \"evaluation_grade\", \n CASE \n WHEN AVG(NULLIF(\"final_score\", 0)) >= 90 THEN 'S'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 80 THEN 'A'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 70 THEN 'B'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 60 THEN 'C'\n ELSE 'D'\n END\n as \"final_grade\", \n CASE \n WHEN COUNT(CASE WHEN \"status\" = 'FINALIZED' THEN 1 END) = COUNT(*) THEN 'FINALIZED'\n WHEN COUNT(CASE WHEN \"status\" IN ('REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) = COUNT(*) THEN 'REVIEW_COMPLETED'\n WHEN COUNT(CASE WHEN \"status\" IN ('IN_REVIEW', 'REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) > 0 THEN 'IN_REVIEW'\n WHEN COUNT(CASE WHEN \"status\" IN ('SUBMITTED', 'IN_REVIEW', 'REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) > 0 THEN 'SUBMITTED'\n ELSE 'PENDING_SUBMISSION'\n END\n as \"status\", \n CASE \n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"order_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"procurement_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"quality_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"design_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"cs_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"admin_eval_status\", \n BOOL_AND(\"documents_submitted\")\n as \"documents_submitted\", MAX(\"submission_date\") as \"submission_date\", MAX(\"submission_deadline\") as \"submission_deadline\", MAX(\"review_completed_at\") as \"review_completed_at\", MAX(\"finalized_at\") as \"finalized_at\", \n CASE \n WHEN COUNT(DISTINCT \"division\") > 1 THEN 'BOTH'\n ELSE MAX(\"division\")\n END\n as \"division\", COUNT(*)::int as \"evaluation_count\", STRING_AGG(DISTINCT \"division\", ',') as \"divisions\", SUM(\"total_reviewers\")::int as \"total_reviewers\", SUM(\"completed_reviewers\")::int as \"completed_reviewers\", SUM(\"pending_reviewers\")::int as \"pending_reviewers\", MAX(\"evaluation_period\") as \"evaluation_period\", STRING_AGG(\"evaluation_note\", ' | ') as \"evaluation_note\", (ARRAY_AGG(\"periodic_evaluations_view\".\"finalized_by\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by\", (ARRAY_AGG(\"periodic_evaluations_view\".\"name\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by_user_name\", (ARRAY_AGG(\"periodic_evaluations_view\".\"email\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by_user_email\", MIN(\"created_at\") as \"created_at\", MAX(\"updated_at\") as \"updated_at\", (ARRAY_AGG(\"periodic_evaluations_view\".\"evaluation_target_id\"))[1] as \"evaluation_target_id\", \n STRING_AGG(DISTINCT \"admin_comment\", ' | ')\n as \"evaluation_target_admin_comment\", \n STRING_AGG(DISTINCT \"consolidated_comment\", ' | ')\n as \"evaluation_target_consolidated_comment\", (ARRAY_AGG(\"periodic_evaluations_view\".\"consensus_status\" ORDER BY \"periodic_evaluations_view\".\"updated_at\" DESC NULLS LAST))[1] as \"evaluation_target_consensus_status\", \n MAX(\"confirmed_at\")\n as \"evaluation_target_confirmed_at\" from \"periodic_evaluations_view\" group by \"periodic_evaluations_view\".\"evaluation_year\", \"periodic_evaluations_view\".\"vendor_id\", \"periodic_evaluations_view\".\"vendor_code\", \"periodic_evaluations_view\".\"vendor_name\", \"periodic_evaluations_view\".\"domestic_foreign\", \"periodic_evaluations_view\".\"material_type\"",
+ "name": "periodic_evaluations_aggregated_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.periodic_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"periodic_evaluations\".\"id\", \"periodic_evaluations\".\"evaluation_target_id\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_id\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"periodic_evaluations\".\"evaluation_period\", \"periodic_evaluations\".\"documents_submitted\", \"periodic_evaluations\".\"submission_date\", \"periodic_evaluations\".\"submission_deadline\", \"periodic_evaluations\".\"final_score\", \"periodic_evaluations\".\"final_grade\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'processScore'\n AND re.is_completed = true\n ) as \"process_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'priceScore'\n AND re.is_completed = true\n ) as \"price_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'deliveryScore'\n AND re.is_completed = true\n ) as \"delivery_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'selfEvaluationScore'\n AND re.is_completed = true\n ) as \"self_evaluation_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'bonus'\n AND re.is_completed = true\n ) as \"participation_bonus\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'penalty'\n AND re.is_completed = true\n ) as \"quality_deduction\", \"periodic_evaluations\".\"status\", \"periodic_evaluations\".\"review_completed_at\", \"periodic_evaluations\".\"finalized_at\", \"periodic_evaluations\".\"finalized_by\", \"periodic_evaluations\".\"evaluation_note\", \"periodic_evaluations\".\"created_at\", \"periodic_evaluations\".\"updated_at\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"consensus_status\", \"evaluation_targets\".\"confirmed_at\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'ORDER_EVAL'\n LIMIT 1\n ) as \"order_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'PROCUREMENT_EVAL'\n LIMIT 1\n ) as \"procurement_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'QUALITY_EVAL'\n LIMIT 1\n ) as \"quality_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'DESIGN_EVAL'\n LIMIT 1\n ) as \"design_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'CS_EVAL'\n LIMIT 1\n ) as \"cs_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'admin'\n LIMIT 1\n ) as \"admin_eval_status\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n ) as \"total_reviewers\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND re.is_completed = true\n ) as \"completed_reviewers\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND re.is_completed = false\n ) as \"pending_reviewers\", \"users\".\"name\", \"users\".\"email\" from \"periodic_evaluations\" left join \"evaluation_targets\" on \"periodic_evaluations\".\"evaluation_target_id\" = \"evaluation_targets\".\"id\" left join \"users\" on \"periodic_evaluations\".\"finalized_by\" = \"users\".\"id\" order by \"periodic_evaluations\".\"created_at\"",
+ "name": "periodic_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.reviewer_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_target_reviewer_id": {
+ "name": "evaluation_target_reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_completed": {
+ "name": "is_completed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_grade": {
+ "name": "evaluation_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name_from": {
+ "name": "department_name_from",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "assigned_by": {
+ "name": "assigned_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"reviewer_evaluations\".\"id\", \"reviewer_evaluations\".\"periodic_evaluation_id\", \"reviewer_evaluations\".\"evaluation_target_reviewer_id\", \"reviewer_evaluations\".\"is_completed\", \"reviewer_evaluations\".\"completed_at\", \"reviewer_evaluations\".\"reviewer_comment\", \"reviewer_evaluations\".\"created_at\", \"reviewer_evaluations\".\"updated_at\", \"periodic_evaluations\".\"evaluation_period\", \"reviewer_evaluations\".\"submitted_at\", \"periodic_evaluations\".\"documents_submitted\", \"periodic_evaluations\".\"submission_date\", \"periodic_evaluations\".\"submission_deadline\", \"periodic_evaluations\".\"final_score\", \"periodic_evaluations\".\"final_grade\", \"periodic_evaluations\".\"evaluation_score\", \"periodic_evaluations\".\"evaluation_grade\", \"periodic_evaluations\".\"status\", \"periodic_evaluations\".\"review_completed_at\", \"periodic_evaluations\".\"finalized_at\", \"periodic_evaluations\".\"finalized_by\", \"periodic_evaluations\".\"evaluation_note\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_id\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"confirmed_at\", \"evaluation_targets\".\"confirmed_by\", \"evaluation_targets\".\"ld_claim_count\", \"evaluation_targets\".\"ld_claim_amount\", \"evaluation_targets\".\"ld_claim_currency\", \"evaluation_target_reviewers\".\"department_code\", \"evaluation_target_reviewers\".\"department_name_from\", \"evaluation_target_reviewers\".\"reviewer_user_id\", reviewer_user.name as \"reviewer_name\", reviewer_user.email as \"reviewer_email\", \"evaluation_target_reviewers\".\"assigned_at\", \"evaluation_target_reviewers\".\"assigned_by\", assigned_by_user.name as \"assigned_by_user_name\", finalized_by_user.name as \"finalized_by_user_name\", finalized_by_user.email as \"finalized_by_user_email\", \n CASE \n WHEN \"reviewer_evaluations\".\"is_completed\" = true THEN 'COMPLETED'\n ELSE 'NOT_STARTED'\n END\n as \"evaluation_progress\" from \"reviewer_evaluations\" left join \"periodic_evaluations\" on \"reviewer_evaluations\".\"periodic_evaluation_id\" = \"periodic_evaluations\".\"id\" left join \"evaluation_targets\" on \"periodic_evaluations\".\"evaluation_target_id\" = \"evaluation_targets\".\"id\" left join \"evaluation_target_reviewers\" on \"reviewer_evaluations\".\"evaluation_target_reviewer_id\" = \"evaluation_target_reviewers\".\"id\" left join users reviewer_user on \"evaluation_target_reviewers\".\"reviewer_user_id\" = reviewer_user.id left join users assigned_by_user on \"evaluation_target_reviewers\".\"assigned_by\" = assigned_by_user.id left join users finalized_by_user on \"periodic_evaluations\".\"finalized_by\" = finalized_by_user.id order by \"reviewer_evaluations\".\"is_completed\" ASC, \"reviewer_evaluations\".\"updated_at\" DESC",
+ "name": "reviewer_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.reg_eval_criteria_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "category2": {
+ "name": "category2",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'processScore'"
+ },
+ "item": {
+ "name": "item",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "range": {
+ "name": "range",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score_equip_ship": {
+ "name": "score_equip_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_equip_marine": {
+ "name": "score_equip_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_ship": {
+ "name": "score_bulk_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_marine": {
+ "name": "score_bulk_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"reg_eval_criteria_details\".\"id\", \"reg_eval_criteria_details\".\"criteria_id\", \"reg_eval_criteria\".\"category\", \"reg_eval_criteria\".\"category2\", \"reg_eval_criteria\".\"item\", \"reg_eval_criteria\".\"classification\", \"reg_eval_criteria\".\"range\", \"reg_eval_criteria_details\".\"detail\", \"reg_eval_criteria_details\".\"order_index\", \"reg_eval_criteria_details\".\"score_equip_ship\", \"reg_eval_criteria_details\".\"score_equip_marine\", \"reg_eval_criteria_details\".\"score_bulk_ship\", \"reg_eval_criteria_details\".\"score_bulk_marine\", \"reg_eval_criteria\".\"remarks\" from \"reg_eval_criteria\" left join \"reg_eval_criteria_details\" on \"reg_eval_criteria\".\"id\" = \"reg_eval_criteria_details\".\"criteria_id\" order by \"reg_eval_criteria\".\"id\", \"reg_eval_criteria_details\".\"order_index\"",
+ "name": "reg_eval_criteria_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.project_gtc_view": {
+ "columns": {},
+ "definition": "select \"projects\".\"id\" as \"id\", \"projects\".\"code\" as \"code\", \"projects\".\"name\" as \"name\", \"projects\".\"type\" as \"type\", \"projects\".\"created_at\" as \"project_created_at\", \"projects\".\"updated_at\" as \"project_updated_at\", \"project_gtc_files\".\"id\" as \"gtc_file_id\", \"project_gtc_files\".\"file_name\" as \"fileName\", \"project_gtc_files\".\"file_path\" as \"filePath\", \"project_gtc_files\".\"original_file_name\" as \"originalFileName\", \"project_gtc_files\".\"file_size\" as \"fileSize\", \"project_gtc_files\".\"mime_type\" as \"mimeType\", \"project_gtc_files\".\"created_at\" as \"gtcCreatedAt\", \"project_gtc_files\".\"updated_at\" as \"gtcUpdatedAt\" from \"projects\" left join \"project_gtc_files\" on \"projects\".\"id\" = \"project_gtc_files\".\"project_id\"",
+ "name": "project_gtc_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_answer_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "qna_id": {
+ "name": "qna_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"qna_answer\".\"id\", \"qna_answer\".\"qna_id\", \"qna_answer\".\"content\", \"qna_answer\".\"author\", \"qna_answer\".\"created_at\" as \"created_at\", \"qna_answer\".\"updated_at\" as \"updated_at\", \"qna_answer\".\"is_deleted\" as \"is_deleted\", \"qna_answer\".\"deleted_at\" as \"deleted_at\", \"qna\".\"title\" as \"question_title\", \"qna\".\"category\" as \"question_category\", \"qna\".\"author\" as \"question_author\", \"qna\".\"created_at\" as \"question_created_at\", \"users\".\"name\" as \"author_name\", \"users\".\"email\" as \"author_email\", \"users\".\"domain\" as \"author_domain\", \"users\".\"phone\" as \"author_phone\", \"users\".\"image_url\" as \"author_image_url\", \"users\".\"language\" as \"author_language\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", \"tech_vendors\".\"vendor_code\" as \"tech_vendor_code\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", COALESCE(\"vendors\".\"vendor_code\", \"tech_vendors\".\"vendor_code\") as \"company_code\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"total_comments\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"comment_count\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.parent_comment_id IS NULL\n AND qc.is_deleted = false\n ) as \"parent_comments_count\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.parent_comment_id IS NOT NULL\n AND qc.is_deleted = false\n ) as \"child_comments_count\", (\n SELECT MAX(qc.created_at)\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"last_commented_at\", (\n SELECT ROW_NUMBER() OVER (\n PARTITION BY qa2.qna_id \n ORDER BY qa2.created_at ASC\n )\n FROM \"qna_answer\" qa2\n WHERE qa2.id = \"qna_answer\".\"id\"\n AND qa2.is_deleted = false\n ) as \"answer_order\", (\n \"qna_answer\".\"id\" = (\n SELECT qa2.id\n FROM \"qna_answer\" qa2\n WHERE qa2.qna_id = \"qna_answer\".\"qna_id\"\n AND qa2.is_deleted = false\n ORDER BY qa2.created_at ASC\n LIMIT 1\n )\n ) as \"is_first_answer\", (\n \"qna_answer\".\"id\" = (\n SELECT qa2.id\n FROM \"qna_answer\" qa2\n WHERE qa2.qna_id = \"qna_answer\".\"qna_id\"\n AND qa2.is_deleted = false\n ORDER BY qa2.created_at DESC\n LIMIT 1\n )\n ) as \"is_latest_answer\" from \"qna_answer\" left join \"qna\" on \"qna_answer\".\"qna_id\" = \"qna\".\"id\" left join \"users\" on \"qna_answer\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna_answer\".\"is_deleted\" = false order by \"qna_answer\".\"created_at\"",
+ "name": "qna_answer_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_comment_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_id": {
+ "name": "answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"qna_comments\".\"id\", \"qna_comments\".\"content\", \"qna_comments\".\"author\", \"qna_comments\".\"answer_id\", \"qna_comments\".\"parent_comment_id\", \"qna_comments\".\"created_at\" as \"created_at\", \"qna_comments\".\"updated_at\" as \"updated_at\", \"qna_comments\".\"is_deleted\" as \"is_deleted\", \"qna_comments\".\"deleted_at\" as \"deleted_at\", \"qna_answer\".\"content\" as \"answer_content\", \"qna_answer\".\"author\" as \"answer_author\", \"qna_answer\".\"created_at\" as \"answer_created_at\", \"qna_answer\".\"qna_id\" as \"qna_id\", \"qna\".\"title\" as \"question_title\", \"qna\".\"category\" as \"question_category\", \"qna\".\"author\" as \"question_author\", \"users\".\"name\" as \"author_name\", \"users\".\"email\" as \"author_email\", \"users\".\"domain\" as \"author_domain\", \"users\".\"image_url\" as \"author_image_url\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", \"qna_comments\".\"parent_comment_id\" IS NULL as \"is_parent_comment\", \"qna_comments\".\"parent_comment_id\" IS NOT NULL as \"is_child_comment\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc2\n WHERE qc2.parent_comment_id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"child_comments_count\", (\n SELECT COUNT(*) > 0\n FROM \"qna_comments\" qc2\n WHERE qc2.parent_comment_id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"has_child_comments\", \n CASE \n WHEN \"qna_comments\".\"parent_comment_id\" IS NULL THEN 0\n ELSE 1\n END\n as \"comment_depth\", (\n SELECT ROW_NUMBER() OVER (\n PARTITION BY qc2.answer_id, qc2.parent_comment_id\n ORDER BY qc2.created_at ASC\n )\n FROM \"qna_comments\" qc2\n WHERE qc2.id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"comment_order\" from \"qna_comments\" left join \"qna_answer\" on \"qna_comments\".\"answer_id\" = \"qna_answer\".\"id\" left join \"qna\" on \"qna_answer\".\"qna_id\" = \"qna\".\"id\" left join \"users\" on \"qna_comments\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna_comments\".\"is_deleted\" = false order by \"qna_comments\".\"created_at\"",
+ "name": "qna_comment_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "qna_category",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'partners'"
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'en'"
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "last_login_at": {
+ "name": "last_login_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"qna\".\"id\", \"qna\".\"title\", \"qna\".\"content\", \"qna\".\"author\", \"qna\".\"category\", \"qna\".\"created_at\", \"qna\".\"updated_at\", \"qna\".\"is_deleted\", \"qna\".\"deleted_at\", \"users\".\"name\", \"users\".\"email\", \"users\".\"domain\", \"users\".\"phone\", \"users\".\"image_url\", \"users\".\"language\", \"users\".\"is_active\", \"users\".\"last_login_at\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"status\" as \"vendor_status\", \"vendors\".\"country\" as \"vendor_country\", \"vendors\".\"business_size\" as \"vendor_business_size\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", \"tech_vendors\".\"vendor_code\" as \"tech_vendor_code\", \"tech_vendors\".\"status\" as \"tech_vendor_status\", \"tech_vendors\".\"country\" as \"tech_vendor_country\", \"tech_vendors\".\"tech_vendor_type\" as \"tech_vendor_type\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", COALESCE(\"vendors\".\"vendor_code\", \"tech_vendors\".\"vendor_code\") as \"company_code\", COALESCE(\"vendors\".\"country\", \"tech_vendors\".\"country\") as \"company_country\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", (\n SELECT COUNT(*)::int\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"total_answers\", (\n SELECT COUNT(*)::int\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"answer_count\", (\n SELECT MAX(qa.created_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"last_answered_at\", (\n SELECT MIN(qa.created_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"first_answered_at\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qc.is_deleted = false\n AND qa.is_deleted = false\n ) as \"total_comments\", (\n SELECT GREATEST(\n \"qna\".\"updated_at\",\n COALESCE((\n SELECT MAX(qa.updated_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ), \"qna\".\"updated_at\"),\n COALESCE((\n SELECT MAX(qc.updated_at)\n FROM \"qna_comments\" qc\n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qc.is_deleted = false\n AND qa.is_deleted = false\n ), \"qna\".\"updated_at\")\n )\n ) as \"last_activity_at\", (\n SELECT COUNT(*) > 0\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"has_answers\", (\n SELECT COUNT(*) > 0\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"is_answered\", (\n (SELECT COUNT(*) FROM \"qna_answer\" qa WHERE qa.qna_id = \"qna\".\"id\" AND qa.is_deleted = false) >= 3\n OR\n (SELECT COUNT(*) FROM \"qna_comments\" qc \n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id \n WHERE qa.qna_id = \"qna\".\"id\" AND qc.is_deleted = false AND qa.is_deleted = false) >= 5\n ) as \"is_popular\" from \"qna\" left join \"users\" on \"qna\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna\".\"is_deleted\" = false order by \"qna\".\"created_at\"",
+ "name": "qna_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.template_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sample_data": {
+ "name": "sample_data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_email": {
+ "name": "created_by_email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variables": {
+ "name": "variables",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.content,\n t.description,\n t.category,\n t.sample_data,\n t.is_active,\n t.version,\n t.created_by,\n u.name AS created_by_name,\n u.email AS created_by_email,\n t.created_at,\n t.updated_at,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', v.id,\n 'variableName', v.variable_name,\n 'variableType', v.variable_type,\n 'defaultValue', v.default_value,\n 'isRequired', v.is_required,\n 'description', v.description,\n 'displayOrder', v.display_order\n ) ORDER BY v.display_order\n ) FILTER (WHERE v.id IS NOT NULL),\n '[]'::json\n ) AS variables\n FROM \"templates\" t\n LEFT JOIN \"users\" u ON t.created_by = u.id\n LEFT JOIN \"template_variables\" v ON t.id = v.template_id\n GROUP BY\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.content,\n t.description,\n t.category,\n t.sample_data,\n t.is_active,\n t.version,\n t.created_by,\n u.name,\n u.email,\n t.created_at,\n t.updated_at\n",
+ "name": "template_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.template_list_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_email": {
+ "name": "created_by_email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_count": {
+ "name": "variable_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "required_variable_count": {
+ "name": "required_variable_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.description,\n t.category,\n t.is_active,\n t.version,\n t.created_by,\n u.name AS created_by_name,\n u.email AS created_by_email,\n t.created_at,\n t.updated_at,\n COALESCE(v.variable_count, 0) AS variable_count,\n COALESCE(v.required_variable_count, 0) AS required_variable_count\n FROM \"templates\" t\n LEFT JOIN \"users\" u ON t.created_by = u.id\n LEFT JOIN (\n SELECT\n template_id,\n COUNT(*) AS variable_count,\n COUNT(*) FILTER (WHERE is_required) AS required_variable_count\n FROM \"template_variables\"\n GROUP BY template_id\n ) v ON t.id = v.template_id\n",
+ "name": "template_list_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_clauses_tree_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"gtc_clauses\".\"id\", \"gtc_clauses\".\"document_id\", \"gtc_clauses\".\"parent_id\", \"gtc_clauses\".\"item_number\", \"gtc_clauses\".\"category\", \"gtc_clauses\".\"subtitle\", \"gtc_clauses\".\"content\", \"gtc_clauses\".\"sort_order\", \"gtc_clauses\".\"depth\", \"gtc_clauses\".\"full_path\", \"gtc_clauses\".\"images\", \"gtc_clauses\".\"is_active\", \"gtc_clauses\".\"created_at\", \"gtc_clauses\".\"created_by_id\", \"gtc_clauses\".\"updated_at\", \"gtc_clauses\".\"updated_by_id\", \"gtc_clauses\".\"edit_reason\", \"gtc_documents\".\"type\", \"gtc_documents\".\"file_name\", \"gtc_documents\".\"revision\", \"gtc_documents\".\"project_id\", created_by_user.name as \"created_by_name\", created_by_user.email as \"created_by_email\", updated_by_user.name as \"updated_by_name\", updated_by_user.email as \"updated_by_email\", parent_clause.item_number as \"parent_item_number\", parent_clause.subtitle as \"parent_subtitle\", \n (\n SELECT count(*)\n FROM gtc_clauses children\n WHERE children.parent_id = \"gtc_clauses\".\"id\"\n AND children.is_active = true\n )\n as \"children_count\", \n (\n SELECT count(*)\n FROM gtc_clauses siblings\n WHERE siblings.parent_id = \"gtc_clauses\".\"parent_id\"\n AND siblings.is_active = true\n )\n as \"siblings_count\", \n \"gtc_clauses\".\"created_by_id\" != \"gtc_clauses\".\"updated_by_id\" OR \n \"gtc_clauses\".\"created_at\" != \"gtc_clauses\".\"updated_at\"\n as \"has_edit_history\" from \"gtc_clauses\" left join \"gtc_documents\" on \"gtc_clauses\".\"document_id\" = \"gtc_documents\".\"id\" left join users created_by_user on \"gtc_clauses\".\"created_by_id\" = created_by_user.id left join users updated_by_user on \"gtc_clauses\".\"updated_by_id\" = updated_by_user.id left join gtc_clauses parent_clause on \"gtc_clauses\".\"parent_id\" = parent_clause.id",
+ "name": "gtc_clauses_tree_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_documents_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"gtc_documents\".\"id\", \"gtc_documents\".\"type\", \"gtc_documents\".\"project_id\", \"gtc_documents\".\"revision\", \"gtc_documents\".\"title\", \"gtc_documents\".\"file_name\", \"gtc_documents\".\"file_path\", \"gtc_documents\".\"file_size\", \"gtc_documents\".\"created_at\", \"gtc_documents\".\"created_by_id\", \"gtc_documents\".\"updated_at\", \"gtc_documents\".\"updated_by_id\", \"gtc_documents\".\"edit_reason\", \"gtc_documents\".\"is_active\", \"projects\".\"code\", \"projects\".\"name\", created_by_user.name as \"created_by_name\", created_by_user.email as \"created_by_email\", updated_by_user.name as \"updated_by_name\", updated_by_user.email as \"updated_by_email\", \n (\n SELECT count(*)\n FROM gtc_documents gd2\n WHERE gd2.type = \"gtc_documents\".\"type\"\n AND gd2.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd2.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd2.project_id IS NULL)\n )\n )\n as \"total_documents_in_group\", \n (\n SELECT max(revision)\n FROM gtc_documents gd3\n WHERE gd3.type = \"gtc_documents\".\"type\"\n AND gd3.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd3.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd3.project_id IS NULL)\n )\n )\n as \"latest_revision\", \n \"gtc_documents\".\"revision\" = (\n SELECT max(revision)\n FROM gtc_documents gd4\n WHERE gd4.type = \"gtc_documents\".\"type\"\n AND gd4.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd4.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd4.project_id IS NULL)\n )\n )\n as \"is_latest_revision\", \n (\n SELECT id\n FROM gtc_documents gd5\n WHERE gd5.type = \"gtc_documents\".\"type\"\n AND gd5.is_active = true\n AND gd5.revision < \"gtc_documents\".\"revision\"\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd5.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd5.project_id IS NULL)\n )\n ORDER BY gd5.revision DESC\n LIMIT 1\n )\n as \"previous_revision_id\", \n (\n SELECT id\n FROM gtc_documents gd6\n WHERE gd6.type = \"gtc_documents\".\"type\"\n AND gd6.is_active = true\n AND gd6.revision > \"gtc_documents\".\"revision\"\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd6.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd6.project_id IS NULL)\n )\n ORDER BY gd6.revision ASC\n LIMIT 1\n )\n as \"next_revision_id\", \n CASE \n WHEN \"gtc_documents\".\"file_size\" IS NULL THEN NULL\n WHEN \"gtc_documents\".\"file_size\" < 1024 THEN \"gtc_documents\".\"file_size\" || ' B'\n WHEN \"gtc_documents\".\"file_size\" < 1024 * 1024 THEN round(\"gtc_documents\".\"file_size\" / 1024.0, 1) || ' KB'\n WHEN \"gtc_documents\".\"file_size\" < 1024 * 1024 * 1024 THEN round(\"gtc_documents\".\"file_size\" / (1024.0 * 1024), 1) || ' MB'\n ELSE round(\"gtc_documents\".\"file_size\" / (1024.0 * 1024 * 1024), 1) || ' GB'\n END\n as \"file_size_formatted\", \n CASE \n WHEN \"gtc_documents\".\"project_id\" IS NOT NULL THEN (\n SELECT count(*)\n FROM gtc_documents gd7\n WHERE gd7.project_id = \"gtc_documents\".\"project_id\"\n AND gd7.is_active = true\n )\n ELSE NULL\n END\n as \"project_total_documents\", \n (\n SELECT array_agg(revision ORDER BY revision)\n FROM gtc_documents gd8\n WHERE gd8.type = \"gtc_documents\".\"type\"\n AND gd8.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd8.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd8.project_id IS NULL)\n )\n )\n as \"revision_history\", \n \"gtc_documents\".\"created_by_id\" != \"gtc_documents\".\"updated_by_id\" OR \n \"gtc_documents\".\"created_at\" != \"gtc_documents\".\"updated_at\"\n as \"has_edit_history\" from \"gtc_documents\" left join \"projects\" on \"gtc_documents\".\"project_id\" = \"projects\".\"id\" left join users created_by_user on \"gtc_documents\".\"created_by_id\" = created_by_user.id left join users updated_by_user on \"gtc_documents\".\"updated_by_id\" = updated_by_user.id",
+ "name": "gtc_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_vendor_clauses_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_document_id": {
+ "name": "vendor_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_clause_id": {
+ "name": "base_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_number_modified": {
+ "name": "is_number_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_category_modified": {
+ "name": "is_category_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_subtitle_modified": {
+ "name": "is_subtitle_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_content_modified": {
+ "name": "is_content_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_document_id": {
+ "name": "base_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_note": {
+ "name": "negotiation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_excluded": {
+ "name": "is_excluded",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"gtc_vendor_clauses\".\"id\", \"gtc_vendor_clauses\".\"vendor_document_id\", \"gtc_vendor_clauses\".\"base_clause_id\", \"gtc_vendor_clauses\".\"parent_id\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_item_number\", \"gtc_clauses\".\"item_number\")\n as \"effective_item_number\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_category\", \"gtc_clauses\".\"category\")\n as \"effective_category\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_subtitle\", \"gtc_clauses\".\"subtitle\")\n as \"effective_subtitle\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_content\", \"gtc_clauses\".\"content\")\n as \"effective_content\", \"gtc_vendor_clauses\".\"is_number_modified\", \"gtc_vendor_clauses\".\"is_category_modified\", \"gtc_vendor_clauses\".\"is_subtitle_modified\", \"gtc_vendor_clauses\".\"is_content_modified\", \"gtc_clauses\".\"item_number\", \"gtc_clauses\".\"category\", \"gtc_clauses\".\"subtitle\", \"gtc_clauses\".\"content\", \"gtc_vendor_documents\".\"vendor_id\", \"vendors\".\"vendor_code\", \"vendors\".\"vendor_name\", \"gtc_vendor_documents\".\"base_document_id\", \"gtc_documents\".\"type\", \"gtc_documents\".\"file_name\", \"gtc_vendor_clauses\".\"review_status\", \"gtc_vendor_clauses\".\"negotiation_note\", \"gtc_vendor_clauses\".\"is_excluded\", \"gtc_vendor_clauses\".\"sort_order\", \"gtc_vendor_clauses\".\"depth\", \"gtc_vendor_clauses\".\"full_path\", \n \"gtc_vendor_clauses\".\"is_number_modified\" OR \n \"gtc_vendor_clauses\".\"is_category_modified\" OR \n \"gtc_vendor_clauses\".\"is_subtitle_modified\" OR \n \"gtc_vendor_clauses\".\"is_content_modified\"\n as \"has_modifications\", \"gtc_vendor_clauses\".\"created_at\", \"gtc_vendor_clauses\".\"updated_at\" from \"gtc_vendor_clauses\" left join \"gtc_clauses\" on \"gtc_vendor_clauses\".\"base_clause_id\" = \"gtc_clauses\".\"id\" left join \"gtc_vendor_documents\" on \"gtc_vendor_clauses\".\"vendor_document_id\" = \"gtc_vendor_documents\".\"id\" left join \"vendors\" on \"gtc_vendor_documents\".\"vendor_id\" = \"vendors\".\"id\" left join \"gtc_documents\" on \"gtc_vendor_documents\".\"base_document_id\" = \"gtc_documents\".\"id\"",
+ "name": "gtc_vendor_clauses_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.legal_works_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_urgent": {
+ "name": "is_urgent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "request_date": {
+ "name": "request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consultation_date": {
+ "name": "consultation_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expected_answer_date": {
+ "name": "expected_answer_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_completion_date": {
+ "name": "legal_completion_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer": {
+ "name": "reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_responder": {
+ "name": "legal_responder",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachment": {
+ "name": "has_attachment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "review_department": {
+ "name": "review_department",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inquiry_type": {
+ "name": "inquiry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "request_content": {
+ "name": "request_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "contract_project_name": {
+ "name": "contract_project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_amount": {
+ "name": "contract_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"legal_works\".\"id\", \"legal_works\".\"category\", \"legal_works\".\"status\", \"legal_works\".\"company_id\", \"legal_works\".\"vendor_code\", \"legal_works\".\"vendor_name\", \"legal_works\".\"is_urgent\", \"legal_works\".\"request_date\", \"legal_works\".\"consultation_date\", \"legal_works\".\"expected_answer_date\", \"legal_works\".\"legal_completion_date\", \"legal_works\".\"reviewer\", \"legal_works\".\"legal_responder\", \"legal_works\".\"has_attachment\", \"legal_works\".\"created_at\", \"legal_works\".\"updated_at\", \"legal_work_requests\".\"review_department\", \"legal_work_requests\".\"inquiry_type\", \"legal_work_requests\".\"title\", \"legal_work_requests\".\"request_content\", \"legal_work_requests\".\"is_public\", \"legal_work_requests\".\"contract_project_name\", \"legal_work_requests\".\"contract_type\", \"legal_work_requests\".\"contract_amount\", (\n SELECT response_content \n FROM legal_work_responses lwr_latest \n WHERE lwr_latest.legal_work_id = \"legal_works\".\"id\" \n ORDER BY lwr_latest.created_at DESC \n LIMIT 1\n ) as \"response_content\", (\n SELECT COUNT(*)::integer \n FROM legal_work_attachments lwa \n WHERE lwa.legal_work_id = \"legal_works\".\"id\"\n ) as \"attachment_count\" from \"legal_works\" left join \"legal_work_requests\" on \"legal_works\".\"id\" = \"legal_work_requests\".\"legal_work_id\" left join \"vendors\" on \"legal_works\".\"company_id\" = \"vendors\".\"id\"",
+ "name": "legal_works_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.bidding_list_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_number": {
+ "name": "bidding_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "contract_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bidding_type": {
+ "name": "bidding_type",
+ "type": "bidding_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "award_count": {
+ "name": "award_count",
+ "type": "award_count",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'single'"
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_date": {
+ "name": "pre_quote_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_registration_date": {
+ "name": "bidding_registration_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_start_date": {
+ "name": "submission_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_end_date": {
+ "name": "submission_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_date": {
+ "name": "evaluation_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_specification_meeting": {
+ "name": "has_specification_meeting",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "has_pr_document": {
+ "name": "has_pr_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "budget": {
+ "name": "budget",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_price": {
+ "name": "target_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_bid_price": {
+ "name": "final_bid_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "bidding_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bidding_generated'"
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_email": {
+ "name": "manager_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_phone": {
+ "name": "manager_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "meeting_date": {
+ "name": "meeting_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "location": {
+ "name": "location",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "definition": "select \"biddings\".\"id\", \"biddings\".\"bidding_number\", \"biddings\".\"revision\", \"biddings\".\"project_name\", \"biddings\".\"item_name\", \"biddings\".\"title\", \"biddings\".\"description\", \"biddings\".\"content\", \"biddings\".\"contract_type\", \"biddings\".\"bidding_type\", \"biddings\".\"award_count\", \"biddings\".\"contract_period\", \"biddings\".\"pre_quote_date\", \"biddings\".\"bidding_registration_date\", \"biddings\".\"submission_start_date\", \"biddings\".\"submission_end_date\", \"biddings\".\"evaluation_date\", \"biddings\".\"has_specification_meeting\", \"biddings\".\"has_pr_document\", \"biddings\".\"pr_number\", \"biddings\".\"currency\", \"biddings\".\"budget\", \"biddings\".\"target_price\", \"biddings\".\"final_bid_price\", \"biddings\".\"status\", \"biddings\".\"is_public\", \"biddings\".\"manager_name\", \"biddings\".\"manager_email\", \"biddings\".\"manager_phone\", \"biddings\".\"remarks\", \"biddings\".\"created_by\", \"biddings\".\"created_at\", \"biddings\".\"updated_at\", \"biddings\".\"updated_by\", \"specification_meetings\".\"id\" IS NOT NULL as \"has_specification_meeting_details\", \"specification_meetings\".\"meeting_date\", \"specification_meetings\".\"location\", \"specification_meetings\".\"contact_person\", \"specification_meetings\".\"is_required\", \n COALESCE((\n SELECT count(*) \n FROM pr_documents \n WHERE bidding_id = \"biddings\".\"id\"\n ), 0)\n as \"pr_document_count\", \n (\n SELECT array_agg(document_name ORDER BY registered_at DESC)\n FROM pr_documents \n WHERE bidding_id = \"biddings\".\"id\"\n LIMIT 5\n )\n as \"pr_document_names\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ), 0)\n as \"participant_expected\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'submitted'\n ), 0)\n as \"participant_participated\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'declined'\n ), 0)\n as \"participant_declined\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status IN ('pending', 'sent')\n ), 0)\n as \"participant_pending\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'accepted'\n ), 0)\n as \"participant_accepted\", \n CASE \n WHEN (\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ) > 0 \n THEN ROUND(\n (\n SELECT count(*)::decimal \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'submitted'\n ) / (\n SELECT count(*)::decimal \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ) * 100, 1\n )\n ELSE 0 \n END\n as \"participation_rate\", \n (\n SELECT AVG(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"avg_pre_quote_amount\", \n (\n SELECT MIN(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"min_pre_quote_amount\", \n (\n SELECT MAX(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"max_pre_quote_amount\", \n (\n SELECT AVG(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"avg_final_quote_amount\", \n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"min_final_quote_amount\", \n (\n SELECT MAX(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"max_final_quote_amount\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND is_pre_quote_selected = true\n ), 0)\n as \"selected_for_final_bid_count\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND is_winner = true\n ), 0)\n as \"winner_count\", \n (\n SELECT array_agg(v.vendor_name ORDER BY v.vendor_name)\n FROM bidding_companies bc\n JOIN vendors v ON bc.company_id = v.id\n WHERE bc.bidding_id = \"biddings\".\"id\" \n AND bc.is_winner = true\n )\n as \"winner_company_names\", \n CASE \n WHEN \"biddings\".\"submission_start_date\" IS NULL OR \"biddings\".\"submission_end_date\" IS NULL \n THEN 'not_scheduled'\n WHEN NOW() < \"biddings\".\"submission_start_date\" \n THEN 'scheduled'\n WHEN NOW() BETWEEN \"biddings\".\"submission_start_date\" AND \"biddings\".\"submission_end_date\" \n THEN 'active'\n WHEN NOW() > \"biddings\".\"submission_end_date\" \n THEN 'closed'\n ELSE 'unknown'\n END\n as \"submission_status\", \n CASE \n WHEN \"biddings\".\"submission_end_date\" IS NOT NULL \n AND NOW() < \"biddings\".\"submission_end_date\" \n THEN EXTRACT(DAYS FROM (\"biddings\".\"submission_end_date\" - NOW()))::integer\n ELSE NULL \n END\n as \"days_until_deadline\", \n CASE \n WHEN \"biddings\".\"submission_start_date\" IS NOT NULL \n AND NOW() < \"biddings\".\"submission_start_date\" \n THEN EXTRACT(DAYS FROM (\"biddings\".\"submission_start_date\" - NOW()))::integer\n ELSE NULL \n END\n as \"days_until_start\", \n CASE \n WHEN \"biddings\".\"budget\" IS NOT NULL AND \"biddings\".\"budget\" > 0\n AND (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) IS NOT NULL\n THEN ROUND(\n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) / \"biddings\".\"budget\" * 100, 1\n )\n ELSE NULL \n END\n as \"budget_efficiency_rate\", \n CASE \n WHEN \"biddings\".\"target_price\" IS NOT NULL AND \"biddings\".\"target_price\" > 0\n AND (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) IS NOT NULL\n THEN ROUND(\n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) / \"biddings\".\"target_price\" * 100, 1\n )\n ELSE NULL \n END\n as \"target_price_efficiency_rate\", \n CASE \"biddings\".\"status\"\n WHEN 'bidding_generated' THEN 10\n WHEN 'request_for_quotation' THEN 20\n WHEN 'received_quotation' THEN 40\n WHEN 'set_target_price' THEN 60\n WHEN 'bidding_opened' THEN 70\n WHEN 'bidding_closed' THEN 80\n WHEN 'evaluation_of_bidding' THEN 90\n WHEN 'vendor_selected' THEN 100\n WHEN 'bidding_disposal' THEN 0\n ELSE 0\n END\n as \"progress_score\", \n GREATEST(\n \"biddings\".\"updated_at\",\n COALESCE((\n SELECT MAX(updated_at) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ), \"biddings\".\"updated_at\")\n )\n as \"last_activity_date\" from \"biddings\" left join \"specification_meetings\" on \"biddings\".\"id\" = \"specification_meetings\".\"bidding_id\"",
+ "name": "bidding_list_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ }
+ },
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/db/migrations/meta/0290_snapshot.json b/db/migrations/meta/0290_snapshot.json
new file mode 100644
index 00000000..561982c5
--- /dev/null
+++ b/db/migrations/meta/0290_snapshot.json
@@ -0,0 +1,48444 @@
+{
+ "id": "7cca1d11-5749-4231-9e84-b231c8d21838",
+ "prevId": "a2dc7436-a1ed-402a-9308-6f4d5fc59ff0",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.companies": {
+ "name": "companies",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "companies_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "taxID": {
+ "name": "taxID",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_envelopes": {
+ "name": "contract_envelopes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_envelopes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "envelope_id": {
+ "name": "envelope_id",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "envelope_status": {
+ "name": "envelope_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contract_envelopes_contract_id_contracts_id_fk": {
+ "name": "contract_envelopes_contract_id_contracts_id_fk",
+ "tableFrom": "contract_envelopes",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_items": {
+ "name": "contract_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_items_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_id": {
+ "name": "item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "unit_price": {
+ "name": "unit_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_rate": {
+ "name": "tax_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_amount": {
+ "name": "tax_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_line_amount": {
+ "name": "total_line_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "contract_items_contract_item_idx": {
+ "name": "contract_items_contract_item_idx",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "item_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "contract_items_contract_id_contracts_id_fk": {
+ "name": "contract_items_contract_id_contracts_id_fk",
+ "tableFrom": "contract_items",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contract_items_item_id_items_id_fk": {
+ "name": "contract_items_item_id_items_id_fk",
+ "tableFrom": "contract_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contract_items_contract_id_item_id_unique": {
+ "name": "contract_items_contract_id_item_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_id",
+ "item_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_signers": {
+ "name": "contract_signers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_signers_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "envelope_id": {
+ "name": "envelope_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_contact_id": {
+ "name": "vendor_contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "signer_type": {
+ "name": "signer_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'VENDOR'"
+ },
+ "signer_email": {
+ "name": "signer_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "signer_name": {
+ "name": "signer_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "signer_position": {
+ "name": "signer_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "signer_status": {
+ "name": "signer_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "signed_at": {
+ "name": "signed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contract_signers_envelope_id_contract_envelopes_id_fk": {
+ "name": "contract_signers_envelope_id_contract_envelopes_id_fk",
+ "tableFrom": "contract_signers",
+ "tableTo": "contract_envelopes",
+ "columnsFrom": [
+ "envelope_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contract_signers_vendor_contact_id_vendor_contacts_id_fk": {
+ "name": "contract_signers_vendor_contact_id_vendor_contacts_id_fk",
+ "tableFrom": "contract_signers",
+ "tableTo": "vendor_contacts",
+ "columnsFrom": [
+ "vendor_contact_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contracts": {
+ "name": "contracts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contracts_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_name": {
+ "name": "contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "end_date": {
+ "name": "end_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "partial_shipping_allowed": {
+ "name": "partial_shipping_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "partial_payment_allowed": {
+ "name": "partial_payment_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contracts_project_id_projects_id_fk": {
+ "name": "contracts_project_id_projects_id_fk",
+ "tableFrom": "contracts",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contracts_vendor_id_vendors_id_fk": {
+ "name": "contracts_vendor_id_vendors_id_fk",
+ "tableFrom": "contracts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contracts_contract_no_unique": {
+ "name": "contracts_contract_no_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_no"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.poa": {
+ "name": "poa",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "poa_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_contract_no": {
+ "name": "original_contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_contract_name": {
+ "name": "original_contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_status": {
+ "name": "original_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_status": {
+ "name": "approval_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "poa_original_contract_no_contracts_contract_no_fk": {
+ "name": "poa_original_contract_no_contracts_contract_no_fk",
+ "tableFrom": "poa",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "original_contract_no"
+ ],
+ "columnsTo": [
+ "contract_no"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "poa_project_id_projects_id_fk": {
+ "name": "poa_project_id_projects_id_fk",
+ "tableFrom": "poa",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "poa_vendor_id_vendors_id_fk": {
+ "name": "poa_vendor_id_vendors_id_fk",
+ "tableFrom": "poa",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_offshore_hull": {
+ "name": "item_offshore_hull",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_item_list": {
+ "name": "sub_item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_offshore_top": {
+ "name": "item_offshore_top",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_item_list": {
+ "name": "sub_item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_shipbuilding": {
+ "name": "item_shipbuilding",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ship_types": {
+ "name": "ship_types",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'OPTION'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.items": {
+ "name": "items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_no": {
+ "name": "project_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "package_code": {
+ "name": "package_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sm_code": {
+ "name": "sm_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_item_code": {
+ "name": "parent_item_code",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_level": {
+ "name": "item_level",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delete_flag": {
+ "name": "delete_flag",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_date": {
+ "name": "change_date",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "base_unit_of_measure": {
+ "name": "base_unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_item_unique": {
+ "name": "project_item_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_no",
+ "item_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.materials": {
+ "name": "materials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_item_code": {
+ "name": "parent_item_code",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_level": {
+ "name": "item_level",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delete_flag": {
+ "name": "delete_flag",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_date": {
+ "name": "change_date",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "base_unit_of_measure": {
+ "name": "base_unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "materials_item_code_unique": {
+ "name": "materials_item_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "item_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pq_criterias": {
+ "name": "pq_criterias",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_point": {
+ "name": "check_point",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_group_name": {
+ "name": "sub_group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pq_list_id": {
+ "name": "pq_list_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "input_format": {
+ "name": "input_format",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'TEXT'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pq_criterias_pq_list_id_pq_lists_id_fk": {
+ "name": "pq_criterias_pq_list_id_pq_lists_id_fk",
+ "tableFrom": "pq_criterias",
+ "tableTo": "pq_lists",
+ "columnsFrom": [
+ "pq_list_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pq_lists": {
+ "name": "pq_lists",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_to": {
+ "name": "valid_to",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pq_lists_project_id_projects_id_fk": {
+ "name": "pq_lists_project_id_projects_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "pq_lists_created_by_users_id_fk": {
+ "name": "pq_lists_created_by_users_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "pq_lists_updated_by_users_id_fk": {
+ "name": "pq_lists_updated_by_users_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.site_visit_request_attachments": {
+ "name": "site_visit_request_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "site_visit_request_id": {
+ "name": "site_visit_request_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_site_visit_info_id": {
+ "name": "vendor_site_visit_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "site_visit_request_attachments_site_visit_request_id_site_visit_requests_id_fk": {
+ "name": "site_visit_request_attachments_site_visit_request_id_site_visit_requests_id_fk",
+ "tableFrom": "site_visit_request_attachments",
+ "tableTo": "site_visit_requests",
+ "columnsFrom": [
+ "site_visit_request_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "site_visit_request_attachments_vendor_site_visit_info_id_vendor_site_visit_info_id_fk": {
+ "name": "site_visit_request_attachments_vendor_site_visit_info_id_vendor_site_visit_info_id_fk",
+ "tableFrom": "site_visit_request_attachments",
+ "tableTo": "vendor_site_visit_info",
+ "columnsFrom": [
+ "vendor_site_visit_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.site_visit_requests": {
+ "name": "site_visit_requests",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "investigation_id": {
+ "name": "investigation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "inspection_duration": {
+ "name": "inspection_duration",
+ "type": "numeric(4, 1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_start_date": {
+ "name": "requested_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_end_date": {
+ "name": "requested_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_attendees": {
+ "name": "shi_attendees",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "vendor_requests": {
+ "name": "vendor_requests",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "additional_requests": {
+ "name": "additional_requests",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REQUESTED'"
+ },
+ "sent_at": {
+ "name": "sent_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "site_visit_requests_investigation_id_vendor_investigations_id_fk": {
+ "name": "site_visit_requests_investigation_id_vendor_investigations_id_fk",
+ "tableFrom": "site_visit_requests",
+ "tableTo": "vendor_investigations",
+ "columnsFrom": [
+ "investigation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "site_visit_requests_requester_id_users_id_fk": {
+ "name": "site_visit_requests_requester_id_users_id_fk",
+ "tableFrom": "site_visit_requests",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_criteria_attachments": {
+ "name": "vendor_criteria_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_criteria_answer_id": {
+ "name": "vendor_criteria_answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_criteria_attachments_vendor_criteria_answer_id_vendor_pq_criteria_answers_id_fk": {
+ "name": "vendor_criteria_attachments_vendor_criteria_answer_id_vendor_pq_criteria_answers_id_fk",
+ "tableFrom": "vendor_criteria_attachments",
+ "tableTo": "vendor_pq_criteria_answers",
+ "columnsFrom": [
+ "vendor_criteria_answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_investigation_attachments": {
+ "name": "vendor_investigation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "investigation_id": {
+ "name": "investigation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'REPORT'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_investigation_attachments_investigation_id_vendor_investigations_id_fk": {
+ "name": "vendor_investigation_attachments_investigation_id_vendor_investigations_id_fk",
+ "tableFrom": "vendor_investigation_attachments",
+ "tableTo": "vendor_investigations",
+ "columnsFrom": [
+ "investigation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_investigations": {
+ "name": "vendor_investigations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pq_submission_id": {
+ "name": "pq_submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "qm_manager_id": {
+ "name": "qm_manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_status": {
+ "name": "investigation_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "investigation_address": {
+ "name": "investigation_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_method": {
+ "name": "investigation_method",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_start_at": {
+ "name": "scheduled_start_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_end_at": {
+ "name": "scheduled_end_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "forecasted_at": {
+ "name": "forecasted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_result": {
+ "name": "evaluation_result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_notes": {
+ "name": "investigation_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "purchase_comment": {
+ "name": "purchase_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_investigations_vendor_id_vendors_id_fk": {
+ "name": "vendor_investigations_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_investigations_pq_submission_id_vendor_pq_submissions_id_fk": {
+ "name": "vendor_investigations_pq_submission_id_vendor_pq_submissions_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "vendor_pq_submissions",
+ "columnsFrom": [
+ "pq_submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "cascade"
+ },
+ "vendor_investigations_requester_id_users_id_fk": {
+ "name": "vendor_investigations_requester_id_users_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_investigations_qm_manager_id_users_id_fk": {
+ "name": "vendor_investigations_qm_manager_id_users_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "qm_manager_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_submissions": {
+ "name": "vendor_pq_submissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "pq_number": {
+ "name": "pq_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REQUESTED'"
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agreements": {
+ "name": "agreements",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "pq_items": {
+ "name": "pq_items",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejected_at": {
+ "name": "rejected_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reject_reason": {
+ "name": "reject_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_pq_submission": {
+ "name": "unique_pq_submission",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_pq_submissions_requester_id_users_id_fk": {
+ "name": "vendor_pq_submissions_requester_id_users_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_pq_submissions_vendor_id_vendors_id_fk": {
+ "name": "vendor_pq_submissions_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_submissions_project_id_projects_id_fk": {
+ "name": "vendor_pq_submissions_project_id_projects_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_pq_submissions_pq_number_unique": {
+ "name": "vendor_pq_submissions_pq_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pq_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_criteria_answers": {
+ "name": "vendor_pq_criteria_answers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "answer": {
+ "name": "answer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_comment": {
+ "name": "shi_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_reply": {
+ "name": "vendor_reply",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_pq_criteria_answers_vendor_id_vendors_id_fk": {
+ "name": "vendor_pq_criteria_answers_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_criteria_answers_criteria_id_pq_criterias_id_fk": {
+ "name": "vendor_pq_criteria_answers_criteria_id_pq_criterias_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "pq_criterias",
+ "columnsFrom": [
+ "criteria_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_criteria_answers_project_id_projects_id_fk": {
+ "name": "vendor_pq_criteria_answers_project_id_projects_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_review_logs": {
+ "name": "vendor_pq_review_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_pq_criteria_answer_id": {
+ "name": "vendor_pq_criteria_answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_name": {
+ "name": "reviewer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_pq_review_logs_vendor_pq_criteria_answer_id_vendor_pq_criteria_answers_id_fk": {
+ "name": "vendor_pq_review_logs_vendor_pq_criteria_answer_id_vendor_pq_criteria_answers_id_fk",
+ "tableFrom": "vendor_pq_review_logs",
+ "tableTo": "vendor_pq_criteria_answers",
+ "columnsFrom": [
+ "vendor_pq_criteria_answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_site_visit_info": {
+ "name": "vendor_site_visit_info",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "site_visit_request_id": {
+ "name": "site_visit_request_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_name": {
+ "name": "factory_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_location": {
+ "name": "factory_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_address": {
+ "name": "factory_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_name": {
+ "name": "factory_pic_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_phone": {
+ "name": "factory_pic_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_email": {
+ "name": "factory_pic_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_directions": {
+ "name": "factory_directions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_procedure": {
+ "name": "access_procedure",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachments": {
+ "name": "has_attachments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "other_info": {
+ "name": "other_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "submitted_by": {
+ "name": "submitted_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_site_visit_info_site_visit_request_id_site_visit_requests_id_fk": {
+ "name": "vendor_site_visit_info_site_visit_request_id_site_visit_requests_id_fk",
+ "tableFrom": "vendor_site_visit_info",
+ "tableTo": "site_visit_requests",
+ "columnsFrom": [
+ "site_visit_request_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_site_visit_info_submitted_by_users_id_fk": {
+ "name": "vendor_site_visit_info_submitted_by_users_id_fk",
+ "tableFrom": "vendor_site_visit_info",
+ "tableTo": "users",
+ "columnsFrom": [
+ "submitted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_projects": {
+ "name": "bidding_projects",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "proj_nm": {
+ "name": "proj_nm",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sector": {
+ "name": "sector",
+ "type": "char(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proj_msrm": {
+ "name": "proj_msrm",
+ "type": "numeric(3, 0)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kunnr": {
+ "name": "kunnr",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kunnr_nm": {
+ "name": "kunnr_nm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cls_1": {
+ "name": "cls_1",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cls1_nm": {
+ "name": "cls1_nm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ptype": {
+ "name": "ptype",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ptype_nm": {
+ "name": "ptype_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_cd": {
+ "name": "pmodel_cd",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_nm": {
+ "name": "pmodel_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_sz": {
+ "name": "pmodel_sz",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_uom": {
+ "name": "pmodel_uom",
+ "type": "char(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "txt04": {
+ "name": "txt04",
+ "type": "char(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "txt30": {
+ "name": "txt30",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "estm_pm": {
+ "name": "estm_pm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pjt_type": {
+ "name": "pjt_type",
+ "type": "varchar",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "bidding_projects_pspid_unique": {
+ "name": "bidding_projects_pspid_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pspid"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_series": {
+ "name": "project_series",
+ "schema": "",
+ "columns": {
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sers_no": {
+ "name": "sers_no",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sc_dt": {
+ "name": "sc_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kl_dt": {
+ "name": "kl_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "lc_dt": {
+ "name": "lc_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dl_dt": {
+ "name": "dl_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dock_no": {
+ "name": "dock_no",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dock_nm": {
+ "name": "dock_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proj_no": {
+ "name": "proj_no",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "post1": {
+ "name": "post1",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "project_sersNo_unique": {
+ "name": "project_sersNo_unique",
+ "columns": [
+ {
+ "expression": "pspid",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "sers_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_series_pspid_bidding_projects_pspid_fk": {
+ "name": "project_series_pspid_bidding_projects_pspid_fk",
+ "tableFrom": "project_series",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "pspid"
+ ],
+ "columnsTo": [
+ "pspid"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.projects": {
+ "name": "projects",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ship'"
+ },
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "projects_pspid_unique": {
+ "name": "projects_pspid_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pspid"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.cbe_evaluations": {
+ "name": "cbe_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluated_by": {
+ "name": "evaluated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluated_at": {
+ "name": "evaluated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "result": {
+ "name": "result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_cost": {
+ "name": "total_cost",
+ "type": "numeric(18, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_schedule": {
+ "name": "delivery_schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cbe_evaluations_rfq_id_rfqs_id_fk": {
+ "name": "cbe_evaluations_rfq_id_rfqs_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "cbe_evaluations_vendor_id_vendors_id_fk": {
+ "name": "cbe_evaluations_vendor_id_vendors_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "cbe_evaluations_evaluated_by_users_id_fk": {
+ "name": "cbe_evaluations_evaluated_by_users_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "evaluated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_attachments": {
+ "name": "rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_id": {
+ "name": "evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cbe_id": {
+ "name": "cbe_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_attachments_rfq_id_rfqs_id_fk": {
+ "name": "rfq_attachments_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_vendor_id_vendors_id_fk": {
+ "name": "rfq_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_evaluation_id_rfq_evaluations_id_fk": {
+ "name": "rfq_attachments_evaluation_id_rfq_evaluations_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfq_evaluations",
+ "columnsFrom": [
+ "evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_cbe_id_cbe_evaluations_id_fk": {
+ "name": "rfq_attachments_cbe_id_cbe_evaluations_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "cbe_evaluations",
+ "columnsFrom": [
+ "cbe_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_comment_id_rfq_comments_id_fk": {
+ "name": "rfq_attachments_comment_id_rfq_comments_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_comments": {
+ "name": "rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment_text": {
+ "name": "comment_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "commented_by": {
+ "name": "commented_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_id": {
+ "name": "evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cbe_id": {
+ "name": "cbe_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_comments_rfq_id_rfqs_id_fk": {
+ "name": "rfq_comments_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_vendor_id_vendors_id_fk": {
+ "name": "rfq_comments_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_commented_by_users_id_fk": {
+ "name": "rfq_comments_commented_by_users_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "commented_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_evaluation_id_rfq_evaluations_id_fk": {
+ "name": "rfq_comments_evaluation_id_rfq_evaluations_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "rfq_evaluations",
+ "columnsFrom": [
+ "evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_cbe_id_vendor_responses_id_fk": {
+ "name": "rfq_comments_cbe_id_vendor_responses_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "cbe_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_evaluations": {
+ "name": "rfq_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "eval_type": {
+ "name": "eval_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "result": {
+ "name": "result",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_evaluations_rfq_id_rfqs_id_fk": {
+ "name": "rfq_evaluations_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_evaluations",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_evaluations_vendor_id_vendors_id_fk": {
+ "name": "rfq_evaluations_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_evaluations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_items": {
+ "name": "rfq_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_items_rfq_id_rfqs_id_fk": {
+ "name": "rfq_items_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_items",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "rfq_items_item_code_items_item_code_fk": {
+ "name": "rfq_items_item_code_items_item_code_fk",
+ "tableFrom": "rfq_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfqs": {
+ "name": "rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_project_id": {
+ "name": "bid_project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PURCHASE'"
+ },
+ "parent_rfq_id": {
+ "name": "parent_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfqs_project_id_projects_id_fk": {
+ "name": "rfqs_project_id_projects_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_bid_project_id_bidding_projects_id_fk": {
+ "name": "rfqs_bid_project_id_bidding_projects_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "bid_project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_created_by_users_id_fk": {
+ "name": "rfqs_created_by_users_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_parent_rfq_id_rfqs_id_fk": {
+ "name": "rfqs_parent_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "parent_rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "rfqs_rfq_code_unique": {
+ "name": "rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_commercial_responses": {
+ "name": "vendor_commercial_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric(18, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_period": {
+ "name": "delivery_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "warranty_period": {
+ "name": "warranty_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validity_period": {
+ "name": "validity_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "price_breakdown": {
+ "name": "price_breakdown",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commercial_notes": {
+ "name": "commercial_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_commercial_responses_response_id_vendor_responses_id_fk": {
+ "name": "vendor_commercial_responses_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_commercial_responses",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_attachments": {
+ "name": "vendor_response_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "technical_response_id": {
+ "name": "technical_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commercial_response_id": {
+ "name": "commercial_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_attachments_response_id_vendor_responses_id_fk": {
+ "name": "vendor_response_attachments_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_technical_response_id_vendor_technical_responses_id_fk": {
+ "name": "vendor_response_attachments_technical_response_id_vendor_technical_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_technical_responses",
+ "columnsFrom": [
+ "technical_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_commercial_response_id_vendor_commercial_responses_id_fk": {
+ "name": "vendor_response_attachments_commercial_response_id_vendor_commercial_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_commercial_responses",
+ "columnsFrom": [
+ "commercial_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_responses": {
+ "name": "vendor_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REVIEWING'"
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_by": {
+ "name": "responded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "vendor_response_unique": {
+ "name": "vendor_response_unique",
+ "columns": [
+ {
+ "expression": "rfq_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_responses_rfq_id_rfqs_id_fk": {
+ "name": "vendor_responses_rfq_id_rfqs_id_fk",
+ "tableFrom": "vendor_responses",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_responses_vendor_id_vendors_id_fk": {
+ "name": "vendor_responses_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_responses",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_technical_responses": {
+ "name": "vendor_technical_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_technical_responses_response_id_vendor_responses_id_fk": {
+ "name": "vendor_technical_responses_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_technical_responses",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.departments": {
+ "name": "departments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "departments_department_code_unique": {
+ "name": "departments_department_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.login_attempts": {
+ "name": "login_attempts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "login_attempts_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "failure_reason": {
+ "name": "failure_reason",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attempted_at": {
+ "name": "attempted_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "login_attempts_email_idx": {
+ "name": "login_attempts_email_idx",
+ "columns": [
+ {
+ "expression": "email",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "login_attempts_attempted_at_idx": {
+ "name": "login_attempts_attempted_at_idx",
+ "columns": [
+ {
+ "expression": "attempted_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "login_attempts_ip_address_idx": {
+ "name": "login_attempts_ip_address_idx",
+ "columns": [
+ {
+ "expression": "ip_address",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "login_attempts_user_id_users_id_fk": {
+ "name": "login_attempts_user_id_users_id_fk",
+ "tableFrom": "login_attempts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mfa_tokens": {
+ "name": "mfa_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "mfa_tokens_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "phone_number": {
+ "name": "phone_number",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attempts": {
+ "name": "attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "mfa_tokens_user_id_idx": {
+ "name": "mfa_tokens_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "mfa_tokens_token_idx": {
+ "name": "mfa_tokens_token_idx",
+ "columns": [
+ {
+ "expression": "token",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "mfa_tokens_expires_at_idx": {
+ "name": "mfa_tokens_expires_at_idx",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "mfa_tokens_user_id_users_id_fk": {
+ "name": "mfa_tokens_user_id_users_id_fk",
+ "tableFrom": "mfa_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.otps": {
+ "name": "otps",
+ "schema": "",
+ "columns": {
+ "email": {
+ "name": "email",
+ "type": "varchar(256)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "otpToken": {
+ "name": "otpToken",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "otp_expires": {
+ "name": "otp_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.password_history": {
+ "name": "password_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "password_history_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "salt": {
+ "name": "salt",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "replaced_at": {
+ "name": "replaced_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "password_history_user_id_idx": {
+ "name": "password_history_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "password_history_created_at_idx": {
+ "name": "password_history_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "password_history_user_id_users_id_fk": {
+ "name": "password_history_user_id_users_id_fk",
+ "tableFrom": "password_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.passwords": {
+ "name": "passwords",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "passwords_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "salt": {
+ "name": "salt",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "strength": {
+ "name": "strength",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_uppercase": {
+ "name": "has_uppercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_lowercase": {
+ "name": "has_lowercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_numbers": {
+ "name": "has_numbers",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_symbols": {
+ "name": "has_symbols",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "length": {
+ "name": "length",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "passwords_user_id_idx": {
+ "name": "passwords_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "passwords_active_idx": {
+ "name": "passwords_active_idx",
+ "columns": [
+ {
+ "expression": "is_active",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "passwords_user_id_users_id_fk": {
+ "name": "passwords_user_id_users_id_fk",
+ "tableFrom": "passwords",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.permissions": {
+ "name": "permissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "permissions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_key": {
+ "name": "permission_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.role_permissions": {
+ "name": "role_permissions",
+ "schema": "",
+ "columns": {
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_id": {
+ "name": "permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "role_permissions_role_id_roles_id_fk": {
+ "name": "role_permissions_role_id_roles_id_fk",
+ "tableFrom": "role_permissions",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "role_permissions_permission_id_permissions_id_fk": {
+ "name": "role_permissions_permission_id_permissions_id_fk",
+ "tableFrom": "role_permissions",
+ "tableTo": "permissions",
+ "columnsFrom": [
+ "permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "roles_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "roles_company_id_vendors_id_fk": {
+ "name": "roles_company_id_vendors_id_fk",
+ "tableFrom": "roles",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security_settings": {
+ "name": "security_settings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "security_settings_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "min_password_length": {
+ "name": "min_password_length",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 8
+ },
+ "require_uppercase": {
+ "name": "require_uppercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_lowercase": {
+ "name": "require_lowercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_numbers": {
+ "name": "require_numbers",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_symbols": {
+ "name": "require_symbols",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "password_expiry_days": {
+ "name": "password_expiry_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 90
+ },
+ "password_history_count": {
+ "name": "password_history_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "max_failed_attempts": {
+ "name": "max_failed_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "lockout_duration_minutes": {
+ "name": "lockout_duration_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 30
+ },
+ "require_mfa_for_partners": {
+ "name": "require_mfa_for_partners",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "sms_token_expiry_minutes": {
+ "name": "sms_token_expiry_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "max_sms_attempts_per_day": {
+ "name": "max_sms_attempts_per_day",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 10
+ },
+ "session_timeout_minutes": {
+ "name": "session_timeout_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 480
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "epId": {
+ "name": "epId",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deptCode": {
+ "name": "deptCode",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deptName": {
+ "name": "deptName",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tech_company_id": {
+ "name": "tech_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'partners'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'en'"
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mfa_enabled": {
+ "name": "mfa_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "mfa_secret": {
+ "name": "mfa_secret",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_locked": {
+ "name": "is_locked",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "lockout_until": {
+ "name": "lockout_until",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "failed_login_attempts": {
+ "name": "failed_login_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_login_at": {
+ "name": "last_login_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password_change_required": {
+ "name": "password_change_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "deactivated_at": {
+ "name": "deactivated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deactivation_reason": {
+ "name": "deactivation_reason",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_consent_update": {
+ "name": "last_consent_update",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consent_version": {
+ "name": "consent_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requires_consent_update": {
+ "name": "requires_consent_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "users_email_idx": {
+ "name": "users_email_idx",
+ "columns": [
+ {
+ "expression": "email",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "users_phone_idx": {
+ "name": "users_phone_idx",
+ "columns": [
+ {
+ "expression": "phone",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "users_company_id_vendors_id_fk": {
+ "name": "users_company_id_vendors_id_fk",
+ "tableFrom": "users",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "users_tech_company_id_tech_vendors_id_fk": {
+ "name": "users_tech_company_id_tech_vendors_id_fk",
+ "tableFrom": "users",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "tech_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "users_email_unique": {
+ "name": "users_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.form_entries": {
+ "name": "form_entries",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "form_entries_contract_item_id_contract_items_id_fk": {
+ "name": "form_entries_contract_item_id_contract_items_id_fk",
+ "tableFrom": "form_entries",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.form_metas": {
+ "name": "form_metas",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "columns": {
+ "name": "columns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "form_metas_project_id_projects_id_fk": {
+ "name": "form_metas_project_id_projects_id_fk",
+ "tableFrom": "form_metas",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "form_code_project_unique": {
+ "name": "form_code_project_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "form_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.forms": {
+ "name": "forms",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "forms_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "eng": {
+ "name": "eng",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "im": {
+ "name": "im",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "contract_item_form_code_unique": {
+ "name": "contract_item_form_code_unique",
+ "columns": [
+ {
+ "expression": "contract_item_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "form_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "forms_contract_item_id_contract_items_id_fk": {
+ "name": "forms_contract_item_id_contract_items_id_fk",
+ "tableFrom": "forms",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_class_attributes": {
+ "name": "tag_class_attributes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tag_class_attributes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_class_id": {
+ "name": "tag_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "att_id": {
+ "name": "att_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "def_val": {
+ "name": "def_val",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uom_id": {
+ "name": "uom_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "seq": {
+ "name": "seq",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "tag_class_attributes_seq_idx": {
+ "name": "tag_class_attributes_seq_idx",
+ "columns": [
+ {
+ "expression": "seq",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "tag_class_attributes_tag_class_id_tag_classes_id_fk": {
+ "name": "tag_class_attributes_tag_class_id_tag_classes_id_fk",
+ "tableFrom": "tag_class_attributes",
+ "tableTo": "tag_classes",
+ "columnsFrom": [
+ "tag_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_att_id_in_tag_class": {
+ "name": "uniq_att_id_in_tag_class",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_class_id",
+ "att_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_classes": {
+ "name": "tag_classes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tag_classes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subclasses": {
+ "name": "subclasses",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'[]'::json"
+ },
+ "subclass_remark": {
+ "name": "subclass_remark",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{}'::json"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_classes_project_id_projects_id_fk": {
+ "name": "tag_classes_project_id_projects_id_fk",
+ "tableFrom": "tag_classes",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tag_classes_tag_type_code_project_id_tag_types_code_project_id_fk": {
+ "name": "tag_classes_tag_type_code_project_id_tag_types_code_project_id_fk",
+ "tableFrom": "tag_classes",
+ "tableTo": "tag_types",
+ "columnsFrom": [
+ "tag_type_code",
+ "project_id"
+ ],
+ "columnsTo": [
+ "code",
+ "project_id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_code_in_project": {
+ "name": "uniq_code_in_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_subfield_options": {
+ "name": "tag_subfield_options",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_subfield_options_project_id_projects_id_fk": {
+ "name": "tag_subfield_options_project_id_projects_id_fk",
+ "tableFrom": "tag_subfield_options",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_attribute_project_code": {
+ "name": "uniq_attribute_project_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "attributes_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_subfields": {
+ "name": "tag_subfields",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_description": {
+ "name": "attributes_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expression": {
+ "name": "expression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delimiter": {
+ "name": "delimiter",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_subfields_project_id_projects_id_fk": {
+ "name": "tag_subfields_project_id_projects_id_fk",
+ "tableFrom": "tag_subfields",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_tag_type_attribute": {
+ "name": "uniq_tag_type_attribute",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "tag_type_code",
+ "attributes_id"
+ ]
+ },
+ "uniq_attribute_id_project": {
+ "name": "uniq_attribute_id_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "attributes_id",
+ "project_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_type_class_form_mappings": {
+ "name": "tag_type_class_form_mappings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_label": {
+ "name": "tag_type_label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "class_label": {
+ "name": "class_label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ep": {
+ "name": "ep",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_mapping_in_project": {
+ "name": "uniq_mapping_in_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "tag_type_label",
+ "class_label",
+ "form_code",
+ "remark"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_types": {
+ "name": "tag_types",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_types_project_id_projects_id_fk": {
+ "name": "tag_types_project_id_projects_id_fk",
+ "tableFrom": "tag_types",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tag_types_code_project_id_pk": {
+ "name": "tag_types_code_project_id_pk",
+ "columns": [
+ "code",
+ "project_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tags": {
+ "name": "tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tags_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_id": {
+ "name": "form_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_idx": {
+ "name": "tag_idx",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_no": {
+ "name": "tag_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type": {
+ "name": "tag_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "class": {
+ "name": "class",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_class_id": {
+ "name": "tag_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tags_contract_item_id_contract_items_id_fk": {
+ "name": "tags_contract_item_id_contract_items_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tags_form_id_forms_id_fk": {
+ "name": "tags_form_id_forms_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "forms",
+ "columnsFrom": [
+ "form_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tags_tag_class_id_tag_classes_id_fk": {
+ "name": "tags_tag_class_id_tag_classes_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "tag_classes",
+ "columnsFrom": [
+ "tag_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contract_item_tag_idx_unique": {
+ "name": "contract_item_tag_idx_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_item_id",
+ "tag_idx"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_items": {
+ "name": "template_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "form_mapping_id": {
+ "name": "form_mapping_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tmpl_id": {
+ "name": "tmpl_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tmpl_type": {
+ "name": "tmpl_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "spr_lst_setup": {
+ "name": "spr_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "grd_lst_setup": {
+ "name": "grd_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "spr_itm_lst_setup": {
+ "name": "spr_itm_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_items_form_mapping_id_tag_type_class_form_mappings_id_fk": {
+ "name": "template_items_form_mapping_id_tag_type_class_form_mappings_id_fk",
+ "tableFrom": "template_items",
+ "tableTo": "tag_type_class_form_mappings",
+ "columnsFrom": [
+ "form_mapping_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_tmpl_in_form_mapping": {
+ "name": "uniq_tmpl_in_form_mapping",
+ "nullsNotDistinct": false,
+ "columns": [
+ "form_mapping_id",
+ "tmpl_id"
+ ]
+ },
+ "uniq_name_in_form_mapping": {
+ "name": "uniq_name_in_form_mapping",
+ "nullsNotDistinct": false,
+ "columns": [
+ "form_mapping_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_data_report_temps": {
+ "name": "vendor_data_report_temps",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_id": {
+ "name": "form_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_data_report_temps_contract_item_id_contract_items_id_fk": {
+ "name": "vendor_data_report_temps_contract_item_id_contract_items_id_fk",
+ "tableFrom": "vendor_data_report_temps",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_data_report_temps_form_id_forms_id_fk": {
+ "name": "vendor_data_report_temps_form_id_forms_id_fk",
+ "tableFrom": "vendor_data_report_temps",
+ "tableTo": "forms",
+ "columnsFrom": [
+ "form_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.change_logs": {
+ "name": "change_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_id": {
+ "name": "entity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "changed_fields": {
+ "name": "changed_fields",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "old_values": {
+ "name": "old_values",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_values": {
+ "name": "new_values",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_name": {
+ "name": "user_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_synced": {
+ "name": "is_synced",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "sync_attempts": {
+ "name": "sync_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "last_sync_error": {
+ "name": "last_sync_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "synced_at": {
+ "name": "synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_systems": {
+ "name": "target_systems",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'[]'::jsonb"
+ }
+ },
+ "indexes": {
+ "idx_change_logs_vendor_synced": {
+ "name": "idx_change_logs_vendor_synced",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_synced",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_created_at": {
+ "name": "idx_change_logs_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_entity": {
+ "name": "idx_change_logs_entity",
+ "columns": [
+ {
+ "expression": "entity_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "entity_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_sync_attempts": {
+ "name": "idx_change_logs_sync_attempts",
+ "columns": [
+ {
+ "expression": "sync_attempts",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_attachments": {
+ "name": "document_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "document_attachments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upload_id": {
+ "name": "upload_id",
+ "type": "varchar(36)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "varchar(36)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dolce_file_path": {
+ "name": "dolce_file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_attachments_revision_id_revisions_id_fk": {
+ "name": "document_attachments_revision_id_revisions_id_fk",
+ "tableFrom": "document_attachments",
+ "tableTo": "revisions",
+ "columnsFrom": [
+ "revision_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.documents": {
+ "name": "documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "documents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_move_gbn": {
+ "name": "drawing_move_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discipline": {
+ "name": "discipline",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_document_id": {
+ "name": "external_document_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_system_type": {
+ "name": "external_system_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_synced_at": {
+ "name": "external_synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_drawing_no": {
+ "name": "shi_drawing_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager": {
+ "name": "manager",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_enm": {
+ "name": "manager_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_no": {
+ "name": "manager_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group": {
+ "name": "register_group",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group_id": {
+ "name": "register_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_no": {
+ "name": "create_user_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_id": {
+ "name": "create_user_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_enm": {
+ "name": "create_user_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_contract_doc_status": {
+ "name": "unique_contract_doc_status",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_contract_vendor_doc": {
+ "name": "unique_contract_vendor_doc",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"vendor_doc_number\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_external_doc": {
+ "name": "unique_external_doc",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_system_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"external_document_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_project_doc_status": {
+ "name": "unique_project_doc_status",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_external_doc_project": {
+ "name": "unique_external_doc_project",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_system_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"external_document_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "drawing_kind_idx": {
+ "name": "drawing_kind_idx",
+ "columns": [
+ {
+ "expression": "drawing_kind",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "documents_project_id_projects_id_fk": {
+ "name": "documents_project_id_projects_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "documents_contract_id_contracts_id_fk": {
+ "name": "documents_contract_id_contracts_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "documents_vendor_id_vendors_id_fk": {
+ "name": "documents_vendor_id_vendors_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_stages": {
+ "name": "issue_stages",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "issue_stages_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_name": {
+ "name": "stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "plan_date": {
+ "name": "plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actual_date": {
+ "name": "actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stage_status": {
+ "name": "stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "stage_order": {
+ "name": "stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'MEDIUM'"
+ },
+ "assignee_id": {
+ "name": "assignee_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assignee_name": {
+ "name": "assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reminder_days": {
+ "name": "reminder_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_document_stage": {
+ "name": "unique_document_stage",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "document_stage_order": {
+ "name": "document_stage_order",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_order",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_stages_document_id_documents_id_fk": {
+ "name": "issue_stages_document_id_documents_id_fk",
+ "tableFrom": "issue_stages",
+ "tableTo": "documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.revisions": {
+ "name": "revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "revisions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "issue_stage_id": {
+ "name": "issue_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "uploader_type": {
+ "name": "uploader_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'vendor'"
+ },
+ "uploader_id": {
+ "name": "uploader_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploader_name": {
+ "name": "uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage": {
+ "name": "usage",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_type": {
+ "name": "usage_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_status": {
+ "name": "revision_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'SUBMITTED'"
+ },
+ "submitted_date": {
+ "name": "submitted_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_start_date": {
+ "name": "review_start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_date": {
+ "name": "approved_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejected_date": {
+ "name": "rejected_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_id": {
+ "name": "reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_name": {
+ "name": "reviewer_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_upload_id": {
+ "name": "external_upload_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "register_id": {
+ "name": "register_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "unique_stage_revision_usage": {
+ "name": "unique_stage_revision_usage",
+ "columns": [
+ {
+ "expression": "issue_stage_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "usage",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "COALESCE(\"usage_type\", '')",
+ "asc": true,
+ "isExpression": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.stage_documents": {
+ "name": "stage_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "stage_documents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_project_doc": {
+ "name": "unique_project_doc",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_project_vendor_doc": {
+ "name": "unique_project_vendor_doc",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"stage_documents\".\"vendor_doc_number\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_doc_vendor_id_idx": {
+ "name": "stage_doc_vendor_id_idx",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_doc_status_idx": {
+ "name": "stage_doc_status_idx",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "stage_documents_project_id_projects_id_fk": {
+ "name": "stage_documents_project_id_projects_id_fk",
+ "tableFrom": "stage_documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.stage_issue_stages": {
+ "name": "stage_issue_stages",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "stage_issue_stages_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_name": {
+ "name": "stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "plan_date": {
+ "name": "plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actual_date": {
+ "name": "actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stage_status": {
+ "name": "stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "stage_order": {
+ "name": "stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'MEDIUM'"
+ },
+ "assignee_id": {
+ "name": "assignee_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assignee_name": {
+ "name": "assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reminder_days": {
+ "name": "reminder_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_stage_document_stage": {
+ "name": "unique_stage_document_stage",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_document_stage_order": {
+ "name": "stage_document_stage_order",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_order",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "stage_issue_stages_document_id_stage_documents_id_fk": {
+ "name": "stage_issue_stages_document_id_stage_documents_id_fk",
+ "tableFrom": "stage_issue_stages",
+ "tableTo": "stage_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_batches": {
+ "name": "sync_batches",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "batch_size": {
+ "name": "batch_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "retry_count": {
+ "name": "retry_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "change_log_ids": {
+ "name": "change_log_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "success_count": {
+ "name": "success_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "failure_count": {
+ "name": "failure_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_metadata": {
+ "name": "sync_metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_sync_batches_project_system": {
+ "name": "idx_sync_batches_project_system",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_system",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sync_batches_status": {
+ "name": "idx_sync_batches_status",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sync_batches_created_at": {
+ "name": "idx_sync_batches_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_configs": {
+ "name": "sync_configs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_enabled": {
+ "name": "sync_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "sync_interval_minutes": {
+ "name": "sync_interval_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 30
+ },
+ "last_successful_sync": {
+ "name": "last_successful_sync",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_sync_attempt": {
+ "name": "last_sync_attempt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpoint_url": {
+ "name": "endpoint_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_token": {
+ "name": "auth_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_version": {
+ "name": "api_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'v1'"
+ },
+ "max_batch_size": {
+ "name": "max_batch_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 100
+ },
+ "retry_max_attempts": {
+ "name": "retry_max_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_sync_configs_contract_system": {
+ "name": "idx_sync_configs_contract_system",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_system",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_attachments": {
+ "name": "vendor_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'GENERAL'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_attachments_vendor_id_vendors_id_fk": {
+ "name": "vendor_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_candidates": {
+ "name": "vendor_candidates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'COLLECTED'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_candidates_vendor_id_vendors_id_fk": {
+ "name": "vendor_candidates_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_candidates",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_contacts": {
+ "name": "vendor_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_position": {
+ "name": "contact_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_department": {
+ "name": "contact_department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_task": {
+ "name": "contact_task",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_primary": {
+ "name": "is_primary",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_contacts_vendor_id_vendors_id_fk": {
+ "name": "vendor_contacts_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_contacts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_possible_items": {
+ "name": "vendor_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_possible_items_vendor_id_vendors_id_fk": {
+ "name": "vendor_possible_items_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_possible_items",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_possible_items_item_code_items_item_code_fk": {
+ "name": "vendor_possible_items_item_code_items_item_code_fk",
+ "tableFrom": "vendor_possible_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_possible_materials": {
+ "name": "vendor_possible_materials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_possible_materials_vendor_id_vendors_id_fk": {
+ "name": "vendor_possible_materials_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_possible_materials",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_possible_materials_item_code_materials_item_code_fk": {
+ "name": "vendor_possible_materials_item_code_materials_item_code_fk",
+ "tableFrom": "vendor_possible_materials",
+ "tableTo": "materials",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_types": {
+ "name": "vendor_types",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_ko": {
+ "name": "name_ko",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_en": {
+ "name": "name_en",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_types_code_unique": {
+ "name": "vendor_types_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendors": {
+ "name": "vendors",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "vendor_type_id": {
+ "name": "vendor_type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_work_expirence": {
+ "name": "representative_work_expirence",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "corporate_registration_number": {
+ "name": "corporate_registration_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_agency": {
+ "name": "credit_agency",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_rating": {
+ "name": "credit_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cash_flow_rating": {
+ "name": "cash_flow_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "business_size": {
+ "name": "business_size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendors_vendor_type_id_vendor_types_id_fk": {
+ "name": "vendors_vendor_type_id_vendor_types_id_fk",
+ "tableFrom": "vendors",
+ "tableTo": "vendor_types",
+ "columnsFrom": [
+ "vendor_type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tasks": {
+ "name": "tasks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(30)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'todo'"
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bug'"
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'low'"
+ },
+ "archived": {
+ "name": "archived",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "current_timestamp"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "tasks_code_unique": {
+ "name": "tasks_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_candidate_logs": {
+ "name": "vendor_candidate_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_candidate_id": {
+ "name": "vendor_candidate_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_candidate_logs_vendor_candidate_id_vendor_candidates_id_fk": {
+ "name": "vendor_candidate_logs_vendor_candidate_id_vendor_candidates_id_fk",
+ "tableFrom": "vendor_candidate_logs",
+ "tableTo": "vendor_candidates",
+ "columnsFrom": [
+ "vendor_candidate_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_candidate_logs_user_id_users_id_fk": {
+ "name": "vendor_candidate_logs_user_id_users_id_fk",
+ "tableFrom": "vendor_candidate_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendors_logs": {
+ "name": "vendors_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendors_logs_vendor_id_vendors_id_fk": {
+ "name": "vendors_logs_vendor_id_vendors_id_fk",
+ "tableFrom": "vendors_logs",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendors_logs_user_id_users_id_fk": {
+ "name": "vendors_logs_user_id_users_id_fk",
+ "tableFrom": "vendors_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.basic_contract": {
+ "name": "basic_contract",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "basic_contract_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_by": {
+ "name": "requested_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "basic_contract_template_id_basic_contract_templates_id_fk": {
+ "name": "basic_contract_template_id_basic_contract_templates_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "basic_contract_templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_vendor_id_vendors_id_fk": {
+ "name": "basic_contract_vendor_id_vendors_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_requested_by_users_id_fk": {
+ "name": "basic_contract_requested_by_users_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requested_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.basic_contract_templates": {
+ "name": "basic_contract_templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "basic_contract_templates_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "template_name": {
+ "name": "template_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validity_period": {
+ "name": "validity_period",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_review_required": {
+ "name": "legal_review_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "shipbuilding_applicable": {
+ "name": "shipbuilding_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "wind_applicable": {
+ "name": "wind_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "pc_applicable": {
+ "name": "pc_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "nb_applicable": {
+ "name": "nb_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "rc_applicable": {
+ "name": "rc_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "gy_applicable": {
+ "name": "gy_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sys_applicable": {
+ "name": "sys_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "infra_applicable": {
+ "name": "infra_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disposed_at": {
+ "name": "disposed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restored_at": {
+ "name": "restored_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "basic_contract_templates_created_by_users_id_fk": {
+ "name": "basic_contract_templates_created_by_users_id_fk",
+ "tableFrom": "basic_contract_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_templates_updated_by_users_id_fk": {
+ "name": "basic_contract_templates_updated_by_users_id_fk",
+ "tableFrom": "basic_contract_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "template_name_revision_unique": {
+ "name": "template_name_revision_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "template_name",
+ "revision"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.incoterms": {
+ "name": "incoterms",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(20)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.payment_terms": {
+ "name": "payment_terms",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.place_of_shipping": {
+ "name": "place_of_shipping",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(20)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_items": {
+ "name": "pr_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_item": {
+ "name": "rfq_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item": {
+ "name": "pr_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_no": {
+ "name": "pr_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_category": {
+ "name": "material_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "acc": {
+ "name": "acc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "size": {
+ "name": "size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gross_weight": {
+ "name": "gross_weight",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "gw_uom": {
+ "name": "gw_uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_no": {
+ "name": "spec_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_url": {
+ "name": "spec_url",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tracking_no": {
+ "name": "tracking_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_yn": {
+ "name": "major_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "project_def": {
+ "name": "project_def",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_sc": {
+ "name": "project_sc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_kl": {
+ "name": "project_kl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_lc": {
+ "name": "project_lc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_dl": {
+ "name": "project_dl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_items_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "pr_items_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "pr_items",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_attachments": {
+ "name": "procurement_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "procurement_rfq_details_id": {
+ "name": "procurement_rfq_details_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_attachments_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "procurement_attachments_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_attachments_procurement_rfq_details_id_procurement_rfq_details_id_fk": {
+ "name": "procurement_attachments_procurement_rfq_details_id_procurement_rfq_details_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "procurement_rfq_details",
+ "columnsFrom": [
+ "procurement_rfq_details_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_attachments_created_by_users_id_fk": {
+ "name": "procurement_attachments_created_by_users_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "attachment_type_check": {
+ "name": "attachment_type_check",
+ "value": "\"procurement_attachments\".\"procurement_rfqs_id\" IS NOT NULL OR \"procurement_attachments\".\"procurement_rfq_details_id\" IS NOT NULL"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.procurement_quotation_items": {
+ "name": "procurement_quotation_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_price": {
+ "name": "unit_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "vendor_material_code": {
+ "name": "vendor_material_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_material_description": {
+ "name": "vendor_material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "lead_time_in_days": {
+ "name": "lead_time_in_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_rate": {
+ "name": "tax_rate",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_amount": {
+ "name": "tax_amount",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount_rate": {
+ "name": "discount_rate",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount_amount": {
+ "name": "discount_amount",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_alternative": {
+ "name": "is_alternative",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_recommended": {
+ "name": "is_recommended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_quotation_items_quotation_id_procurement_vendor_quotations_id_fk": {
+ "name": "procurement_quotation_items_quotation_id_procurement_vendor_quotations_id_fk",
+ "tableFrom": "procurement_quotation_items",
+ "tableTo": "procurement_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_quotation_items_pr_item_id_pr_items_id_fk": {
+ "name": "procurement_quotation_items_pr_item_id_pr_items_id_fk",
+ "tableFrom": "procurement_quotation_items",
+ "tableTo": "pr_items",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_attachments": {
+ "name": "procurement_rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_attachments_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_attachments_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_comment_id_procurement_rfq_comments_id_fk": {
+ "name": "procurement_rfq_attachments_comment_id_procurement_rfq_comments_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_quotation_id_procurement_vendor_quotations_id_fk": {
+ "name": "procurement_rfq_attachments_quotation_id_procurement_vendor_quotations_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_uploaded_by_users_id_fk": {
+ "name": "procurement_rfq_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_vendor_id_vendors_id_fk": {
+ "name": "procurement_rfq_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_comments": {
+ "name": "procurement_rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_comment": {
+ "name": "is_vendor_comment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_comments_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_comments_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_vendor_id_vendors_id_fk": {
+ "name": "procurement_rfq_comments_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_user_id_users_id_fk": {
+ "name": "procurement_rfq_comments_user_id_users_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_parent_comment_id_procurement_rfq_comments_id_fk": {
+ "name": "procurement_rfq_comments_parent_comment_id_procurement_rfq_comments_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "procurement_rfq_comments",
+ "columnsFrom": [
+ "parent_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_details": {
+ "name": "procurement_rfq_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendors_id": {
+ "name": "vendors_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_detail": {
+ "name": "incoterms_detail",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'VV'"
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_details_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_details_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_vendors_id_vendors_id_fk": {
+ "name": "procurement_rfq_details_vendors_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendors_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_payment_terms_code_payment_terms_code_fk": {
+ "name": "procurement_rfq_details_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_incoterms_code_incoterms_code_fk": {
+ "name": "procurement_rfq_details_incoterms_code_incoterms_code_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_updated_by_users_id_fk": {
+ "name": "procurement_rfq_details_updated_by_users_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfqs": {
+ "name": "procurement_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "series": {
+ "name": "series",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_send_date": {
+ "name": "rfq_send_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'RFQ Created'"
+ },
+ "rfq_sealed_yn": {
+ "name": "rfq_sealed_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sent_by": {
+ "name": "sent_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfqs_sent_by_users_id_fk": {
+ "name": "procurement_rfqs_sent_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "sent_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfqs_created_by_users_id_fk": {
+ "name": "procurement_rfqs_created_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfqs_updated_by_users_id_fk": {
+ "name": "procurement_rfqs_updated_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "procurement_rfqs_rfq_code_unique": {
+ "name": "procurement_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_vendor_quotations": {
+ "name": "procurement_vendor_quotations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quotation_code": {
+ "name": "quotation_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_version": {
+ "name": "quotation_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "total_items_count": {
+ "name": "total_items_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sub_total": {
+ "name": "sub_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "tax_total": {
+ "name": "tax_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "discount_total": {
+ "name": "discount_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "valid_until": {
+ "name": "valid_until",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "estimated_delivery_date": {
+ "name": "estimated_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_detail": {
+ "name": "incoterms_detail",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Draft'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejection_reason": {
+ "name": "rejection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accepted_at": {
+ "name": "accepted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_vendor_quotations_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_vendor_quotations_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_vendor_id_vendors_id_fk": {
+ "name": "procurement_vendor_quotations_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_payment_terms_code_payment_terms_code_fk": {
+ "name": "procurement_vendor_quotations_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_incoterms_code_incoterms_code_fk": {
+ "name": "procurement_vendor_quotations_incoterms_code_incoterms_code_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preset_shares": {
+ "name": "preset_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "preset_id": {
+ "name": "preset_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "shared_with_user_id": {
+ "name": "shared_with_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission": {
+ "name": "permission",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preset_shares_preset_id_table_presets_id_fk": {
+ "name": "preset_shares_preset_id_table_presets_id_fk",
+ "tableFrom": "preset_shares",
+ "tableTo": "table_presets",
+ "columnsFrom": [
+ "preset_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.table_presets": {
+ "name": "table_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "table_id": {
+ "name": "table_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "settings": {
+ "name": "settings",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_shared": {
+ "name": "is_shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_attachments": {
+ "name": "tech_sales_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tech_sales_rfq_id": {
+ "name": "tech_sales_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_attachments_tech_sales_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_attachments_tech_sales_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_attachments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "tech_sales_rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_attachments_created_by_users_id_fk": {
+ "name": "tech_sales_attachments_created_by_users_id_fk",
+ "tableFrom": "tech_sales_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_contact_possible_items": {
+ "name": "tech_sales_contact_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "contact_id": {
+ "name": "contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_possible_item_id": {
+ "name": "vendor_possible_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_contact_possible_items_contact_id_tech_vendor_contacts_id_fk": {
+ "name": "tech_sales_contact_possible_items_contact_id_tech_vendor_contacts_id_fk",
+ "tableFrom": "tech_sales_contact_possible_items",
+ "tableTo": "tech_vendor_contacts",
+ "columnsFrom": [
+ "contact_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_contact_possible_items_vendor_possible_item_id_tech_vendor_possible_items_id_fk": {
+ "name": "tech_sales_contact_possible_items_vendor_possible_item_id_tech_vendor_possible_items_id_fk",
+ "tableFrom": "tech_sales_contact_possible_items",
+ "tableTo": "tech_vendor_possible_items",
+ "columnsFrom": [
+ "vendor_possible_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_comment_attachments": {
+ "name": "tech_sales_rfq_comment_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_comment_attachments_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_comment_id_tech_sales_rfq_comments_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_comment_id_tech_sales_rfq_comments_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_uploaded_by_users_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_comments": {
+ "name": "tech_sales_rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_comment": {
+ "name": "is_vendor_comment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_comments_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_comments_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_rfq_comments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_user_id_users_id_fk": {
+ "name": "tech_sales_rfq_comments_user_id_users_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_parent_comment_id_tech_sales_rfq_comments_id_fk": {
+ "name": "tech_sales_rfq_comments_parent_comment_id_tech_sales_rfq_comments_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_sales_rfq_comments",
+ "columnsFrom": [
+ "parent_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_items": {
+ "name": "tech_sales_rfq_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_shipbuilding_id": {
+ "name": "item_shipbuilding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_offshore_top_id": {
+ "name": "item_offshore_top_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_offshore_hull_id": {
+ "name": "item_offshore_hull_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_type": {
+ "name": "item_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_items_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_items_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_shipbuilding_id_item_shipbuilding_id_fk": {
+ "name": "tech_sales_rfq_items_item_shipbuilding_id_item_shipbuilding_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_shipbuilding",
+ "columnsFrom": [
+ "item_shipbuilding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_offshore_top_id_item_offshore_top_id_fk": {
+ "name": "tech_sales_rfq_items_item_offshore_top_id_item_offshore_top_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_offshore_top",
+ "columnsFrom": [
+ "item_offshore_top_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_offshore_hull_id_item_offshore_hull_id_fk": {
+ "name": "tech_sales_rfq_items_item_offshore_hull_id_item_offshore_hull_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_offshore_hull",
+ "columnsFrom": [
+ "item_offshore_hull_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfqs": {
+ "name": "tech_sales_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_project_id": {
+ "name": "bidding_project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_send_date": {
+ "name": "rfq_send_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'RFQ Created'"
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sent_by": {
+ "name": "sent_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'SHIP'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfqs_bidding_project_id_bidding_projects_id_fk": {
+ "name": "tech_sales_rfqs_bidding_project_id_bidding_projects_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "bidding_project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_sent_by_users_id_fk": {
+ "name": "tech_sales_rfqs_sent_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "sent_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_created_by_users_id_fk": {
+ "name": "tech_sales_rfqs_created_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_updated_by_users_id_fk": {
+ "name": "tech_sales_rfqs_updated_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "tech_sales_rfqs_rfq_code_unique": {
+ "name": "tech_sales_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_attachments": {
+ "name": "tech_sales_vendor_quotation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_vendor_quotation_attachments_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotation_attachments_uploaded_by_users_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotation_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_contacts": {
+ "name": "tech_sales_vendor_quotation_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_id": {
+ "name": "contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_revisions": {
+ "name": "tech_sales_vendor_quotation_revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "snapshot": {
+ "name": "snapshot",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_note": {
+ "name": "revision_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revised_by": {
+ "name": "revised_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revised_at": {
+ "name": "revised_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "tech_sales_quotation_revisions_quotation_version_idx": {
+ "name": "tech_sales_quotation_revisions_quotation_version_idx",
+ "columns": [
+ {
+ "expression": "quotation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "tech_sales_vendor_quotation_revisions_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_vendor_quotation_revisions_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_revisions",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotations": {
+ "name": "tech_sales_vendor_quotations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quotation_code": {
+ "name": "quotation_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_version": {
+ "name": "quotation_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_until": {
+ "name": "valid_until",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_flags": {
+ "name": "vendor_flags",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Assigned'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejection_reason": {
+ "name": "rejection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accepted_at": {
+ "name": "accepted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_vendor_quotations_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_vendor_quotations_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_vendor_quotations",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotations_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_vendor_quotations_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_vendor_quotations",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_rotation_attempts": {
+ "name": "ocr_rotation_attempts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rotation": {
+ "name": "rotation",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "confidence": {
+ "name": "confidence",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tables_found": {
+ "name": "tables_found",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "text_quality": {
+ "name": "text_quality",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "keyword_count": {
+ "name": "keyword_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "extracted_rows_count": {
+ "name": "extracted_rows_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ocr_rotation_attempts_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_rotation_attempts_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_rotation_attempts",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_rows": {
+ "name": "ocr_rows",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "table_id": {
+ "name": "table_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "row_index": {
+ "name": "row_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "report_no": {
+ "name": "report_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "inspection_date": {
+ "name": "inspection_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "no": {
+ "name": "no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identification_no": {
+ "name": "identification_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_no": {
+ "name": "tag_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joint_no": {
+ "name": "joint_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joint_type": {
+ "name": "joint_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "welding_date": {
+ "name": "welding_date",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confidence": {
+ "name": "confidence",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source_table": {
+ "name": "source_table",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source_row": {
+ "name": "source_row",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_ocr_report_no_unique": {
+ "name": "idx_ocr_report_no_unique",
+ "columns": [
+ {
+ "expression": "report_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "tag_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "joint_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "joint_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ocr_rows_table_id_ocr_tables_id_fk": {
+ "name": "ocr_rows_table_id_ocr_tables_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "ocr_tables",
+ "columnsFrom": [
+ "table_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ocr_rows_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_rows_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ocr_rows_user_id_users_id_fk": {
+ "name": "ocr_rows_user_id_users_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_sessions": {
+ "name": "ocr_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "processing_time": {
+ "name": "processing_time",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "best_rotation": {
+ "name": "best_rotation",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_tables": {
+ "name": "total_tables",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_rows": {
+ "name": "total_rows",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "image_enhanced": {
+ "name": "image_enhanced",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "pdf_converted": {
+ "name": "pdf_converted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "warnings": {
+ "name": "warnings",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_tables": {
+ "name": "ocr_tables",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "table_index": {
+ "name": "table_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "row_count": {
+ "name": "row_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ocr_tables_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_tables_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_tables",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfq_attachment_revisions": {
+ "name": "b_rfq_attachment_revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_no": {
+ "name": "revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_comment": {
+ "name": "revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest": {
+ "name": "is_latest",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "latest_revision_idx": {
+ "name": "latest_revision_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_latest",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"b_rfq_attachment_revisions\".\"is_latest\" = $1",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "attachment_revision_idx": {
+ "name": "attachment_revision_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "b_rfq_attachment_revisions_attachment_id_b_rfq_attachments_id_fk": {
+ "name": "b_rfq_attachment_revisions_attachment_id_b_rfq_attachments_id_fk",
+ "tableFrom": "b_rfq_attachment_revisions",
+ "tableTo": "b_rfq_attachments",
+ "columnsFrom": [
+ "attachment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "b_rfq_attachment_revisions_created_by_users_id_fk": {
+ "name": "b_rfq_attachment_revisions_created_by_users_id_fk",
+ "tableFrom": "b_rfq_attachment_revisions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfqs": {
+ "name": "b_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "b_rfqs_project_id_projects_id_fk": {
+ "name": "b_rfqs_project_id_projects_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "b_rfqs_created_by_users_id_fk": {
+ "name": "b_rfqs_created_by_users_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "b_rfqs_updated_by_users_id_fk": {
+ "name": "b_rfqs_updated_by_users_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "b_rfqs_rfq_code_unique": {
+ "name": "b_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfq_attachments": {
+ "name": "b_rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Rev.0'"
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "b_rfq_attachments_rfq_id_b_rfqs_id_fk": {
+ "name": "b_rfq_attachments_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "b_rfq_attachments",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "b_rfq_attachments_created_by_users_id_fk": {
+ "name": "b_rfq_attachments_created_by_users_id_fk",
+ "tableFrom": "b_rfq_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.final_rfq": {
+ "name": "final_rfq",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "final_rfq_status": {
+ "name": "final_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'VV'"
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "firsttime_yn": {
+ "name": "firsttime_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_remark": {
+ "name": "vendor_remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "final_rfq_rfq_id_b_rfqs_id_fk": {
+ "name": "final_rfq_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "final_rfq_vendor_id_vendors_id_fk": {
+ "name": "final_rfq_vendor_id_vendors_id_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "final_rfq_incoterms_code_incoterms_code_fk": {
+ "name": "final_rfq_incoterms_code_incoterms_code_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "final_rfq_payment_terms_code_payment_terms_code_fk": {
+ "name": "final_rfq_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.initial_rfq": {
+ "name": "initial_rfq",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "initial_rfq_status": {
+ "name": "initial_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "rfq_revision": {
+ "name": "rfq_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "initial_rfq_rfq_id_b_rfqs_id_fk": {
+ "name": "initial_rfq_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "initial_rfq_vendor_id_vendors_id_fk": {
+ "name": "initial_rfq_vendor_id_vendors_id_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "initial_rfq_incoterms_code_incoterms_code_fk": {
+ "name": "initial_rfq_incoterms_code_incoterms_code_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_attachment_responses": {
+ "name": "vendor_attachment_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'NOT_RESPONDED'"
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'Rev.0'"
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "vendor_response_idx": {
+ "name": "vendor_response_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "rfq_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_attachment_responses_attachment_id_b_rfq_attachments_id_fk": {
+ "name": "vendor_attachment_responses_attachment_id_b_rfq_attachments_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "b_rfq_attachments",
+ "columnsFrom": [
+ "attachment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_vendor_id_vendors_id_fk": {
+ "name": "vendor_attachment_responses_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_created_by_users_id_fk": {
+ "name": "vendor_attachment_responses_created_by_users_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_updated_by_users_id_fk": {
+ "name": "vendor_attachment_responses_updated_by_users_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_attachments_b": {
+ "name": "vendor_response_attachments_b",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_attachments_b_vendor_response_id_vendor_attachment_responses_id_fk": {
+ "name": "vendor_response_attachments_b_vendor_response_id_vendor_attachment_responses_id_fk",
+ "tableFrom": "vendor_response_attachments_b",
+ "tableTo": "vendor_attachment_responses",
+ "columnsFrom": [
+ "vendor_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_b_uploaded_by_users_id_fk": {
+ "name": "vendor_response_attachments_b_uploaded_by_users_id_fk",
+ "tableFrom": "vendor_response_attachments_b",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_history": {
+ "name": "vendor_response_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_status": {
+ "name": "previous_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_by": {
+ "name": "action_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_at": {
+ "name": "action_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_history_vendor_response_id_vendor_attachment_responses_id_fk": {
+ "name": "vendor_response_history_vendor_response_id_vendor_attachment_responses_id_fk",
+ "tableFrom": "vendor_response_history",
+ "tableTo": "vendor_attachment_responses",
+ "columnsFrom": [
+ "vendor_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_history_action_by_users_id_fk": {
+ "name": "vendor_response_history_action_by_users_id_fk",
+ "tableFrom": "vendor_response_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "action_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_attachments": {
+ "name": "tech_vendor_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'GENERAL'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_contacts": {
+ "name": "tech_vendor_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_position": {
+ "name": "contact_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_title": {
+ "name": "contact_title",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_country": {
+ "name": "contact_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_primary": {
+ "name": "is_primary",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_contacts_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_contacts_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_contacts",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_possible_items": {
+ "name": "tech_vendor_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "shipbuilding_item_id": {
+ "name": "shipbuilding_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "offshore_top_item_id": {
+ "name": "offshore_top_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "offshore_hull_item_id": {
+ "name": "offshore_hull_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_possible_items_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_possible_items_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_shipbuilding_item_id_item_shipbuilding_id_fk": {
+ "name": "tech_vendor_possible_items_shipbuilding_item_id_item_shipbuilding_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_shipbuilding",
+ "columnsFrom": [
+ "shipbuilding_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_offshore_top_item_id_item_offshore_top_id_fk": {
+ "name": "tech_vendor_possible_items_offshore_top_item_id_item_offshore_top_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_offshore_top",
+ "columnsFrom": [
+ "offshore_top_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_offshore_hull_item_id_item_offshore_hull_id_fk": {
+ "name": "tech_vendor_possible_items_offshore_hull_item_id_item_offshore_hull_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_offshore_hull",
+ "columnsFrom": [
+ "offshore_hull_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendors": {
+ "name": "tech_vendors",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_eng": {
+ "name": "country_eng",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_fab": {
+ "name": "country_fab",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_name": {
+ "name": "agent_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_phone": {
+ "name": "agent_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_email": {
+ "name": "agent_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tech_vendor_type": {
+ "name": "tech_vendor_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "is_quote_comparison": {
+ "name": "is_quote_comparison",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_answer_options": {
+ "name": "esg_answer_options",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "esg_evaluation_item_id": {
+ "name": "esg_evaluation_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_text": {
+ "name": "answer_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_answer_options_esg_evaluation_item_id_esg_evaluation_items_id_fk": {
+ "name": "esg_answer_options_esg_evaluation_item_id_esg_evaluation_items_id_fk",
+ "tableFrom": "esg_answer_options",
+ "tableTo": "esg_evaluation_items",
+ "columnsFrom": [
+ "esg_evaluation_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluation_items": {
+ "name": "esg_evaluation_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "esg_evaluation_id": {
+ "name": "esg_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_item": {
+ "name": "evaluation_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_item_description": {
+ "name": "evaluation_item_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_evaluation_items_esg_evaluation_id_esg_evaluations_id_fk": {
+ "name": "esg_evaluation_items_esg_evaluation_id_esg_evaluations_id_fk",
+ "tableFrom": "esg_evaluation_items",
+ "tableTo": "esg_evaluations",
+ "columnsFrom": [
+ "esg_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluation_responses": {
+ "name": "esg_evaluation_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "esg_evaluation_item_id": {
+ "name": "esg_evaluation_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "esg_answer_option_id": {
+ "name": "esg_answer_option_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selected_score": {
+ "name": "selected_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "additional_comments": {
+ "name": "additional_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_evaluation_responses_submission_id_evaluation_submissions_id_fk": {
+ "name": "esg_evaluation_responses_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "esg_evaluation_responses_esg_evaluation_item_id_esg_evaluation_items_id_fk": {
+ "name": "esg_evaluation_responses_esg_evaluation_item_id_esg_evaluation_items_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "esg_evaluation_items",
+ "columnsFrom": [
+ "esg_evaluation_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "esg_evaluation_responses_esg_answer_option_id_esg_answer_options_id_fk": {
+ "name": "esg_evaluation_responses_esg_answer_option_id_esg_answer_options_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "esg_answer_options",
+ "columnsFrom": [
+ "esg_answer_option_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluations": {
+ "name": "esg_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "esg_evaluations_serial_number_unique": {
+ "name": "esg_evaluations_serial_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "serial_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_submissions": {
+ "name": "evaluation_submissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_round": {
+ "name": "evaluation_round",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_status": {
+ "name": "submission_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_by": {
+ "name": "reviewed_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "average_esg_score": {
+ "name": "average_esg_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_general_items": {
+ "name": "total_general_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "completed_general_items": {
+ "name": "completed_general_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "total_esg_items": {
+ "name": "total_esg_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "completed_esg_items": {
+ "name": "completed_esg_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_submissions_periodic_evaluation_id_periodic_evaluations_id_fk": {
+ "name": "evaluation_submissions_periodic_evaluation_id_periodic_evaluations_id_fk",
+ "tableFrom": "evaluation_submissions",
+ "tableTo": "periodic_evaluations",
+ "columnsFrom": [
+ "periodic_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_submissions_company_id_vendors_id_fk": {
+ "name": "evaluation_submissions_company_id_vendors_id_fk",
+ "tableFrom": "evaluation_submissions",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "evaluation_submissions_submission_id_unique": {
+ "name": "evaluation_submissions_submission_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "submission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.general_evaluation_responses": {
+ "name": "general_evaluation_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "general_evaluation_id": {
+ "name": "general_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_text": {
+ "name": "response_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_attachments": {
+ "name": "has_attachments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "general_evaluation_responses_submission_id_evaluation_submissions_id_fk": {
+ "name": "general_evaluation_responses_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "general_evaluation_responses",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "general_evaluation_responses_general_evaluation_id_general_evaluations_id_fk": {
+ "name": "general_evaluation_responses_general_evaluation_id_general_evaluations_id_fk",
+ "tableFrom": "general_evaluation_responses",
+ "tableTo": "general_evaluations",
+ "columnsFrom": [
+ "general_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.general_evaluations": {
+ "name": "general_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "general_evaluations_serial_number_unique": {
+ "name": "general_evaluations_serial_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "serial_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_evaluation_attachments": {
+ "name": "vendor_evaluation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "general_evaluation_response_id": {
+ "name": "general_evaluation_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stored_file_name": {
+ "name": "stored_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_evaluation_attachments_submission_id_evaluation_submissions_id_fk": {
+ "name": "vendor_evaluation_attachments_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "vendor_evaluation_attachments",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_evaluation_attachments_general_evaluation_response_id_general_evaluation_responses_id_fk": {
+ "name": "vendor_evaluation_attachments_general_evaluation_response_id_general_evaluation_responses_id_fk",
+ "tableFrom": "vendor_evaluation_attachments",
+ "tableTo": "general_evaluation_responses",
+ "columnsFrom": [
+ "general_evaluation_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_evaluation_attachments_file_id_unique": {
+ "name": "vendor_evaluation_attachments_file_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "file_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_target_reviewers": {
+ "name": "evaluation_target_reviewers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name_from": {
+ "name": "department_name_from",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "assigned_by": {
+ "name": "assigned_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_target_reviewers_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "evaluation_target_reviewers_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviewers_reviewer_user_id_users_id_fk": {
+ "name": "evaluation_target_reviewers_reviewer_user_id_users_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "reviewer_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviewers_assigned_by_users_id_fk": {
+ "name": "evaluation_target_reviewers_assigned_by_users_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "assigned_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_target_department": {
+ "name": "unique_target_department",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_target_reviews": {
+ "name": "evaluation_target_reviews",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_approved": {
+ "name": "is_approved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comment": {
+ "name": "review_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_target_reviews_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "evaluation_target_reviews_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "evaluation_target_reviews",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviews_reviewer_user_id_users_id_fk": {
+ "name": "evaluation_target_reviews_reviewer_user_id_users_id_fk",
+ "tableFrom": "evaluation_target_reviews",
+ "tableTo": "users",
+ "columnsFrom": [
+ "reviewer_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_target_reviewer": {
+ "name": "unique_target_reviewer",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "reviewer_user_id",
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_targets": {
+ "name": "evaluation_targets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_user_id": {
+ "name": "admin_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_targets_vendor_id_vendors_id_fk": {
+ "name": "evaluation_targets_vendor_id_vendors_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_targets_admin_user_id_users_id_fk": {
+ "name": "evaluation_targets_admin_user_id_users_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "admin_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_targets_confirmed_by_users_id_fk": {
+ "name": "evaluation_targets_confirmed_by_users_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "confirmed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.periodic_evaluations": {
+ "name": "periodic_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_grade": {
+ "name": "evaluation_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "periodic_evaluations_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "periodic_evaluations_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "periodic_evaluations",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "periodic_evaluations_finalized_by_users_id_fk": {
+ "name": "periodic_evaluations_finalized_by_users_id_fk",
+ "tableFrom": "periodic_evaluations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "finalized_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_evaluation_target": {
+ "name": "unique_evaluation_target",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "evaluation_period"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluation_attachments": {
+ "name": "reviewer_evaluation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reviewer_evaluation_detail_id": {
+ "name": "reviewer_evaluation_detail_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stored_file_name": {
+ "name": "stored_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_path": {
+ "name": "public_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_extension": {
+ "name": "file_extension",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "reviewer_evaluation_detail_id_idx": {
+ "name": "reviewer_evaluation_detail_id_idx",
+ "columns": [
+ {
+ "expression": "reviewer_evaluation_detail_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "reviewer_evaluation_attachments_reviewer_evaluation_detail_id_reviewer_evaluation_details_id_fk": {
+ "name": "reviewer_evaluation_attachments_reviewer_evaluation_detail_id_reviewer_evaluation_details_id_fk",
+ "tableFrom": "reviewer_evaluation_attachments",
+ "tableTo": "reviewer_evaluation_details",
+ "columnsFrom": [
+ "reviewer_evaluation_detail_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluation_attachments_uploaded_by_users_id_fk": {
+ "name": "reviewer_evaluation_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "reviewer_evaluation_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluation_details": {
+ "name": "reviewer_evaluation_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reviewer_evaluation_id": {
+ "name": "reviewer_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reg_eval_criteria_details_id": {
+ "name": "reg_eval_criteria_details_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reviewer_evaluation_details_reviewer_evaluation_id_reviewer_evaluations_id_fk": {
+ "name": "reviewer_evaluation_details_reviewer_evaluation_id_reviewer_evaluations_id_fk",
+ "tableFrom": "reviewer_evaluation_details",
+ "tableTo": "reviewer_evaluations",
+ "columnsFrom": [
+ "reviewer_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluation_details_reg_eval_criteria_details_id_reg_eval_criteria_details_id_fk": {
+ "name": "reviewer_evaluation_details_reg_eval_criteria_details_id_reg_eval_criteria_details_id_fk",
+ "tableFrom": "reviewer_evaluation_details",
+ "tableTo": "reg_eval_criteria_details",
+ "columnsFrom": [
+ "reg_eval_criteria_details_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_reviewer_criteria": {
+ "name": "unique_reviewer_criteria",
+ "nullsNotDistinct": false,
+ "columns": [
+ "reviewer_evaluation_id",
+ "reg_eval_criteria_details_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluations": {
+ "name": "reviewer_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_target_reviewer_id": {
+ "name": "evaluation_target_reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_completed": {
+ "name": "is_completed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reviewer_evaluations_periodic_evaluation_id_periodic_evaluations_id_fk": {
+ "name": "reviewer_evaluations_periodic_evaluation_id_periodic_evaluations_id_fk",
+ "tableFrom": "reviewer_evaluations",
+ "tableTo": "periodic_evaluations",
+ "columnsFrom": [
+ "periodic_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluations_evaluation_target_reviewer_id_evaluation_target_reviewers_id_fk": {
+ "name": "reviewer_evaluations_evaluation_target_reviewer_id_evaluation_target_reviewers_id_fk",
+ "tableFrom": "reviewer_evaluations",
+ "tableTo": "evaluation_target_reviewers",
+ "columnsFrom": [
+ "evaluation_target_reviewer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_reviewer_evaluation": {
+ "name": "unique_reviewer_evaluation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "periodic_evaluation_id",
+ "evaluation_target_reviewer_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reg_eval_criteria": {
+ "name": "reg_eval_criteria",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "category2": {
+ "name": "category2",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'processScore'"
+ },
+ "item": {
+ "name": "item",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "range": {
+ "name": "range",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_score_min ": {
+ "name": "variable_score_min ",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_score_max ": {
+ "name": "variable_score_max ",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_score_unit ": {
+ "name": "variable_score_unit ",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_type": {
+ "name": "score_type",
+ "type": "score_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'fixed'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reg_eval_criteria_created_by_users_id_fk": {
+ "name": "reg_eval_criteria_created_by_users_id_fk",
+ "tableFrom": "reg_eval_criteria",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "reg_eval_criteria_updated_by_users_id_fk": {
+ "name": "reg_eval_criteria_updated_by_users_id_fk",
+ "tableFrom": "reg_eval_criteria",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reg_eval_criteria_details": {
+ "name": "reg_eval_criteria_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score_equip_ship": {
+ "name": "score_equip_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_equip_marine": {
+ "name": "score_equip_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_ship": {
+ "name": "score_bulk_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_marine": {
+ "name": "score_bulk_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reg_eval_criteria_details_criteria_id_reg_eval_criteria_id_fk": {
+ "name": "reg_eval_criteria_details_criteria_id_reg_eval_criteria_id_fk",
+ "tableFrom": "reg_eval_criteria_details",
+ "tableTo": "reg_eval_criteria",
+ "columnsFrom": [
+ "criteria_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_gtc_files": {
+ "name": "project_gtc_files",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_gtc_files_project_id_projects_id_fk": {
+ "name": "project_gtc_files_project_id_projects_id_fk",
+ "tableFrom": "project_gtc_files",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.menu_assignments": {
+ "name": "menu_assignments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "menu_assignments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "menu_path": {
+ "name": "menu_path",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "menu_title": {
+ "name": "menu_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "menu_description": {
+ "name": "menu_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "menu_group": {
+ "name": "menu_group",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "section_title": {
+ "name": "section_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'evcp'"
+ },
+ "manager1_id": {
+ "name": "manager1_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager2_id": {
+ "name": "manager2_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "menu_assignments_path_idx": {
+ "name": "menu_assignments_path_idx",
+ "columns": [
+ {
+ "expression": "menu_path",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_manager1_idx": {
+ "name": "menu_assignments_manager1_idx",
+ "columns": [
+ {
+ "expression": "manager1_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_manager2_idx": {
+ "name": "menu_assignments_manager2_idx",
+ "columns": [
+ {
+ "expression": "manager2_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_domain_idx": {
+ "name": "menu_assignments_domain_idx",
+ "columns": [
+ {
+ "expression": "domain",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "menu_assignments_manager1_id_users_id_fk": {
+ "name": "menu_assignments_manager1_id_users_id_fk",
+ "tableFrom": "menu_assignments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "manager1_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "menu_assignments_manager2_id_users_id_fk": {
+ "name": "menu_assignments_manager2_id_users_id_fk",
+ "tableFrom": "menu_assignments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "manager2_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "menu_assignments_menu_path_unique": {
+ "name": "menu_assignments_menu_path_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "menu_path"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.page_information": {
+ "name": "page_information",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "page_path": {
+ "name": "page_path",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "page_name": {
+ "name": "page_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "information_content": {
+ "name": "information_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_file_name": {
+ "name": "attachment_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_file_path": {
+ "name": "attachment_file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_file_size": {
+ "name": "attachment_file_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "page_information_page_path_unique": {
+ "name": "page_information_page_path_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "page_path"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna": {
+ "name": "qna",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "qna_category",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_qna_author": {
+ "name": "idx_qna_author",
+ "columns": [
+ {
+ "expression": "author",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_author_users_id_fk": {
+ "name": "qna_author_users_id_fk",
+ "tableFrom": "qna",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna_answer": {
+ "name": "qna_answer",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "qna_id": {
+ "name": "qna_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_answer_qna": {
+ "name": "idx_answer_qna",
+ "columns": [
+ {
+ "expression": "qna_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_answer_author": {
+ "name": "idx_answer_author",
+ "columns": [
+ {
+ "expression": "author",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_answer_qna_id_qna_id_fk": {
+ "name": "qna_answer_qna_id_qna_id_fk",
+ "tableFrom": "qna_answer",
+ "tableTo": "qna",
+ "columnsFrom": [
+ "qna_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "qna_answer_author_users_id_fk": {
+ "name": "qna_answer_author_users_id_fk",
+ "tableFrom": "qna_answer",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna_comments": {
+ "name": "qna_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_id": {
+ "name": "answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_comment_answer": {
+ "name": "idx_comment_answer",
+ "columns": [
+ {
+ "expression": "answer_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_comment_parent": {
+ "name": "idx_comment_parent",
+ "columns": [
+ {
+ "expression": "parent_comment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_comments_author_users_id_fk": {
+ "name": "qna_comments_author_users_id_fk",
+ "tableFrom": "qna_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "qna_comments_answer_id_qna_answer_id_fk": {
+ "name": "qna_comments_answer_id_qna_answer_id_fk",
+ "tableFrom": "qna_comments",
+ "tableTo": "qna_answer",
+ "columnsFrom": [
+ "answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notice": {
+ "name": "notice",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "page_path": {
+ "name": "page_path",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author_id": {
+ "name": "author_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notice_author_id_users_id_fk": {
+ "name": "notice_author_id_users_id_fk",
+ "tableFrom": "notice",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.daily_access_stats": {
+ "name": "daily_access_stats",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "date": {
+ "name": "date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_visits": {
+ "name": "total_visits",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "unique_users": {
+ "name": "unique_users",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_sessions": {
+ "name": "total_sessions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "avg_session_duration": {
+ "name": "avg_session_duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_download_logs": {
+ "name": "file_download_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_email": {
+ "name": "user_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_name": {
+ "name": "user_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_role": {
+ "name": "user_role",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_ip": {
+ "name": "user_ip",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "downloaded_at": {
+ "name": "downloaded_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_id": {
+ "name": "request_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "referer": {
+ "name": "referer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "download_duration_ms": {
+ "name": "download_duration_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.login_sessions": {
+ "name": "login_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "login_at": {
+ "name": "login_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "logout_at": {
+ "name": "logout_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_token": {
+ "name": "session_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "nextauth_session_id": {
+ "name": "nextauth_session_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_method": {
+ "name": "auth_method",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "last_activity_at": {
+ "name": "last_activity_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "session_expired_at": {
+ "name": "session_expired_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "login_sessions_user_id_users_id_fk": {
+ "name": "login_sessions_user_id_users_id_fk",
+ "tableFrom": "login_sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "login_sessions_session_token_unique": {
+ "name": "login_sessions_session_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "session_token"
+ ]
+ },
+ "login_sessions_nextauth_session_id_unique": {
+ "name": "login_sessions_nextauth_session_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "nextauth_session_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.page_visits": {
+ "name": "page_visits",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "route": {
+ "name": "route",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "page_title": {
+ "name": "page_title",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "referrer": {
+ "name": "referrer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "visited_at": {
+ "name": "visited_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "query_params": {
+ "name": "query_params",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "browser_name": {
+ "name": "browser_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "os_name": {
+ "name": "os_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "page_visits_user_id_users_id_fk": {
+ "name": "page_visits_user_id_users_id_fk",
+ "tableFrom": "page_visits",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "page_visits_session_id_login_sessions_id_fk": {
+ "name": "page_visits_session_id_login_sessions_id_fk",
+ "tableFrom": "page_visits",
+ "tableTo": "login_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.temp_auth_sessions": {
+ "name": "temp_auth_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "temp_auth_key": {
+ "name": "temp_auth_key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_method": {
+ "name": "auth_method",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_used": {
+ "name": "is_used",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "temp_auth_sessions_user_id_users_id_fk": {
+ "name": "temp_auth_sessions_user_id_users_id_fk",
+ "tableFrom": "temp_auth_sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "temp_auth_sessions_temp_auth_key_unique": {
+ "name": "temp_auth_sessions_temp_auth_key_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "temp_auth_key"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_download_stats": {
+ "name": "user_download_stats",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "date": {
+ "name": "date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_downloads": {
+ "name": "total_downloads",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_bytes": {
+ "name": "total_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "unique_files": {
+ "name": "unique_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_download_at": {
+ "name": "last_download_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notifications": {
+ "name": "notifications",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "related_record_id": {
+ "name": "related_record_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "related_record_type": {
+ "name": "related_record_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "read_at": {
+ "name": "read_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_notifications_user_id": {
+ "name": "idx_notifications_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_created_at": {
+ "name": "idx_notifications_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_is_read": {
+ "name": "idx_notifications_is_read",
+ "columns": [
+ {
+ "expression": "is_read",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_user_read": {
+ "name": "idx_notifications_user_read",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_read",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_history": {
+ "name": "template_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_description": {
+ "name": "change_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_by": {
+ "name": "changed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_history_template_id_templates_id_fk": {
+ "name": "template_history_template_id_templates_id_fk",
+ "tableFrom": "template_history",
+ "tableTo": "templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "template_history_changed_by_users_id_fk": {
+ "name": "template_history_changed_by_users_id_fk",
+ "tableFrom": "template_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "changed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_variables": {
+ "name": "template_variables",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_name": {
+ "name": "variable_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_type": {
+ "name": "variable_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "default_value": {
+ "name": "default_value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validation_rule": {
+ "name": "validation_rule",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_variables_template_id_templates_id_fk": {
+ "name": "template_variables_template_id_templates_id_fk",
+ "tableFrom": "template_variables",
+ "tableTo": "templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.templates": {
+ "name": "templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sample_data": {
+ "name": "sample_data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{}'::jsonb"
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "templates_created_by_users_id_fk": {
+ "name": "templates_created_by_users_id_fk",
+ "tableFrom": "templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "templates_slug_unique": {
+ "name": "templates_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_clauses": {
+ "name": "gtc_clauses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_clauses_document_item_number_idx": {
+ "name": "gtc_clauses_document_item_number_idx",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "item_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_document_idx": {
+ "name": "gtc_clauses_document_idx",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_parent_idx": {
+ "name": "gtc_clauses_parent_idx",
+ "columns": [
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_full_path_idx": {
+ "name": "gtc_clauses_full_path_idx",
+ "columns": [
+ {
+ "expression": "full_path",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_clauses_document_id_gtc_documents_id_fk": {
+ "name": "gtc_clauses_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_clauses_created_by_id_users_id_fk": {
+ "name": "gtc_clauses_created_by_id_users_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_clauses_updated_by_id_users_id_fk": {
+ "name": "gtc_clauses_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_documents": {
+ "name": "gtc_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {
+ "gtc_project_revision_idx": {
+ "name": "gtc_project_revision_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_type_idx": {
+ "name": "gtc_type_idx",
+ "columns": [
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_project_idx": {
+ "name": "gtc_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_created_at_idx": {
+ "name": "gtc_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_updated_at_idx": {
+ "name": "gtc_updated_at_idx",
+ "columns": [
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_documents_project_id_projects_id_fk": {
+ "name": "gtc_documents_project_id_projects_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_documents_created_by_id_users_id_fk": {
+ "name": "gtc_documents_created_by_id_users_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_documents_updated_by_id_users_id_fk": {
+ "name": "gtc_documents_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_negotiation_history": {
+ "name": "gtc_negotiation_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_clause_id": {
+ "name": "vendor_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_status": {
+ "name": "previous_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_fields": {
+ "name": "changed_fields",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachments": {
+ "name": "attachments",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_type": {
+ "name": "actor_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "actor_id": {
+ "name": "actor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_name": {
+ "name": "actor_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_email": {
+ "name": "actor_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "gtc_negotiation_history_vendor_clause_idx": {
+ "name": "gtc_negotiation_history_vendor_clause_idx",
+ "columns": [
+ {
+ "expression": "vendor_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_negotiation_history_action_idx": {
+ "name": "gtc_negotiation_history_action_idx",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_negotiation_history_created_at_idx": {
+ "name": "gtc_negotiation_history_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_negotiation_history_vendor_clause_id_gtc_vendor_clauses_id_fk": {
+ "name": "gtc_negotiation_history_vendor_clause_id_gtc_vendor_clauses_id_fk",
+ "tableFrom": "gtc_negotiation_history",
+ "tableTo": "gtc_vendor_clauses",
+ "columnsFrom": [
+ "vendor_clause_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_negotiation_history_actor_id_users_id_fk": {
+ "name": "gtc_negotiation_history_actor_id_users_id_fk",
+ "tableFrom": "gtc_negotiation_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "actor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_templates": {
+ "name": "gtc_templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'1.0'"
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_metadata": {
+ "name": "variable_metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_templates_name_idx": {
+ "name": "gtc_templates_name_idx",
+ "columns": [
+ {
+ "expression": "name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_templates_is_default_idx": {
+ "name": "gtc_templates_is_default_idx",
+ "columns": [
+ {
+ "expression": "is_default",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_templates_document_id_gtc_documents_id_fk": {
+ "name": "gtc_templates_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_templates_created_by_id_users_id_fk": {
+ "name": "gtc_templates_created_by_id_users_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_templates_updated_by_id_users_id_fk": {
+ "name": "gtc_templates_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_vendor_clauses": {
+ "name": "gtc_vendor_clauses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_document_id": {
+ "name": "vendor_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_clause_id": {
+ "name": "base_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_item_number": {
+ "name": "modified_item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_category": {
+ "name": "modified_category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_subtitle": {
+ "name": "modified_subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_content": {
+ "name": "modified_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_number_modified": {
+ "name": "is_number_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_category_modified": {
+ "name": "is_category_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_subtitle_modified": {
+ "name": "is_subtitle_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_content_modified": {
+ "name": "is_content_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_note": {
+ "name": "negotiation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_excluded": {
+ "name": "is_excluded",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_vendor_clauses_vendor_base_idx": {
+ "name": "gtc_vendor_clauses_vendor_base_idx",
+ "columns": [
+ {
+ "expression": "vendor_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "base_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_vendor_document_idx": {
+ "name": "gtc_vendor_clauses_vendor_document_idx",
+ "columns": [
+ {
+ "expression": "vendor_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_base_clause_idx": {
+ "name": "gtc_vendor_clauses_base_clause_idx",
+ "columns": [
+ {
+ "expression": "base_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_parent_idx": {
+ "name": "gtc_vendor_clauses_parent_idx",
+ "columns": [
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_review_status_idx": {
+ "name": "gtc_vendor_clauses_review_status_idx",
+ "columns": [
+ {
+ "expression": "review_status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_vendor_clauses_vendor_document_id_gtc_vendor_documents_id_fk": {
+ "name": "gtc_vendor_clauses_vendor_document_id_gtc_vendor_documents_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "gtc_vendor_documents",
+ "columnsFrom": [
+ "vendor_document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_base_clause_id_gtc_clauses_id_fk": {
+ "name": "gtc_vendor_clauses_base_clause_id_gtc_clauses_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "gtc_clauses",
+ "columnsFrom": [
+ "base_clause_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_created_by_id_users_id_fk": {
+ "name": "gtc_vendor_clauses_created_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_updated_by_id_users_id_fk": {
+ "name": "gtc_vendor_clauses_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_vendor_documents": {
+ "name": "gtc_vendor_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "base_document_id": {
+ "name": "base_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'1.0'"
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_start_date": {
+ "name": "negotiation_start_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "negotiation_end_date": {
+ "name": "negotiation_end_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_date": {
+ "name": "approval_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_name": {
+ "name": "final_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_path": {
+ "name": "final_file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_size": {
+ "name": "final_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_vendor_documents_base_vendor_idx": {
+ "name": "gtc_vendor_documents_base_vendor_idx",
+ "columns": [
+ {
+ "expression": "base_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_vendor_idx": {
+ "name": "gtc_vendor_documents_vendor_idx",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_base_document_idx": {
+ "name": "gtc_vendor_documents_base_document_idx",
+ "columns": [
+ {
+ "expression": "base_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_review_status_idx": {
+ "name": "gtc_vendor_documents_review_status_idx",
+ "columns": [
+ {
+ "expression": "review_status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_vendor_documents_base_document_id_gtc_documents_id_fk": {
+ "name": "gtc_vendor_documents_base_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "base_document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_vendor_id_vendors_id_fk": {
+ "name": "gtc_vendor_documents_vendor_id_vendors_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_created_by_id_users_id_fk": {
+ "name": "gtc_vendor_documents_created_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_updated_by_id_users_id_fk": {
+ "name": "gtc_vendor_documents_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.code_groups": {
+ "name": "code_groups",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_format": {
+ "name": "code_format",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expressions": {
+ "name": "expressions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "control_type": {
+ "name": "control_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "code_groups_project_id_projects_id_fk": {
+ "name": "code_groups_project_id_projects_id_fk",
+ "tableFrom": "code_groups",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_group_id": {
+ "name": "unique_project_group_id",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.combo_box_settings": {
+ "name": "combo_box_settings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "combo_box_settings_code_group_id_code_groups_id_fk": {
+ "name": "combo_box_settings_code_group_id_code_groups_id_fk",
+ "tableFrom": "combo_box_settings",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_code_group_code": {
+ "name": "unique_code_group_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code_group_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_class_options_new": {
+ "name": "document_class_options_new",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_class_id": {
+ "name": "document_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "option_code": {
+ "name": "option_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_class_options_new_document_class_id_document_classes_id_fk": {
+ "name": "document_class_options_new_document_class_id_document_classes_id_fk",
+ "tableFrom": "document_class_options_new",
+ "tableTo": "document_classes",
+ "columnsFrom": [
+ "document_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_document_class_option": {
+ "name": "unique_document_class_option",
+ "nullsNotDistinct": false,
+ "columns": [
+ "document_class_id",
+ "option_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_classes": {
+ "name": "document_classes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_classes_project_id_projects_id_fk": {
+ "name": "document_classes_project_id_projects_id_fk",
+ "tableFrom": "document_classes",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "document_classes_code_group_id_code_groups_id_fk": {
+ "name": "document_classes_code_group_id_code_groups_id_fk",
+ "tableFrom": "document_classes",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_code": {
+ "name": "unique_project_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "code"
+ ]
+ },
+ "unique_project_value": {
+ "name": "unique_project_value",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "value"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_number_type_configs": {
+ "name": "document_number_type_configs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_number_type_id": {
+ "name": "document_number_type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sdq": {
+ "name": "sdq",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_number_type_configs_document_number_type_id_document_number_types_id_fk": {
+ "name": "document_number_type_configs_document_number_type_id_document_number_types_id_fk",
+ "tableFrom": "document_number_type_configs",
+ "tableTo": "document_number_types",
+ "columnsFrom": [
+ "document_number_type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "document_number_type_configs_code_group_id_code_groups_id_fk": {
+ "name": "document_number_type_configs_code_group_id_code_groups_id_fk",
+ "tableFrom": "document_number_type_configs",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_document_number_type_sdq": {
+ "name": "unique_document_number_type_sdq",
+ "nullsNotDistinct": false,
+ "columns": [
+ "document_number_type_id",
+ "sdq"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_number_types": {
+ "name": "document_number_types",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_number_types_project_id_projects_id_fk": {
+ "name": "document_number_types_project_id_projects_id_fk",
+ "tableFrom": "document_number_types",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_name": {
+ "name": "unique_project_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_attachments": {
+ "name": "legal_work_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_auto_generated": {
+ "name": "is_auto_generated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'request'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_attachments_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_attachments_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_attachments",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_requests": {
+ "name": "legal_work_requests",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_department": {
+ "name": "review_department",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inquiry_type": {
+ "name": "inquiry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "request_content": {
+ "name": "request_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "contract_project_name": {
+ "name": "contract_project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_amount": {
+ "name": "contract_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_counterparty": {
+ "name": "contract_counterparty",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "counterparty_type": {
+ "name": "counterparty_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "factual_relation": {
+ "name": "factual_relation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_number": {
+ "name": "project_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipowner_orderer": {
+ "name": "shipowner_orderer",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "governing_law": {
+ "name": "governing_law",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_type": {
+ "name": "project_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_requests_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_requests_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_requests",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_responses": {
+ "name": "legal_work_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_content": {
+ "name": "response_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_reviewer": {
+ "name": "response_reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_confirmer": {
+ "name": "response_confirmer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_approver": {
+ "name": "response_approver",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_re_revision": {
+ "name": "is_re_revision",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "parent_response_id": {
+ "name": "parent_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_responses_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_responses_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_responses",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_works": {
+ "name": "legal_works",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_urgent": {
+ "name": "is_urgent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "request_date": {
+ "name": "request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consultation_date": {
+ "name": "consultation_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expected_answer_date": {
+ "name": "expected_answer_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_completion_date": {
+ "name": "legal_completion_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer": {
+ "name": "reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_responder": {
+ "name": "legal_responder",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachment": {
+ "name": "has_attachment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_works_company_id_vendors_id_fk": {
+ "name": "legal_works_company_id_vendors_id_fk",
+ "tableFrom": "legal_works",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.consent_logs": {
+ "name": "consent_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "consent_logs_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_type": {
+ "name": "consent_type",
+ "type": "consent_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "consent_action",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "policy_version": {
+ "name": "policy_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_timestamp": {
+ "name": "action_timestamp",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "additional_data": {
+ "name": "additional_data",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "consent_logs_user_action_timestamp_idx": {
+ "name": "consent_logs_user_action_timestamp_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "action_timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "consent_logs_consent_type_idx": {
+ "name": "consent_logs_consent_type_idx",
+ "columns": [
+ {
+ "expression": "consent_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "consent_logs_action_idx": {
+ "name": "consent_logs_action_idx",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "consent_logs_user_id_users_id_fk": {
+ "name": "consent_logs_user_id_users_id_fk",
+ "tableFrom": "consent_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.policy_versions": {
+ "name": "policy_versions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "policy_versions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "policy_type": {
+ "name": "policy_type",
+ "type": "policy_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "effective_date": {
+ "name": "effective_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_current": {
+ "name": "is_current",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "policy_versions_type_version_idx": {
+ "name": "policy_versions_type_version_idx",
+ "columns": [
+ {
+ "expression": "policy_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "policy_versions_current_idx": {
+ "name": "policy_versions_current_idx",
+ "columns": [
+ {
+ "expression": "is_current",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "policy_versions_effective_date_idx": {
+ "name": "policy_versions_effective_date_idx",
+ "columns": [
+ {
+ "expression": "effective_date",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_consents": {
+ "name": "user_consents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_consents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_type": {
+ "name": "consent_type",
+ "type": "consent_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_status": {
+ "name": "consent_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "policy_version": {
+ "name": "policy_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consented_at": {
+ "name": "consented_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revoke_reason": {
+ "name": "revoke_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "user_consents_user_type_idx": {
+ "name": "user_consents_user_type_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "consent_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_consents_consented_at_idx": {
+ "name": "user_consents_consented_at_idx",
+ "columns": [
+ {
+ "expression": "consented_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_consents_policy_version_idx": {
+ "name": "user_consents_policy_version_idx",
+ "columns": [
+ {
+ "expression": "policy_version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_consents_user_id_users_id_fk": {
+ "name": "user_consents_user_id_users_id_fk",
+ "tableFrom": "user_consents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_companies": {
+ "name": "bidding_companies",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "invitation_status": {
+ "name": "invitation_status",
+ "type": "invitation_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "invited_at": {
+ "name": "invited_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_amount": {
+ "name": "pre_quote_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_submitted_at": {
+ "name": "pre_quote_submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote_selected": {
+ "name": "is_pre_quote_selected",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "final_quote_amount": {
+ "name": "final_quote_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_quote_submitted_at": {
+ "name": "final_quote_submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_winner": {
+ "name": "is_winner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_companies_bidding_id_biddings_id_fk": {
+ "name": "bidding_companies_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_companies",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_companies_company_id_vendors_id_fk": {
+ "name": "bidding_companies_company_id_vendors_id_fk",
+ "tableFrom": "bidding_companies",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_conditions": {
+ "name": "bidding_conditions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_conditions": {
+ "name": "tax_conditions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_delivery_date": {
+ "name": "contract_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_price_adjustment_applicable": {
+ "name": "is_price_adjustment_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_port": {
+ "name": "shipping_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destination_port": {
+ "name": "destination_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spare_part_options": {
+ "name": "spare_part_options",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_conditions_bidding_id_biddings_id_fk": {
+ "name": "bidding_conditions_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_conditions",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_documents": {
+ "name": "bidding_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "specification_meeting_id": {
+ "name": "specification_meeting_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "document_type": {
+ "name": "document_type",
+ "type": "document_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_documents_bidding_id_biddings_id_fk": {
+ "name": "bidding_documents_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_company_id_vendors_id_fk": {
+ "name": "bidding_documents_company_id_vendors_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_pr_item_id_pr_items_for_bidding_id_fk": {
+ "name": "bidding_documents_pr_item_id_pr_items_for_bidding_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "pr_items_for_bidding",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_specification_meeting_id_specification_meetings_id_fk": {
+ "name": "bidding_documents_specification_meeting_id_specification_meetings_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "specification_meetings",
+ "columnsFrom": [
+ "specification_meeting_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_notice_template": {
+ "name": "bidding_notice_template",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'standard'"
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'표준 입찰공고문'"
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.biddings": {
+ "name": "biddings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_number": {
+ "name": "bidding_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "contract_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bidding_type": {
+ "name": "bidding_type",
+ "type": "bidding_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "award_count": {
+ "name": "award_count",
+ "type": "award_count",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'single'"
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_date": {
+ "name": "pre_quote_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_registration_date": {
+ "name": "bidding_registration_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_start_date": {
+ "name": "submission_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_end_date": {
+ "name": "submission_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_date": {
+ "name": "evaluation_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_specification_meeting": {
+ "name": "has_specification_meeting",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "budget": {
+ "name": "budget",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_price": {
+ "name": "target_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_bid_price": {
+ "name": "final_bid_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_pr_document": {
+ "name": "has_pr_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "status": {
+ "name": "status",
+ "type": "bidding_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bidding_generated'"
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_email": {
+ "name": "manager_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_phone": {
+ "name": "manager_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "biddings_project_id_projects_id_fk": {
+ "name": "biddings_project_id_projects_id_fk",
+ "tableFrom": "biddings",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "biddings_bidding_number_unique": {
+ "name": "biddings_bidding_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "bidding_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_condition_responses": {
+ "name": "company_condition_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_company_id": {
+ "name": "bidding_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms_response": {
+ "name": "payment_terms_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_conditions_response": {
+ "name": "tax_conditions_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_contract_delivery_date": {
+ "name": "proposed_contract_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "price_adjustment_response": {
+ "name": "price_adjustment_response",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_response": {
+ "name": "incoterms_response",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_shipping_port": {
+ "name": "proposed_shipping_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_destination_port": {
+ "name": "proposed_destination_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spare_part_response": {
+ "name": "spare_part_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "additional_proposals": {
+ "name": "additional_proposals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote": {
+ "name": "is_pre_quote",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "company_condition_responses_bidding_company_id_bidding_companies_id_fk": {
+ "name": "company_condition_responses_bidding_company_id_bidding_companies_id_fk",
+ "tableFrom": "company_condition_responses",
+ "tableTo": "bidding_companies",
+ "columnsFrom": [
+ "bidding_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_pr_item_bids": {
+ "name": "company_pr_item_bids",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_company_id": {
+ "name": "bidding_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "proposed_delivery_date": {
+ "name": "proposed_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_unit_price": {
+ "name": "bid_unit_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_amount": {
+ "name": "bid_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "technical_specification": {
+ "name": "technical_specification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote": {
+ "name": "is_pre_quote",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "company_pr_item_bids_bidding_company_id_bidding_companies_id_fk": {
+ "name": "company_pr_item_bids_bidding_company_id_bidding_companies_id_fk",
+ "tableFrom": "company_pr_item_bids",
+ "tableTo": "bidding_companies",
+ "columnsFrom": [
+ "bidding_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "company_pr_item_bids_pr_item_id_pr_items_for_bidding_id_fk": {
+ "name": "company_pr_item_bids_pr_item_id_pr_items_for_bidding_id_fk",
+ "tableFrom": "company_pr_item_bids",
+ "tableTo": "pr_items_for_bidding",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_documents": {
+ "name": "pr_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "document_name": {
+ "name": "document_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "registered_by": {
+ "name": "registered_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_documents_bidding_id_biddings_id_fk": {
+ "name": "pr_documents_bidding_id_biddings_id_fk",
+ "tableFrom": "pr_documents",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_items_for_bidding": {
+ "name": "pr_items_for_bidding",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_info": {
+ "name": "project_info",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_info": {
+ "name": "item_info",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi": {
+ "name": "shi",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_delivery_date": {
+ "name": "requested_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "annual_unit_price": {
+ "name": "annual_unit_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity_unit": {
+ "name": "quantity_unit",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_weight": {
+ "name": "total_weight",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "weight_unit": {
+ "name": "weight_unit",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_spec_document": {
+ "name": "has_spec_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_items_for_bidding_bidding_id_biddings_id_fk": {
+ "name": "pr_items_for_bidding_bidding_id_biddings_id_fk",
+ "tableFrom": "pr_items_for_bidding",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.specification_meetings": {
+ "name": "specification_meetings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "meeting_date": {
+ "name": "meeting_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "meeting_time": {
+ "name": "meeting_time",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "location": {
+ "name": "location",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agenda": {
+ "name": "agenda",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "materials": {
+ "name": "materials",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "specification_meetings_bidding_id_biddings_id_fk": {
+ "name": "specification_meetings_bidding_id_biddings_id_fk",
+ "tableFrom": "specification_meetings",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_selection_results": {
+ "name": "vendor_selection_results",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selected_company_id": {
+ "name": "selected_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selection_reason": {
+ "name": "selection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_summary": {
+ "name": "evaluation_summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_result_documents": {
+ "name": "has_result_documents",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "selected_at": {
+ "name": "selected_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "selected_by": {
+ "name": "selected_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_selection_results_bidding_id_biddings_id_fk": {
+ "name": "vendor_selection_results_bidding_id_biddings_id_fk",
+ "tableFrom": "vendor_selection_results",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_selection_results_selected_company_id_vendors_id_fk": {
+ "name": "vendor_selection_results_selected_company_id_vendors_id_fk",
+ "tableFrom": "vendor_selection_results",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "selected_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_additional_info": {
+ "name": "vendor_additional_info",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "business_type": {
+ "name": "business_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "industry_type": {
+ "name": "industry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_size": {
+ "name": "company_size",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revenue": {
+ "name": "revenue",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "factory_established_date": {
+ "name": "factory_established_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_contract_terms": {
+ "name": "preferred_contract_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_additional_info_vendor_id_vendors_id_fk": {
+ "name": "vendor_additional_info_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_additional_info",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_business_contacts": {
+ "name": "vendor_business_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_type": {
+ "name": "contact_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "position": {
+ "name": "position",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department": {
+ "name": "department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "responsibility": {
+ "name": "responsibility",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_business_contacts_vendor_id_vendors_id_fk": {
+ "name": "vendor_business_contacts_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_business_contacts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_regular_registrations": {
+ "name": "vendor_regular_registrations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'audit_pass'"
+ },
+ "potential_code": {
+ "name": "potential_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_items": {
+ "name": "major_items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registration_request_date": {
+ "name": "registration_request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_department": {
+ "name": "assigned_department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_department_code": {
+ "name": "assigned_department_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_user": {
+ "name": "assigned_user",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_user_code": {
+ "name": "assigned_user_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_regular_registrations_vendor_id_vendors_id_fk": {
+ "name": "vendor_regular_registrations_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_regular_registrations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_assignment_history": {
+ "name": "department_domain_assignment_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_assignment_history_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "assignment_id": {
+ "name": "assignment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_values": {
+ "name": "previous_values",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_values": {
+ "name": "new_values",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_by": {
+ "name": "changed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_assignments": {
+ "name": "department_domain_assignments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_assignments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_domain": {
+ "name": "assigned_domain",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_mappings": {
+ "name": "department_domain_mappings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_mappings_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "assignment_id": {
+ "name": "assignment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_company_code": {
+ "name": "old_company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_department_code": {
+ "name": "old_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_department_name": {
+ "name": "old_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_company_code": {
+ "name": "new_company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_department_code": {
+ "name": "new_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_department_name": {
+ "name": "new_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mapping_status": {
+ "name": "mapping_status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "mapped_by": {
+ "name": "mapped_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mapped_at": {
+ "name": "mapped_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER": {
+ "name": "CUSTOMER_MASTER_BP_HEADER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_HEADER_unique": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_HEADER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "BP_HEADER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRNO": {
+ "name": "ADDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SMTP_ADDR": {
+ "name": "SMTP_ADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "FAX_EXTENS": {
+ "name": "FAX_EXTENS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_NUMBER": {
+ "name": "FAX_NUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CITY1": {
+ "name": "CITY1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY2": {
+ "name": "CITY2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOUSE_NUM1": {
+ "name": "HOUSE_NUM1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANGU": {
+ "name": "LANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME1": {
+ "name": "NAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME2": {
+ "name": "NAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME3": {
+ "name": "NAME3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME4": {
+ "name": "NAME4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NATION": {
+ "name": "NATION",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POST_CODE1": {
+ "name": "POST_CODE1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POST_CODE2": {
+ "name": "POST_CODE2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PO_BOX": {
+ "name": "PO_BOX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGION": {
+ "name": "REGION",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SORT1": {
+ "name": "SORT1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SORT2": {
+ "name": "SORT2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STREET": {
+ "name": "STREET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAXJURCODE": {
+ "name": "TAXJURCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TIME_ZONE": {
+ "name": "TIME_ZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TITLE": {
+ "name": "TITLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANSPZONE": {
+ "name": "TRANSPZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "R3_USER": {
+ "name": "R3_USER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_EXTENS": {
+ "name": "TEL_EXTENS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_NUMBER": {
+ "name": "TEL_NUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URI_ADDR": {
+ "name": "URI_ADDR",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANRED": {
+ "name": "ANRED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUFSD": {
+ "name": "AUFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAKSD": {
+ "name": "FAKSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GFORM": {
+ "name": "GFORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JMJAH": {
+ "name": "JMJAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JMZAH": {
+ "name": "JMZAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFREPRE": {
+ "name": "J_1KFREPRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFTBUS": {
+ "name": "J_1KFTBUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFTIND": {
+ "name": "J_1KFTIND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KATR1": {
+ "name": "KATR1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KDKG1": {
+ "name": "KDKG1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTOKD": {
+ "name": "KTOKD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KUNNR": {
+ "name": "KUNNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LIFNR": {
+ "name": "LIFNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LIFSD": {
+ "name": "LIFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NIELS": {
+ "name": "NIELS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NODEL": {
+ "name": "NODEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUGRP": {
+ "name": "PUGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPERR": {
+ "name": "SPERR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD1": {
+ "name": "STCD1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD2": {
+ "name": "STCD2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD3": {
+ "name": "STCD3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD4": {
+ "name": "STCD4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCEG": {
+ "name": "STCEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMJAH": {
+ "name": "UMJAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UWAER": {
+ "name": "UWAER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VBUND": {
+ "name": "VBUND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT_C": {
+ "name": "ZZAPPDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM_C": {
+ "name": "ZZAPPTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS_C": {
+ "name": "ZZAPPUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBA": {
+ "name": "ZZBA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBRSCH_C": {
+ "name": "ZZBRSCH_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCRMCD": {
+ "name": "ZZCRMCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKAR_C": {
+ "name": "ZZDOKAR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKNR_C": {
+ "name": "ZZDOKNR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKTL_C": {
+ "name": "ZZDOKTL_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKVR_C": {
+ "name": "ZZDOKVR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDUNS": {
+ "name": "ZZDUNS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTBU": {
+ "name": "ZZFTBU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTBUNM": {
+ "name": "ZZFTBUNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTDT": {
+ "name": "ZZFTDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTDTNM": {
+ "name": "ZZFTDTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTGT": {
+ "name": "ZZFTGT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTGTNM": {
+ "name": "ZZFTGTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZINBFLGC": {
+ "name": "ZZINBFLGC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT_C": {
+ "name": "ZZLAMDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM_C": {
+ "name": "ZZLAMTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS_C": {
+ "name": "ZZLAMUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZORT01_C": {
+ "name": "ZZORT01_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZORT02_C": {
+ "name": "ZZORT02_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREASON": {
+ "name": "ZZREASON",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT_C": {
+ "name": "ZZREGDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM_C": {
+ "name": "ZZREGTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS_C": {
+ "name": "ZZREGUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTCDT_C": {
+ "name": "ZZSTCDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTRAS_C": {
+ "name": "ZZSTRAS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSUBSEQ_C": {
+ "name": "ZZSUBSEQ_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AKONT": {
+ "name": "AKONT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BUKRS": {
+ "name": "BUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "FDGRV": {
+ "name": "FDGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPERR": {
+ "name": "SPERR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZAHLS": {
+ "name": "ZAHLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZTERM": {
+ "name": "ZTERM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZUAWA": {
+ "name": "ZUAWA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZWELS": {
+ "name": "ZWELS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AUFSD": {
+ "name": "AUFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AWAHR": {
+ "name": "AWAHR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BZIRK": {
+ "name": "BZIRK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAKSD": {
+ "name": "FAKSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO1": {
+ "name": "INCO1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO2": {
+ "name": "INCO2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KALKS": {
+ "name": "KALKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KDGRP": {
+ "name": "KDGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KONDA": {
+ "name": "KONDA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTGRD": {
+ "name": "KTGRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KURST": {
+ "name": "KURST",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KZAZU": {
+ "name": "KZAZU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LIFSD": {
+ "name": "LIFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LPRIO": {
+ "name": "LPRIO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLTYP": {
+ "name": "PLTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VERSG": {
+ "name": "VERSG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKBUR": {
+ "name": "VKBUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKGRP": {
+ "name": "VKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKORG": {
+ "name": "VKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VSBED": {
+ "name": "VSBED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VTWEG": {
+ "name": "VTWEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VWERK": {
+ "name": "VWERK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS": {
+ "name": "WAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZTERM": {
+ "name": "ZTERM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEFPA": {
+ "name": "DEFPA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KUNN2": {
+ "name": "KUNN2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PARVW": {
+ "name": "PARVW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PARZA": {
+ "name": "PARZA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ALAND": {
+ "name": "ALAND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TATYP": {
+ "name": "TATYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TAXKD": {
+ "name": "TAXKD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LAND1": {
+ "name": "LAND1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "STCEG": {
+ "name": "STCEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "TAXNUM": {
+ "name": "TAXNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAXTYPE": {
+ "name": "TAXTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BICD": {
+ "name": "BICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZAREA": {
+ "name": "BIZAREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CCCD": {
+ "name": "CCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COMPCD": {
+ "name": "COMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DEPTLVL": {
+ "name": "DEPTLVL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPTPOSNO": {
+ "name": "DEPTPOSNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHEMPID": {
+ "name": "DHEMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GNCD": {
+ "name": "GNCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PCCD": {
+ "name": "PCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDEPTCD": {
+ "name": "PDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDFROMDT": {
+ "name": "VALIDFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDTODT": {
+ "name": "VALIDTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_unique": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "DEPTCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRCNTRY": {
+ "name": "ADDRCNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AEDAT": {
+ "name": "AEDAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AENAM": {
+ "name": "AENAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AEZET": {
+ "name": "AEZET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BICD": {
+ "name": "BICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZAREA": {
+ "name": "BIZAREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSCADDR": {
+ "name": "BSCADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COMPCD": {
+ "name": "COMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COUNTRYCD": {
+ "name": "COUNTRYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSFROMDT": {
+ "name": "CSFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTODT": {
+ "name": "CSTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTIROLE": {
+ "name": "CTIROLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL": {
+ "name": "DEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPENDDT": {
+ "name": "DEPENDDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHJOBGRDCD": {
+ "name": "DHJOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHNAME": {
+ "name": "DHNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHSINGLID": {
+ "name": "DHSINGLID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISPATCH": {
+ "name": "DISPATCH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DPSTARTDT": {
+ "name": "DPSTARTDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTLADDR": {
+ "name": "DTLADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTLADDR2": {
+ "name": "DTLADDR2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMAIL": {
+ "name": "EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMPADR": {
+ "name": "EMPADR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMPTYPE": {
+ "name": "EMPTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ENGNAME": {
+ "name": "ENGNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EPID": {
+ "name": "EPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERDAT": {
+ "name": "ERDAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERNAM": {
+ "name": "ERNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERZET": {
+ "name": "ERZET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FORIGNFLG": {
+ "name": "FORIGNFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBCD": {
+ "name": "GJOBCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBDUTYCD": {
+ "name": "GJOBDUTYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBGRDCD": {
+ "name": "GJOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GNCD": {
+ "name": "GNCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HRMANAGE": {
+ "name": "HRMANAGE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IDNO": {
+ "name": "IDNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBCD": {
+ "name": "JOBCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBCLASS": {
+ "name": "JOBCLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBDUTYCD": {
+ "name": "JOBDUTYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDCD": {
+ "name": "JOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTL_EMP": {
+ "name": "KTL_EMP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVABSENCE": {
+ "name": "LVABSENCE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MBPHONE": {
+ "name": "MBPHONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME": {
+ "name": "NAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OKTL_EMPL": {
+ "name": "OKTL_EMPL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGBICD": {
+ "name": "ORGBICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGCOMPCD": {
+ "name": "ORGCOMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGCORPCD": {
+ "name": "ORGCORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGDEPTCD": {
+ "name": "ORGDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGPDEPCD": {
+ "name": "ORGPDEPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PAYPLC": {
+ "name": "PAYPLC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDEPTCD": {
+ "name": "PDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTLCODE": {
+ "name": "PSTLCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RETIRE": {
+ "name": "RETIRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SEX": {
+ "name": "SEX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SINGLEID": {
+ "name": "SINGLEID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SINGLRQ": {
+ "name": "SINGLRQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOCIALID": {
+ "name": "SOCIALID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOCIALID_DECR": {
+ "name": "SOCIALID_DECR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOJRNEMP": {
+ "name": "SOJRNEMP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNUM": {
+ "name": "TELNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TMPJDIV": {
+ "name": "TMPJDIV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USEDSYS": {
+ "name": "USEDSYS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALFROMDT": {
+ "name": "VALFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALTODT": {
+ "name": "VALTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WFREQUIRE": {
+ "name": "WFREQUIRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WORKPLC": {
+ "name": "WORKPLC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZPRFLG": {
+ "name": "ZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBUKRS": {
+ "name": "ZZBUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_unique": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "EMPID"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GTEXT": {
+ "name": "GTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BINM": {
+ "name": "BINM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COUNTRYNM": {
+ "name": "COUNTRYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "PCCD": {
+ "name": "PCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "KTEXT": {
+ "name": "KTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBGRDNM": {
+ "name": "JOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBDUTYNM": {
+ "name": "GJOBDUTYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBGRDNM": {
+ "name": "GJOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ISEXECUT": {
+ "name": "ISEXECUT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDTYPE": {
+ "name": "JOBGRDTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBNM": {
+ "name": "GJOBNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GNNM": {
+ "name": "GNNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBDUTYNM": {
+ "name": "JOBDUTYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ISEXECUT": {
+ "name": "ISEXECUT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDNM": {
+ "name": "JOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDTYPE": {
+ "name": "JOBGRDTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBNM": {
+ "name": "JOBNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BINM": {
+ "name": "BINM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADTL_01": {
+ "name": "ADTL_01",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADTL_02": {
+ "name": "ADTL_02",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "GRPCD": {
+ "name": "GRPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAINCD": {
+ "name": "MAINCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VALIDFROMDT": {
+ "name": "VALIDFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDTODT": {
+ "name": "VALIDTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_unique": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "GRPCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME",
+ "schema": "mdg",
+ "columns": {
+ "GRPCD": {
+ "name": "GRPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "NAME": {
+ "name": "NAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_GRPCD_EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_fk": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_GRPCD_EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_fk",
+ "tableFrom": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME",
+ "tableTo": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "GRPCD"
+ ],
+ "columnsTo": [
+ "GRPCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL": {
+ "name": "EQUP_MASTER_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EQUP_MASTER_MATL_MATNR_unique": {
+ "name": "EQUP_MASTER_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_CHARASGN": {
+ "name": "EQUP_MASTER_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_CHARASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_CHARASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_CHARASGN",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_CLASSASGN": {
+ "name": "EQUP_MASTER_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_CLASSASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_CLASSASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_CLASSASGN",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_DESC": {
+ "name": "EQUP_MASTER_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_DESC_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_DESC_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_DESC",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_PLNT": {
+ "name": "EQUP_MASTER_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_PLNT_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_PLNT_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_PLNT",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_UNIT": {
+ "name": "EQUP_MASTER_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_UNIT_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_UNIT_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_UNIT",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL": {
+ "name": "MATERIAL_MASTER_PART_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZACT": {
+ "name": "ZZACT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCERT": {
+ "name": "ZZCERT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZINSP": {
+ "name": "ZZINSP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMMTYP": {
+ "name": "ZZMMTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMRC": {
+ "name": "ZZMRC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPJT": {
+ "name": "ZZPJT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPLMID": {
+ "name": "ZZPLMID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRCD_SCV_CTLP": {
+ "name": "ZZPRCD_SCV_CTLP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREPMAT": {
+ "name": "ZZREPMAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_DIA": {
+ "name": "ZZREP_DIA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_DIA_UOM": {
+ "name": "ZZREP_DIA_UOM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_ITM_MATL": {
+ "name": "ZZREP_ITM_MATL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSMID": {
+ "name": "ZZSMID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTL": {
+ "name": "ZZSTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MATERIAL_MASTER_PART_MATL_MATNR_unique": {
+ "name": "MATERIAL_MASTER_PART_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_CHARASGN": {
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_CHARASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_CHARASGN",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_CLASSASGN": {
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_CLASSASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_CLASSASGN",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_DESC": {
+ "name": "MATERIAL_MASTER_PART_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_DESC_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_DESC_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_DESC",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_PLNT": {
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_PLNT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_PLNT",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_UNIT": {
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BREIT": {
+ "name": "BREIT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOEHE": {
+ "name": "HOEHE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAENG": {
+ "name": "LAENG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLUM": {
+ "name": "VOLUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_UNIT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_UNIT",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE": {
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_CD": {
+ "name": "MAT_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAT_ID": {
+ "name": "MAT_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_MAT_CD_unique": {
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_MAT_CD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MAT_CD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL": {
+ "name": "MODEL_MASTER_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKAR": {
+ "name": "ZZDOKAR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKNR": {
+ "name": "ZZDOKNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKTL": {
+ "name": "ZZDOKTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKVR": {
+ "name": "ZZDOKVR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMMTYP": {
+ "name": "ZZMMTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MODEL_MASTER_MATL_MATNR_unique": {
+ "name": "MODEL_MASTER_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_CHARASGN": {
+ "name": "MODEL_MASTER_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_CHARASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_CHARASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_CHARASGN",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_CLASSASGN": {
+ "name": "MODEL_MASTER_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_CLASSASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_CLASSASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_CLASSASGN",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_DESC": {
+ "name": "MODEL_MASTER_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_DESC_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_DESC_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_DESC",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_PLNT": {
+ "name": "MODEL_MASTER_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_PLNT_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_PLNT_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_PLNT",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_UNIT": {
+ "name": "MODEL_MASTER_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BREIT": {
+ "name": "BREIT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOEHE": {
+ "name": "HOEHE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAENG": {
+ "name": "LAENG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLUM": {
+ "name": "VOLUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_UNIT_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_UNIT_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_UNIT",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_CCTR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ABTEI": {
+ "name": "ABTEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ANRED": {
+ "name": "ANRED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZER": {
+ "name": "BKZER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZKP": {
+ "name": "BKZKP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZKS": {
+ "name": "BKZKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZOB": {
+ "name": "BKZOB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BUKRS": {
+ "name": "BUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CCTR": {
+ "name": "CCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATAB": {
+ "name": "DATAB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATBI": {
+ "name": "DATBI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATLT": {
+ "name": "DATLT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DRNAM": {
+ "name": "DRNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FUNC_AREA": {
+ "name": "FUNC_AREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GSBER": {
+ "name": "GSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KHINR": {
+ "name": "KHINR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOKRS": {
+ "name": "KOKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KOSAR": {
+ "name": "KOSAR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAND1": {
+ "name": "LAND1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MGEFL": {
+ "name": "MGEFL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME1": {
+ "name": "NAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME2": {
+ "name": "NAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME3": {
+ "name": "NAME3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME4": {
+ "name": "NAME4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORT01": {
+ "name": "ORT01",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORT02": {
+ "name": "ORT02",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PFACH": {
+ "name": "PFACH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZER": {
+ "name": "PKZER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZKP": {
+ "name": "PKZKP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZKS": {
+ "name": "PKZKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTL2": {
+ "name": "PSTL2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTLZ": {
+ "name": "PSTLZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGIO": {
+ "name": "REGIO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STRAS": {
+ "name": "STRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELBX": {
+ "name": "TELBX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELF1": {
+ "name": "TELF1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELF2": {
+ "name": "TELF2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELFX": {
+ "name": "TELFX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELTX": {
+ "name": "TELTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELX1": {
+ "name": "TELX1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXJCD": {
+ "name": "TXJCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK": {
+ "name": "VERAK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK_USE": {
+ "name": "VERAK_USE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VMETH": {
+ "name": "VMETH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS": {
+ "name": "WAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBRANCH": {
+ "name": "ZZBRANCH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFCTRI": {
+ "name": "ZZFCTRI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSECCODE": {
+ "name": "ZZSECCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSEGMENT": {
+ "name": "ZZSEGMENT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "CCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT",
+ "schema": "mdg",
+ "columns": {
+ "CCTR": {
+ "name": "CCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "KTEXT": {
+ "name": "KTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_fk": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_fk",
+ "tableFrom": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT",
+ "tableTo": "ORGANIZATION_MASTER_HRHMTB_CCTR",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "CCTR"
+ ],
+ "columnsTo": [
+ "CCTR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "CCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_PCTR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ABTEI": {
+ "name": "ABTEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATAB": {
+ "name": "DATAB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATBI": {
+ "name": "DATBI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KHINR": {
+ "name": "KHINR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOKRS": {
+ "name": "KOKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LOCK_IND": {
+ "name": "LOCK_IND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PCTR": {
+ "name": "PCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SEGMENT": {
+ "name": "SEGMENT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXJCD": {
+ "name": "TXJCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK": {
+ "name": "VERAK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK_USE": {
+ "name": "VERAK_USE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_PCTR_PCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR_PCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "PCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZBUKRS": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CURR_BUKR": {
+ "name": "CURR_BUKR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBUKRS": {
+ "name": "ZBUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZBUTXT": {
+ "name": "ZZBUTXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCITY": {
+ "name": "ZZCITY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCOUNTRY": {
+ "name": "ZZCOUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLANGU": {
+ "name": "ZZLANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_ZBUKRS_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_ZBUKRS_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZBUKRS"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZEKGRP": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZEKGRP": {
+ "name": "ZEKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKNAM": {
+ "name": "ZZEKNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKTEL": {
+ "name": "ZZEKTEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEMPNUM": {
+ "name": "ZZEMPNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSINGLE": {
+ "name": "ZZSINGLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZTELFX": {
+ "name": "ZZTELFX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZTEL_NUM": {
+ "name": "ZZTEL_NUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_ZEKGRP_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_ZEKGRP_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZEKGRP"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZEKORG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZEKORG": {
+ "name": "ZEKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKOTX": {
+ "name": "ZZEKOTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZEKORG_ZEKORG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG_ZEKORG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZEKORG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZGSBER": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZGSBER": {
+ "name": "ZGSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZGSBER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT",
+ "schema": "mdg",
+ "columns": {
+ "ZGSBER": {
+ "name": "ZGSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LANGU": {
+ "name": "LANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TXTMI": {
+ "name": "TXTMI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_fk": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_fk",
+ "tableFrom": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT",
+ "tableTo": "ORGANIZATION_MASTER_HRHMTB_ZGSBER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "ZGSBER"
+ ],
+ "columnsTo": [
+ "ZGSBER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZGSBER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZLGORT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZLGORT": {
+ "name": "ZLGORT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZWERKS": {
+ "name": "ZWERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLGOBE": {
+ "name": "ZZLGOBE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZLGORT_ZLGORT_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT_ZLGORT_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZLGORT"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZSPART": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZSPART": {
+ "name": "ZSPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZSPART_ZSPART_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART_ZSPART_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZSPART"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKBUR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CTRY_SOFF": {
+ "name": "CTRY_SOFF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_SOFF": {
+ "name": "LANG_SOFF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZVKBUR": {
+ "name": "ZVKBUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_ZVKBUR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_ZVKBUR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKBUR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKGRP": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVKGRP": {
+ "name": "ZVKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_ZVKGRP_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_ZVKGRP_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKGRP"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKORG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVKORG": {
+ "name": "ZVKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZBOAVO": {
+ "name": "ZZBOAVO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZKUNNR": {
+ "name": "ZZKUNNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZVKOKL": {
+ "name": "ZZVKOKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZWAERS": {
+ "name": "ZZWAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKORG_ZVKORG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG_ZVKORG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKORG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVSTEL": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ALAN_VSTE": {
+ "name": "ALAN_VSTE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AZON_VSTE": {
+ "name": "AZON_VSTE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTRY_SHPT": {
+ "name": "CTRY_SHPT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_SHPT": {
+ "name": "LANG_SHPT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZVSTEL": {
+ "name": "ZVSTEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFABKL": {
+ "name": "ZZFABKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAZBS": {
+ "name": "ZZLAZBS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZRIZBS": {
+ "name": "ZZRIZBS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_ZVSTEL_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_ZVSTEL_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVSTEL"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVTWEG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVTWEG": {
+ "name": "ZVTWEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_ZVTWEG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_ZVTWEG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVTWEG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZWERKS": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CTRY_PLNT": {
+ "name": "CTRY_PLNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_PLNT": {
+ "name": "LANG_PLNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZWERKS": {
+ "name": "ZWERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFABKL": {
+ "name": "ZZFABKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME1": {
+ "name": "ZZNAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME2": {
+ "name": "ZZNAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZWERKS_ZWERKS_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS_ZWERKS_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZWERKS"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.PROJECT_MASTER_CMCTB_PROJ_MAST": {
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AS_GRNT_PRD": {
+ "name": "AS_GRNT_PRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZLOC_CD": {
+ "name": "BIZLOC_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_DMN": {
+ "name": "BIZ_DMN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BP_DL_DT": {
+ "name": "BP_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHN_PROJ_TP": {
+ "name": "CHN_PROJ_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_CNTN_YN": {
+ "name": "CNRT_CNTN_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DL_DT": {
+ "name": "CNRT_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DT": {
+ "name": "CNRT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_RESV_YN": {
+ "name": "CNRT_RESV_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_PO_NO": {
+ "name": "CSTM_PO_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIGT_PDT_GRP": {
+ "name": "DIGT_PDT_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_BF_PROJ_NM": {
+ "name": "DL_BF_PROJ_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_CSTM_CD": {
+ "name": "DL_CSTM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_CD": {
+ "name": "DOCK_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_CHRGR": {
+ "name": "DSN_CHRGR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_GRNT_FN_DT": {
+ "name": "FIN_GRNT_FN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GENT_CNT": {
+ "name": "GENT_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOV": {
+ "name": "GOV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRNT_STDT": {
+ "name": "GRNT_STDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IMO_NO": {
+ "name": "IMO_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_NO": {
+ "name": "INQY_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_SEQ": {
+ "name": "INQY_SEQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IO_GB": {
+ "name": "IO_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNG_ACOT_DMN": {
+ "name": "MNG_ACOT_DMN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_ENGN_TP_CD": {
+ "name": "MN_ENGN_TP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSHIP_NO": {
+ "name": "MSHIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTTP": {
+ "name": "NTTP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_FN_DT": {
+ "name": "ORDR_GRNT_FN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_PRD": {
+ "name": "ORDR_GRNT_PRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_1": {
+ "name": "OWN_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_AB": {
+ "name": "OWN_AB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_NM": {
+ "name": "OWN_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_LVL_4": {
+ "name": "PDT_LVL_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRGS_STAT": {
+ "name": "PRGS_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_DT": {
+ "name": "PROJ_CRTE_REQ_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_EMPNO": {
+ "name": "PROJ_CRTE_REQ_EMPNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_PLN_DT": {
+ "name": "PROJ_DL_PLN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_RT_DT": {
+ "name": "PROJ_DL_RT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DSC": {
+ "name": "PROJ_DSC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DTL_TP": {
+ "name": "PROJ_DTL_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_ETC_TP": {
+ "name": "PROJ_ETC_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_GB": {
+ "name": "PROJ_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PROJ_PRGS_YN": {
+ "name": "PROJ_PRGS_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PROF": {
+ "name": "PROJ_PROF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_SCP": {
+ "name": "PROJ_SCP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_WBS_TP": {
+ "name": "PROJ_WBS_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRO_PROJ_NO": {
+ "name": "PRO_PROJ_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REF_NO": {
+ "name": "REF_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RLTD_PROJ": {
+ "name": "RLTD_PROJ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RL_DL_DT": {
+ "name": "RL_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SA_DT": {
+ "name": "SA_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_NO": {
+ "name": "SERS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_YN": {
+ "name": "SERS_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE": {
+ "name": "SHTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_GRP": {
+ "name": "SHTYPE_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND": {
+ "name": "SKND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRC_SYS_ID": {
+ "name": "SRC_SYS_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STDT": {
+ "name": "STDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_ACOT_CLSD_DT": {
+ "name": "SYS_ACOT_CLSD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_CNRT_CNT": {
+ "name": "TOT_CNRT_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WP_PROJ_TP": {
+ "name": "WP_PROJ_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "PROJECT_MASTER_CMCTB_PROJ_MAST_PROJ_NO_unique": {
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST_PROJ_NO_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "PROJ_NO"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER": {
+ "name": "VENDOR_MASTER_BP_HEADER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "VENDOR_MASTER_BP_HEADER_VNDRCD_unique": {
+ "name": "VENDOR_MASTER_BP_HEADER_VNDRCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "VNDRCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRNO": {
+ "name": "ADDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_TMZ": {
+ "name": "ADR_TMZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAX_JRDT_ZONE_CD": {
+ "name": "TAX_JRDT_ZONE_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_TAXNUM": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP_TP": {
+ "name": "ACNT_GRP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZR_NO": {
+ "name": "BIZR_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_CD": {
+ "name": "BIZ_UOM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_NM": {
+ "name": "BIZ_UOM_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_REG_NO": {
+ "name": "CO_REG_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_VLM": {
+ "name": "CO_VLM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_HOLD_ORDR": {
+ "name": "DEL_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_CD": {
+ "name": "DMST_TOP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_NM": {
+ "name": "DMST_TOP_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DNS_NO": {
+ "name": "DNS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_TP": {
+ "name": "DOC_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_VER": {
+ "name": "DOC_VER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIR_NM": {
+ "name": "FIR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_CD": {
+ "name": "GBL_TOP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_NM": {
+ "name": "GBL_TOP_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GIRO_VNDR_ORDR": {
+ "name": "GIRO_VNDR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INB_FLAG": {
+ "name": "INB_FLAG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_LCTN_CHK_NUM": {
+ "name": "INTL_LCTN_CHK_NUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS_CD": {
+ "name": "OVLAP_CAUS_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNT_VNDRCD": {
+ "name": "PTNT_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTN_DOC": {
+ "name": "PTN_DOC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_EMAIL": {
+ "name": "QLT_CHRGR_EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_NM": {
+ "name": "QLT_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_TELNO": {
+ "name": "QLT_CHRGR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_TM": {
+ "name": "REG_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_RESNO": {
+ "name": "REPR_RESNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TEL_NO": {
+ "name": "REP_TEL_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SB_WKA_SEQ": {
+ "name": "SB_WKA_SEQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCETX_RP_SEX_KEY": {
+ "name": "SRCETX_RP_SEX_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_CD_4": {
+ "name": "TX_CD_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VAT_REG_NO": {
+ "name": "VAT_REG_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNO": {
+ "name": "VNDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ACOT_CHRGR_FAXNO": {
+ "name": "ACOT_CHRGR_FAXNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_TELNO": {
+ "name": "ACOT_CHRGR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUTH_GRP": {
+ "name": "AUTH_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BF_VNDRCD": {
+ "name": "BF_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CSTM_VNDR_CLR_ORDR": {
+ "name": "CSTM_VNDR_CLR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTL_ACNT": {
+ "name": "CTL_ACNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_ACT_DT": {
+ "name": "FIN_IR_ACT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_CALC_DT": {
+ "name": "FIN_IR_CALC_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IATA_BIC_GB": {
+ "name": "IATA_BIC_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOGST_VNDR_TP": {
+ "name": "LOGST_VNDR_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEMO": {
+ "name": "MEMO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MIN_ORDR": {
+ "name": "MIN_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_CHRGR_EMAIL": {
+ "name": "MK_CHRGR_EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MOFFC_ACNT_NO": {
+ "name": "MOFFC_ACNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_INVC_ORDR": {
+ "name": "OVLAP_INVC_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLN_GRP": {
+ "name": "PLN_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TP": {
+ "name": "REP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_HOLD_ORDR": {
+ "name": "SPLY_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_MTHD": {
+ "name": "SPLY_MTHD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRT_SPLY_ORDR": {
+ "name": "SPRT_SPLY_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_CD": {
+ "name": "SRCE_TX_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NTN_CD": {
+ "name": "SRCE_TX_NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_BANK_SHRT_KEY": {
+ "name": "TRD_BANK_SHRT_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_ACNT_NO": {
+ "name": "VNDR_ACNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CHRGR_NM": {
+ "name": "VNDR_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DCHAG_CAUS": {
+ "name": "DCHAG_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CERT_NO": {
+ "name": "DCHAG_CERT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ED_DT": {
+ "name": "DCHAG_ED_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ST_DT": {
+ "name": "DCHAG_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RECIP_TP": {
+ "name": "RECIP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_IDENT_NO": {
+ "name": "SRCE_TX_IDENT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NO": {
+ "name": "SRCE_TX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_REL_ORDR": {
+ "name": "SRCE_TX_REL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_TP": {
+ "name": "SRCE_TX_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AT_PUR_ORD_ORDR": {
+ "name": "AT_PUR_ORD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CALC_SHM_GRP": {
+ "name": "CALC_SHM_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNFM_CTL_KEY": {
+ "name": "CNFM_CTL_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GR_BSE_INVC_VR": {
+ "name": "GR_BSE_INVC_VR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORD_CNFM_REQ_ORDR": {
+ "name": "ORD_CNFM_REQ_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_CAUS": {
+ "name": "PUR_HOLD_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_ORD_CUR": {
+ "name": "PUR_ORD_CUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_CHRGR_NM": {
+ "name": "SALE_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TELNO": {
+ "name": "VNDR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_REF_VNDRCD": {
+ "name": "ETC_REF_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_NO": {
+ "name": "PLNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDR_SUB_NO": {
+ "name": "VNDR_SUB_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "soap.soap_logs": {
+ "name": "soap_logs",
+ "schema": "soap",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "direction": {
+ "name": "direction",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "system": {
+ "name": "system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interface": {
+ "name": "interface",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endedAt": {
+ "name": "endedAt",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isSuccess": {
+ "name": "isSuccess",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "requestData": {
+ "name": "requestData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responseData": {
+ "name": "responseData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd": {
+ "name": "cmctb_cd",
+ "schema": "nonsap",
+ "columns": {
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD": {
+ "name": "CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD2": {
+ "name": "CD2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD3": {
+ "name": "CD3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "USR_DF_CHAR_1": {
+ "name": "USR_DF_CHAR_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_2": {
+ "name": "USR_DF_CHAR_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_3": {
+ "name": "USR_DF_CHAR_3",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_4": {
+ "name": "USR_DF_CHAR_4",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_5": {
+ "name": "USR_DF_CHAR_5",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_6": {
+ "name": "USR_DF_CHAR_6",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_7": {
+ "name": "USR_DF_CHAR_7",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_8": {
+ "name": "USR_DF_CHAR_8",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_9": {
+ "name": "USR_DF_CHAR_9",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_10": {
+ "name": "USR_DF_CHAR_10",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_11": {
+ "name": "USR_DF_CHAR_11",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_12": {
+ "name": "USR_DF_CHAR_12",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_13": {
+ "name": "USR_DF_CHAR_13",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_14": {
+ "name": "USR_DF_CHAR_14",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_15": {
+ "name": "USR_DF_CHAR_15",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_16": {
+ "name": "USR_DF_CHAR_16",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_17": {
+ "name": "USR_DF_CHAR_17",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_18": {
+ "name": "USR_DF_CHAR_18",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_19": {
+ "name": "USR_DF_CHAR_19",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_20": {
+ "name": "USR_DF_CHAR_20",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_1": {
+ "name": "USR_DF_CHK_1",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_2": {
+ "name": "USR_DF_CHK_2",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_3": {
+ "name": "USR_DF_CHK_3",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_4": {
+ "name": "USR_DF_CHK_4",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_5": {
+ "name": "USR_DF_CHK_5",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_6": {
+ "name": "USR_DF_CHK_6",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_7": {
+ "name": "USR_DF_CHK_7",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_8": {
+ "name": "USR_DF_CHK_8",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_1": {
+ "name": "USR_DF_DT_1",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_2": {
+ "name": "USR_DF_DT_2",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_3": {
+ "name": "USR_DF_DT_3",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_4": {
+ "name": "USR_DF_DT_4",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_1": {
+ "name": "USR_DF_TM_1",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_2": {
+ "name": "USR_DF_TM_2",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_3": {
+ "name": "USR_DF_TM_3",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_4": {
+ "name": "USR_DF_TM_4",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd_clf": {
+ "name": "cmctb_cd_clf",
+ "schema": "nonsap",
+ "columns": {
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd_clf_nm": {
+ "name": "cmctb_cd_clf_nm",
+ "schema": "nonsap",
+ "columns": {
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF_NM": {
+ "name": "CD_CLF_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRP_DSC": {
+ "name": "GRP_DSC",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cdnm": {
+ "name": "cmctb_cdnm",
+ "schema": "nonsap",
+ "columns": {
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD": {
+ "name": "CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD2": {
+ "name": "CD2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD3": {
+ "name": "CD3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CDNM": {
+ "name": "CDNM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRP_DSC": {
+ "name": "GRP_DSC",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_addr": {
+ "name": "cmctb_customer_addr",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOUSE_NR1": {
+ "name": "HOUSE_NR1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_cfpn": {
+ "name": "cmctb_customer_cfpn",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_compny": {
+ "name": "cmctb_customer_compny",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AR_ACNT_HDL_GB": {
+ "name": "AR_ACNT_HDL_GB",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AMT_RNE_GB": {
+ "name": "AMT_RNE_GB",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_PAY_FRM": {
+ "name": "VNDR_PAY_FRM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BILL_PAY_COND_CD": {
+ "name": "BILL_PAY_COND_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BILL_PAY_BLOC_CD": {
+ "name": "BILL_PAY_BLOC_CD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_general": {
+ "name": "cmctb_customer_general",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS": {
+ "name": "OVLAP_CAUS",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_TP": {
+ "name": "CSTM_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_BLOCK": {
+ "name": "DEL_BLOCK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COND_GRP_1": {
+ "name": "COND_GRP_1",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_GRP_NM": {
+ "name": "CSTM_GRP_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_2": {
+ "name": "TX_NO_2",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_3": {
+ "name": "TX_NO_3",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_4": {
+ "name": "TX_NO_4",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_REG_NO": {
+ "name": "TX_REG_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BA_CD": {
+ "name": "BA_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCH_COND_1": {
+ "name": "SRCH_COND_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCH_COND_2": {
+ "name": "SRCH_COND_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_DISP_NM": {
+ "name": "CITY_DISP_NM",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRM_CD": {
+ "name": "CRM_CD",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IN_FLAG": {
+ "name": "IN_FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDST_CD": {
+ "name": "INDST_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_TP": {
+ "name": "TX_NO_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DTM": {
+ "name": "REG_DTM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTGT_CD": {
+ "name": "FTGT_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTGT_NM": {
+ "name": "FTGT_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTDT_CD": {
+ "name": "FTDT_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTDT_NM": {
+ "name": "FTDT_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTBU_CD": {
+ "name": "FTBU_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTBU_NM": {
+ "name": "FTBU_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_repremail": {
+ "name": "cmctb_customer_repremail",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprfax": {
+ "name": "cmctb_customer_reprfax",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprtel": {
+ "name": "cmctb_customer_reprtel",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprurl": {
+ "name": "cmctb_customer_reprurl",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_sorg": {
+ "name": "cmctb_customer_sorg",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_REGN": {
+ "name": "SALE_REGN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_OFC": {
+ "name": "SALE_OFC",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_GRP": {
+ "name": "CSTM_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSBL": {
+ "name": "PSBL",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_CUR": {
+ "name": "TRD_CUR",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXRAT_TP": {
+ "name": "EXRAT_TP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRC_PRCS_DSC_CD": {
+ "name": "PRC_PRCS_DSC_CD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_STAT_GRP": {
+ "name": "CSTM_STAT_GRP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHIPMT_COND": {
+ "name": "SHIPMT_COND",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAX_TRD_QTY": {
+ "name": "MAX_TRD_QTY",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(84)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_ASGN_GRP": {
+ "name": "ACNT_ASGN_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_taxcd": {
+ "name": "cmctb_customer_taxcd",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DPRT_NTN": {
+ "name": "DPRT_NTN",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_CTG": {
+ "name": "TX_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CSTM_TX_CLF": {
+ "name": "CSTM_TX_CLF",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_taxnum": {
+ "name": "cmctb_customer_taxnum",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_bse": {
+ "name": "cmctb_mat_bse",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SM_CD": {
+ "name": "SM_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_ID": {
+ "name": "MAT_ID",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_TP": {
+ "name": "MAT_TP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_GB": {
+ "name": "MAT_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_DTL": {
+ "name": "MAT_DTL",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_DTL_SPEC": {
+ "name": "MAT_DTL_SPEC",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATL": {
+ "name": "MATL",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OLD_MAT_NO": {
+ "name": "OLD_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SBST_MAT_NO": {
+ "name": "SBST_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UOM": {
+ "name": "UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MRC": {
+ "name": "MRC",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STOR_MAT_ORDR": {
+ "name": "STOR_MAT_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STYPE": {
+ "name": "STYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS": {
+ "name": "CLS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGT": {
+ "name": "WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NET_WGT": {
+ "name": "NET_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGT_UOM": {
+ "name": "WGT_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH": {
+ "name": "LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH_2": {
+ "name": "LTH_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH": {
+ "name": "WTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH_2": {
+ "name": "WTH_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "THK": {
+ "name": "THK",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STD": {
+ "name": "STD",
+ "type": "varchar(70)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROF_STD": {
+ "name": "PROF_STD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CBL_OUT_DIA": {
+ "name": "CBL_OUT_DIA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTRM_MAT_YN": {
+ "name": "LTRM_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNT_AREA": {
+ "name": "PNT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTIN_AREA": {
+ "name": "PNTIN_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTIN_SPEC": {
+ "name": "PNTIN_SPEC",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_AREA": {
+ "name": "PNTOUT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_1": {
+ "name": "PNTOUT_SPEC_1",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_2": {
+ "name": "PNTOUT_SPEC_2",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_3": {
+ "name": "PNTOUT_SPEC_3",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RT_INSPEC": {
+ "name": "RT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UT_INSPEC": {
+ "name": "UT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MT_INSPEC": {
+ "name": "MT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PT_INSPEC": {
+ "name": "PT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_DWG_NO": {
+ "name": "MK_DWG_NO",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CUT_DWG_NO": {
+ "name": "CUT_DWG_NO",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_SPL_NO": {
+ "name": "PIPE_SPL_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_LINE_NO": {
+ "name": "PIPE_LINE_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_CLAS": {
+ "name": "PIPE_CLAS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FLUID_KND": {
+ "name": "FLUID_KND",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_ITM_MATL": {
+ "name": "REP_ITM_MATL",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA": {
+ "name": "REP_DIA",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA_UOM": {
+ "name": "REP_DIA_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_SCH": {
+ "name": "REP_SCH",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA_LTH": {
+ "name": "REP_DIA_LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DBLN_GB": {
+ "name": "DBLN_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_GRD": {
+ "name": "PIPE_GRD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HTRET_YN": {
+ "name": "HTRET_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BA_GALV_SPEC": {
+ "name": "BA_GALV_SPEC",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SSIDE_YN": {
+ "name": "SSIDE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTR_PIPE_YN": {
+ "name": "PNTR_PIPE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UBOLT_YN": {
+ "name": "UBOLT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTLP_PRCD_PNT": {
+ "name": "CTLP_PRCD_PNT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCD_SCV_CTLP": {
+ "name": "PRCD_SCV_CTLP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PMI_INSPEC": {
+ "name": "PMI_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTRPRS": {
+ "name": "WTRPRS",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLV_FIT_NO": {
+ "name": "VLV_FIT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_NO": {
+ "name": "TAG_NO",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_SB_NO": {
+ "name": "TAG_SB_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NM_PLATE_TP": {
+ "name": "NM_PLATE_TP",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NM_PLATE_SVC_NM": {
+ "name": "NM_PLATE_SVC_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VRCS_MAT_NO": {
+ "name": "VRCS_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRSM_FIT_NO": {
+ "name": "TRSM_FIT_NO",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLV_OPT_CD_LIST": {
+ "name": "VLV_OPT_CD_LIST",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_REQ_NO": {
+ "name": "PUR_REQ_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ITM_NO": {
+ "name": "ITM_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MDL_NO": {
+ "name": "MDL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BL_NO": {
+ "name": "BL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_EQP_NO": {
+ "name": "VNDR_EQP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BOX_NO": {
+ "name": "BOX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMT_NO": {
+ "name": "MMT_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INSTL_LOC": {
+ "name": "INSTL_LOC",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_EQP_YN": {
+ "name": "MN_EQP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIXED_MAT_YN": {
+ "name": "FIXED_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRE_YN": {
+ "name": "SPRE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOOL_YN": {
+ "name": "TOOL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CBL_YN": {
+ "name": "CBL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_INSTL_MAT_YN": {
+ "name": "OWN_INSTL_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NONINSTL_MAT_YN": {
+ "name": "NONINSTL_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BLK_NO": {
+ "name": "BLK_NO",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GYEL": {
+ "name": "GYEL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LNK_PTLST_NO": {
+ "name": "LNK_PTLST_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AREA": {
+ "name": "AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STOR_LOC": {
+ "name": "STOR_LOC",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SGUB_WGT": {
+ "name": "SGUB_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DGUB_WGT": {
+ "name": "DGUB_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_SKL": {
+ "name": "DSN_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RMK": {
+ "name": "RMK",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_DT": {
+ "name": "DEL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_STAT": {
+ "name": "MAT_STAT",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_SYS_NO": {
+ "name": "IF_SYS_NO",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_1": {
+ "name": "GLAND_SPEC_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_2": {
+ "name": "GLAND_SPEC_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_3": {
+ "name": "GLAND_SPEC_3",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MCT_MDLE_STD_1": {
+ "name": "MCT_MDLE_STD_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MCT_MDLE_STD_2": {
+ "name": "MCT_MDLE_STD_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BEELE_RISE": {
+ "name": "BEELE_RISE",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAX_DRUM_LTH": {
+ "name": "MAX_DRUM_LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DTM": {
+ "name": "AGR_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISPLN": {
+ "name": "DISPLN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LRG_KWK": {
+ "name": "LRG_KWK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTL_KWK": {
+ "name": "DTL_KWK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SP_INSP_GB": {
+ "name": "SP_INSP_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_4": {
+ "name": "PNTOUT_SPEC_4",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFE_MAT_NO": {
+ "name": "OFE_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFE_CAB_YN": {
+ "name": "OFE_CAB_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INSTL_PSB_CNT": {
+ "name": "INSTL_PSB_CNT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CUTL_ML_GB": {
+ "name": "CUTL_ML_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FCM_INSP": {
+ "name": "FCM_INSP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_DT": {
+ "name": "HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_LIFT_DT": {
+ "name": "HOLD_LIFT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_KND_GB": {
+ "name": "MAT_KND_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BATCH_MNG_ORDR": {
+ "name": "BATCH_MNG_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INPR_ID": {
+ "name": "FS_INPR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INP_DTM": {
+ "name": "FS_INP_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHGR_ID": {
+ "name": "FIN_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHG_DTM": {
+ "name": "FIN_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DWG_FILE_NM": {
+ "name": "DWG_FILE_NM",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_NO_CHG_DT": {
+ "name": "TAG_NO_CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SUB_EQP_YN": {
+ "name": "SUB_EQP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATT_MAT_YN": {
+ "name": "ATT_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_REV_NO": {
+ "name": "DSN_REV_NO",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR1": {
+ "name": "USR_DF_CHAR1",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR2": {
+ "name": "USR_DF_CHAR2",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR3": {
+ "name": "USR_DF_CHAR3",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR4": {
+ "name": "USR_DF_CHAR4",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR5": {
+ "name": "USR_DF_CHAR5",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_clas": {
+ "name": "cmctb_mat_clas",
+ "schema": "nonsap",
+ "columns": {
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CLAS_NM": {
+ "name": "CLAS_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_DTL": {
+ "name": "CLAS_DTL",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRNT_CLAS_CD": {
+ "name": "PRNT_CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_LVL": {
+ "name": "CLAS_LVL",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UOM": {
+ "name": "UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STYPE": {
+ "name": "STYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRD_MATL": {
+ "name": "GRD_MATL",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSE_UOM": {
+ "name": "BSE_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_clas_spchar": {
+ "name": "cmctb_mat_clas_spchar",
+ "schema": "nonsap",
+ "columns": {
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_SEQ": {
+ "name": "SPCHAR_SEQ",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNDT_YN": {
+ "name": "MNDT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_clas_spchar_CLAS_CD_SPCHAR_CD_pk": {
+ "name": "cmctb_mat_clas_spchar_CLAS_CD_SPCHAR_CD_pk",
+ "columns": [
+ "CLAS_CD",
+ "SPCHAR_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_dsc": {
+ "name": "cmctb_mat_dsc",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAT_DTL": {
+ "name": "MAT_DTL",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_plnt": {
+ "name": "cmctb_mat_plnt",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PLNT": {
+ "name": "PLNT",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DELV_UOM": {
+ "name": "DELV_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EA_BTCH_ND_GB": {
+ "name": "EA_BTCH_ND_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_CLF": {
+ "name": "PRCR_CLF",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_CHRGR_CD": {
+ "name": "PUR_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_CHRGR_CD": {
+ "name": "PRCR_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOODS_CHRGR_CD": {
+ "name": "GOODS_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_LT": {
+ "name": "PUR_LT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MRP_TP": {
+ "name": "MRP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_STAT": {
+ "name": "MAT_STAT",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BULK_MAT_ORDR": {
+ "name": "BULK_MAT_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_TP": {
+ "name": "PRCR_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SFTY_STCK_QTY": {
+ "name": "SFTY_STCK_QTY",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SER_PROF": {
+ "name": "SER_PROF",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BATCH_MNG_ORDR": {
+ "name": "BATCH_MNG_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SP_PRCR_TP": {
+ "name": "SP_PRCR_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar": {
+ "name": "cmctb_mat_spchar",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_DTL": {
+ "name": "SPCHAR_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_CD": {
+ "name": "SPCHAR_VAL_CD",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_DTL": {
+ "name": "SPCHAR_VAL_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_NUM": {
+ "name": "SPCHAR_VAL_NUM",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_UOM": {
+ "name": "SPCHAR_VAL_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar_mast": {
+ "name": "cmctb_mat_spchar_mast",
+ "schema": "nonsap",
+ "columns": {
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_DTL": {
+ "name": "SPCHAR_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_TP": {
+ "name": "SPCHAR_TP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_UOM": {
+ "name": "SPCHAR_VAL_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_YN": {
+ "name": "SPCHAR_VAL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_GRP": {
+ "name": "SPCHAR_GRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_spchar_mast_SPCHAR_CD_pk": {
+ "name": "cmctb_mat_spchar_mast_SPCHAR_CD_pk",
+ "columns": [
+ "SPCHAR_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar_val": {
+ "name": "cmctb_mat_spchar_val",
+ "schema": "nonsap",
+ "columns": {
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_VAL_CD": {
+ "name": "SPCHAR_VAL_CD",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_VAL_DTL": {
+ "name": "SPCHAR_VAL_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_spchar_val_SPCHAR_CD_SPCHAR_VAL_CD_pk": {
+ "name": "cmctb_mat_spchar_val_SPCHAR_CD_SPCHAR_VAL_CD_pk",
+ "columns": [
+ "SPCHAR_CD",
+ "SPCHAR_VAL_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_uom": {
+ "name": "cmctb_mat_uom",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SBST_UOM": {
+ "name": "SBST_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CNVRT_FCTR_1": {
+ "name": "CNVRT_FCTR_1",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNVRT_FCTR_2": {
+ "name": "CNVRT_FCTR_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH": {
+ "name": "LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH": {
+ "name": "WTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HGT": {
+ "name": "HGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SZ_UOM": {
+ "name": "SZ_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_bizcls": {
+ "name": "cmctb_proj_bizcls",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_mast": {
+ "name": "cmctb_proj_mast",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MSHIP_NO": {
+ "name": "MSHIP_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_NO": {
+ "name": "SERS_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REF_NO": {
+ "name": "REF_NO",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND": {
+ "name": "SKND",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE": {
+ "name": "SHTYPE",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_CD": {
+ "name": "DOCK_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_1": {
+ "name": "OWN_1",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DT": {
+ "name": "CNRT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DL_DT": {
+ "name": "CNRT_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DSC": {
+ "name": "PROJ_DSC",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_GB": {
+ "name": "PROJ_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_NM": {
+ "name": "OWN_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_SKND2": {
+ "name": "NEW_SKND2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_AB": {
+ "name": "OWN_AB",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHINA_YN": {
+ "name": "CHINA_YN",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DTL_TP": {
+ "name": "PROJ_DTL_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PROF": {
+ "name": "PROJ_PROF",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_NO": {
+ "name": "INQY_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_SEQ": {
+ "name": "INQY_SEQ",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTTP": {
+ "name": "NTTP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RLTD_PROJ": {
+ "name": "RLTD_PROJ",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIGT_PDT_GRP": {
+ "name": "DIGT_PDT_GRP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WP_PROJ_TP": {
+ "name": "WP_PROJ_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_CNRT_CNT": {
+ "name": "TOT_CNRT_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_ETC_TP": {
+ "name": "PROJ_ETC_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRC_SYS_ID": {
+ "name": "SRC_SYS_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRGS_STAT": {
+ "name": "PRGS_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_CSTM_CD": {
+ "name": "DL_CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_LVL_4": {
+ "name": "PDT_LVL_4",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AS_GRNT_PRD": {
+ "name": "AS_GRNT_PRD",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RL_DL_DT": {
+ "name": "RL_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SA_DT": {
+ "name": "SA_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOV": {
+ "name": "GOV",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_BF_PROJ_NM": {
+ "name": "DL_BF_PROJ_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IMO_NO": {
+ "name": "IMO_NO",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZLOC_CD": {
+ "name": "BIZLOC_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNG_ACOT_DMN": {
+ "name": "MNG_ACOT_DMN",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_DMN": {
+ "name": "BIZ_DMN",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_CNTN_YN": {
+ "name": "CNRT_CNTN_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_RESV_YN": {
+ "name": "CNRT_RESV_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PRGS_YN": {
+ "name": "PROJ_PRGS_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_ACOT_CLSD_DT": {
+ "name": "SYS_ACOT_CLSD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_SCP": {
+ "name": "PROJ_SCP",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOA": {
+ "name": "LOA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_ENGN_TP_CD": {
+ "name": "MN_ENGN_TP_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPD": {
+ "name": "SPD",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GT": {
+ "name": "GT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BP_DL_DT": {
+ "name": "BP_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_GRP": {
+ "name": "SHTYPE_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_EMPNO": {
+ "name": "PROJ_CRTE_REQ_EMPNO",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_DT": {
+ "name": "PROJ_CRTE_REQ_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IO_GB": {
+ "name": "IO_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_PO_NO": {
+ "name": "CSTM_PO_NO",
+ "type": "varchar(35)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GENT_CNT": {
+ "name": "GENT_CNT",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_PRD": {
+ "name": "ORDR_GRNT_PRD",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_FN_DT": {
+ "name": "ORDR_GRNT_FN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_CHRGR": {
+ "name": "DSN_CHRGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_PROJ_NM": {
+ "name": "DL_AF_PROJ_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_RL_CLNT": {
+ "name": "DL_AF_RL_CLNT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_SHPSRV_SCP": {
+ "name": "DL_AF_SHPSRV_SCP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_NTTP": {
+ "name": "DL_AF_NTTP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_CLS": {
+ "name": "DL_AF_CLS",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_CALL_SIGN": {
+ "name": "DL_AF_CALL_SIGN",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_TEL_NO": {
+ "name": "DL_AF_TEL_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_FAX_NO": {
+ "name": "DL_AF_FAX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_EMAIL_ADR": {
+ "name": "DL_AF_EMAIL_ADR",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_WBS_TP": {
+ "name": "PROJ_WBS_TP",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHN_PROJ_TP": {
+ "name": "CHN_PROJ_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_GRNT_FN_DT": {
+ "name": "FIN_GRNT_FN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STDT": {
+ "name": "STDT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_YN": {
+ "name": "SERS_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRO_PROJ_NO": {
+ "name": "PRO_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PBSD_PROJ_NO": {
+ "name": "PBSD_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PBSD_SHIP_NM": {
+ "name": "PBSD_SHIP_NM",
+ "type": "varchar(150)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_PLN_DT": {
+ "name": "PROJ_DL_PLN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_RT_DT": {
+ "name": "PROJ_DL_RT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_AREA": {
+ "name": "TOT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXMPT_AREA": {
+ "name": "EXMPT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXMPT_RAT": {
+ "name": "EXMPT_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNCT_PROJ_NO": {
+ "name": "CNCT_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EQP_DTL_YN": {
+ "name": "EQP_DTL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXP_YN": {
+ "name": "EXP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACT_MH_YN": {
+ "name": "ACT_MH_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPEC": {
+ "name": "SPEC",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSGN_LIFE": {
+ "name": "DSGN_LIFE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WK_ENV_WT_VAL_YN": {
+ "name": "WK_ENV_WT_VAL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRNT_STDT": {
+ "name": "GRNT_STDT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TMH_ADPT_YN": {
+ "name": "TMH_ADPT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZV_YN": {
+ "name": "ZV_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SEC_YN": {
+ "name": "SEC_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_wbs": {
+ "name": "cmctb_proj_wbs",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "WBS_ELMT": {
+ "name": "WBS_ELMT",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "WBS_ELMT_NM": {
+ "name": "WBS_ELMT_NM",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_LVL": {
+ "name": "WBS_LVL",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FLAG": {
+ "name": "FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_INSD_ELMT": {
+ "name": "WBS_INSD_ELMT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HGRK_WBS_ELMT": {
+ "name": "HGRK_WBS_ELMT",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_STAT": {
+ "name": "SYS_STAT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_1": {
+ "name": "WBS_ELMT_1",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_2": {
+ "name": "WBS_ELMT_2",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_3": {
+ "name": "WBS_ELMT_3",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_4": {
+ "name": "WBS_ELMT_4",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_5": {
+ "name": "WBS_ELMT_5",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_6": {
+ "name": "WBS_ELMT_6",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_7": {
+ "name": "WBS_ELMT_7",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_8": {
+ "name": "WBS_ELMT_8",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_9": {
+ "name": "WBS_ELMT_9",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_10": {
+ "name": "WBS_ELMT_10",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_addr": {
+ "name": "cmctb_vendor_addr",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAX_JRDT_ZONE_CD": {
+ "name": "TAX_JRDT_ZONE_CD",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_TMZ": {
+ "name": "ADR_TMZ",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_compny": {
+ "name": "cmctb_vendor_compny",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CTL_ACNT": {
+ "name": "CTL_ACNT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLN_GRP": {
+ "name": "PLN_GRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BF_VNDRCD": {
+ "name": "BF_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_INVC_ORDR": {
+ "name": "OVLAP_INVC_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_MTHD": {
+ "name": "SPLY_MTHD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_HOLD_ORDR": {
+ "name": "SPLY_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_BANK_SHRT_KEY": {
+ "name": "TRD_BANK_SHRT_KEY",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NTN_CD": {
+ "name": "SRCE_TX_NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MIN_ORDR": {
+ "name": "MIN_ORDR",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRT_SPLY_ORDR": {
+ "name": "SPRT_SPLY_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_VNDR_CLR_ORDR": {
+ "name": "CSTM_VNDR_CLR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_CD": {
+ "name": "SRCE_TX_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IATA_BIC_GB": {
+ "name": "IATA_BIC_GB",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TP": {
+ "name": "REP_TP",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOGST_VNDR_TP": {
+ "name": "LOGST_VNDR_TP",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_ACNT_NO": {
+ "name": "VNDR_ACNT_NO",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CHRGR_NM": {
+ "name": "VNDR_CHRGR_NM",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_TELNO": {
+ "name": "ACOT_CHRGR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUTH_GRP": {
+ "name": "AUTH_GRP",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_CALC_DT": {
+ "name": "FIN_IR_CALC_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_ACT_DT": {
+ "name": "FIN_IR_ACT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_FAXNO": {
+ "name": "ACOT_CHRGR_FAXNO",
+ "type": "varchar(31)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_CHRGR_EMAIL": {
+ "name": "MK_CHRGR_EMAIL",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEMO": {
+ "name": "MEMO",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MOFFC_ACNT_NO": {
+ "name": "MOFFC_ACNT_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_vendor_compny_VNDRCD_CO_CD_pk": {
+ "name": "cmctb_vendor_compny_VNDRCD_CO_CD_pk",
+ "columns": [
+ "VNDRCD",
+ "CO_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_general": {
+ "name": "cmctb_vendor_general",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP_TP": {
+ "name": "ACNT_GRP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DTM": {
+ "name": "REG_DTM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TEL_NO": {
+ "name": "REP_TEL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_FAX_NO": {
+ "name": "REP_FAX_NO",
+ "type": "varchar(31)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZR_NO": {
+ "name": "BIZR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_REG_NO": {
+ "name": "CO_REG_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_CD_4": {
+ "name": "TX_CD_4",
+ "type": "varchar(54)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_INST_DT": {
+ "name": "CO_INST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TP": {
+ "name": "VNDR_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_CD": {
+ "name": "GBL_TOP_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_NM": {
+ "name": "GBL_TOP_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_CD": {
+ "name": "DMST_TOP_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_NM": {
+ "name": "DMST_TOP_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_CD": {
+ "name": "BIZ_UOM_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_NM": {
+ "name": "BIZ_UOM_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DNS_NO": {
+ "name": "DNS_NO",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VAT_REG_NO": {
+ "name": "VAT_REG_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GIRO_VNDR_ORDR": {
+ "name": "GIRO_VNDR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNT_VNDRCD": {
+ "name": "PTNT_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_NM": {
+ "name": "QLT_CHRGR_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_TELNO": {
+ "name": "QLT_CHRGR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_EMAIL": {
+ "name": "QLT_CHRGR_EMAIL",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SB_WKA_SEQ": {
+ "name": "SB_WKA_SEQ",
+ "type": "varchar(16)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS_CD": {
+ "name": "OVLAP_CAUS_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_TP": {
+ "name": "DOC_TP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTN_DOC": {
+ "name": "PTN_DOC",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_VER": {
+ "name": "DOC_VER",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INB_FLAG": {
+ "name": "INB_FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_HOLD_ORDR": {
+ "name": "DEL_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_LCTN_CHK_NUM": {
+ "name": "INTL_LCTN_CHK_NUM",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCETX_RP_SEX_KEY": {
+ "name": "SRCETX_RP_SEX_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CNRT_CHRGR_1": {
+ "name": "VNDR_CNRT_CHRGR_1",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CNRT_CHRGR_2": {
+ "name": "VNDR_CNRT_CHRGR_2",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_RESNO": {
+ "name": "REPR_RESNO",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_VLM": {
+ "name": "CO_VLM",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_grp": {
+ "name": "cmctb_vendor_grp",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_GRP_CD": {
+ "name": "BIZ_GRP_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER_ID": {
+ "name": "CRTER_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_inco": {
+ "name": "cmctb_vendor_inco",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDRNM": {
+ "name": "VNDRNM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRTNR_GB": {
+ "name": "PRTNR_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_CD": {
+ "name": "INCO_PRTNR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_1": {
+ "name": "INCO_PRTNR_WKA_1",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_2": {
+ "name": "INCO_PRTNR_WKA_2",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_3": {
+ "name": "INCO_PRTNR_WKA_3",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JBTYPE_CD": {
+ "name": "JBTYPE_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JBTYPE_CD_2": {
+ "name": "JBTYPE_CD_2",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDV_CO_GB": {
+ "name": "INDV_CO_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_FOND_YN": {
+ "name": "INCO_FOND_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_NO": {
+ "name": "DOCK_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OCMP_INP_DT": {
+ "name": "OCMP_INP_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_DUSE_DT": {
+ "name": "INCO_DUSE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDST_INS_PMRAT": {
+ "name": "INDST_INS_PMRAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_PFRM_GRAMT": {
+ "name": "CNRT_PFRM_GRAMT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGE_RAT": {
+ "name": "WGE_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_DEPTCD_1": {
+ "name": "CRSPD_DEPTCD_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_DEPTCD_2": {
+ "name": "CRSPD_DEPTCD_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_TEAM_BLNG": {
+ "name": "CRSPD_TEAM_BLNG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_ITM_1": {
+ "name": "INCO_PRTNR_ITM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_ITM_2": {
+ "name": "INCO_PRTNR_ITM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFC_LOC": {
+ "name": "OFC_LOC",
+ "type": "varchar(240)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_OCMP_CARR": {
+ "name": "REP_OCMP_CARR",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_DUSE_CAUS": {
+ "name": "INCO_DUSE_CAUS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_NO": {
+ "name": "TEL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR1": {
+ "name": "ADR1",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR2": {
+ "name": "ADR2",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OLD_VNDRCD": {
+ "name": "OLD_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TREE_NUM": {
+ "name": "TREE_NUM",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_USR_ID": {
+ "name": "CRTE_USR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_USR_ID": {
+ "name": "CHG_USR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UPR_JBTYPE": {
+ "name": "UPR_JBTYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBYBP": {
+ "name": "ZBYBP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RMK": {
+ "name": "RMK",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WDL_PLN_YN": {
+ "name": "WDL_PLN_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGE_DELY_DVL": {
+ "name": "WGE_DELY_DVL",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESCROW_YN": {
+ "name": "ESCROW_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_porg": {
+ "name": "cmctb_vendor_porg",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORD_CUR": {
+ "name": "PUR_ORD_CUR",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CALC_SHM_GRP": {
+ "name": "CALC_SHM_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GR_BSE_INVC_VR": {
+ "name": "GR_BSE_INVC_VR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AT_PUR_ORD_ORDR": {
+ "name": "AT_PUR_ORD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORD_CNFM_REQ_ORDR": {
+ "name": "ORD_CNFM_REQ_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_CHRGR_NM": {
+ "name": "SALE_CHRGR_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TELNO": {
+ "name": "VNDR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNFM_CTL_KEY": {
+ "name": "CNFM_CTL_KEY",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_CAUS": {
+ "name": "PUR_HOLD_CAUS",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_repremail": {
+ "name": "cmctb_vendor_repremail",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprfax": {
+ "name": "cmctb_vendor_reprfax",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprtel": {
+ "name": "cmctb_vendor_reprtel",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprurl": {
+ "name": "cmctb_vendor_reprurl",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_taxnum": {
+ "name": "cmctb_vendor_taxnum",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_vfpn": {
+ "name": "cmctb_vendor_vfpn",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDR_SUB_NO": {
+ "name": "VNDR_SUB_NO",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ETC_REF_VNDRCD": {
+ "name": "ETC_REF_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_whthx": {
+ "name": "cmctb_vendor_whthx",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SRCE_TX_TP": {
+ "name": "SRCE_TX_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SRCE_TX_REL_ORDR": {
+ "name": "SRCE_TX_REL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RECIP_TP": {
+ "name": "RECIP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_IDENT_NO": {
+ "name": "SRCE_TX_IDENT_NO",
+ "type": "varchar(16)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NO": {
+ "name": "SRCE_TX_NO",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CERT_NO": {
+ "name": "DCHAG_CERT_NO",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_RAT": {
+ "name": "DCHAG_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ST_DT": {
+ "name": "DCHAG_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ED_DT": {
+ "name": "DCHAG_ED_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CAUS": {
+ "name": "DCHAG_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.plftb_estm_proj_mast": {
+ "name": "plftb_estm_proj_mast",
+ "schema": "nonsap",
+ "columns": {
+ "ESTM_PROJ_NO": {
+ "name": "ESTM_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AGND_NO": {
+ "name": "AGND_NO",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_PROJ_NM": {
+ "name": "ESTM_PROJ_NM",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_CLS": {
+ "name": "BIZ_CLS",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REV_NO": {
+ "name": "REV_NO",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_TYPE": {
+ "name": "ESTM_TYPE",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWNER_CD": {
+ "name": "OWNER_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_CNT": {
+ "name": "SERS_CNT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND_CD": {
+ "name": "SKND_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_SIZE": {
+ "name": "SHTYPE_SIZE",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHRTR_CD": {
+ "name": "CHRTR_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NATN_CD": {
+ "name": "NATN_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_3": {
+ "name": "CLS_3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATA_CRTE_GB": {
+ "name": "DATA_CRTE_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INPR_ID": {
+ "name": "FS_INPR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INP_DTM": {
+ "name": "FS_INP_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHGR_ID": {
+ "name": "FIN_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHG_DTM": {
+ "name": "FIN_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_1": {
+ "name": "VSL_VAG_1",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_2": {
+ "name": "VSL_VAG_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_3": {
+ "name": "VSL_VAG_3",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_4": {
+ "name": "VSL_VAG_4",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_APP_ID": {
+ "name": "ESTM_AOM_APP_ID",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT": {
+ "name": "ESTM_AOM_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT_CHGR_ID": {
+ "name": "ESTM_AOM_STAT_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT_CHG_DTM": {
+ "name": "ESTM_AOM_STAT_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TRGT_YN": {
+ "name": "IF_TRGT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "plftb_estm_proj_mast_ESTM_PROJ_NO_pk": {
+ "name": "plftb_estm_proj_mast_ESTM_PROJ_NO_pk",
+ "columns": [
+ "ESTM_PROJ_NO"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "ecc.PR_INFORMATION_T_BID_HEADER": {
+ "name": "PR_INFORMATION_T_BID_HEADER",
+ "schema": "ecc",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PR_INFORMATION_T_BID_HEADER_id_seq",
+ "schema": "ecc",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANFNR": {
+ "name": "ANFNR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EKGRP": {
+ "name": "EKGRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EKORG": {
+ "name": "EKORG",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBSART": {
+ "name": "ZBSART",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZRFQ_TRS_DT": {
+ "name": "ZRFQ_TRS_DT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZRFQ_TRS_TM": {
+ "name": "ZRFQ_TRS_TM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "PR_INFORMATION_T_BID_HEADER_ANFNR_unique": {
+ "name": "PR_INFORMATION_T_BID_HEADER_ANFNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ANFNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "ecc.PR_INFORMATION_T_BID_ITEM": {
+ "name": "PR_INFORMATION_T_BID_ITEM",
+ "schema": "ecc",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PR_INFORMATION_T_BID_ITEM_id_seq",
+ "schema": "ecc",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANFNR": {
+ "name": "ANFNR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ANFPS": {
+ "name": "ANFPS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AUFNR": {
+ "name": "AUFNR",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BANFN": {
+ "name": "BANFN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BANPO": {
+ "name": "BANPO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BPRME": {
+ "name": "BPRME",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "numeric(15, 3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISMM": {
+ "name": "DISMM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EBELP": {
+ "name": "EBELP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KNTTP": {
+ "name": "KNTTP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOSTL": {
+ "name": "KOSTL",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LFDAT": {
+ "name": "LFDAT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MENGE": {
+ "name": "MENGE",
+ "type": "numeric(15, 3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PEINH": {
+ "name": "PEINH",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PERNR": {
+ "name": "PERNR",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POSID": {
+ "name": "POSID",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PREIS": {
+ "name": "PREIS",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSPID": {
+ "name": "PSPID",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SAKTO": {
+ "name": "SAKTO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXZ01": {
+ "name": "TXZ01",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS1": {
+ "name": "WAERS1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS2": {
+ "name": "WAERS2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZCON_NO_PO": {
+ "name": "ZCON_NO_PO",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZREQ_FN": {
+ "name": "ZREQ_FN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZREQ_PO": {
+ "name": "ZREQ_PO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZRSLT_AMT": {
+ "name": "ZRSLT_AMT",
+ "type": "numeric(17, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.employee": {
+ "name": "employee",
+ "schema": "knox",
+ "columns": {
+ "ep_id": {
+ "name": "ep_id",
+ "type": "varchar(25)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "employee_number": {
+ "name": "employee_number",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "given_name": {
+ "name": "given_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sir_name": {
+ "name": "sir_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_code": {
+ "name": "title_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_name": {
+ "name": "title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email_address": {
+ "name": "email_address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "employee_status": {
+ "name": "employee_status",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "employee_type": {
+ "name": "employee_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "account_status": {
+ "name": "account_status",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security_level": {
+ "name": "security_level",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_language": {
+ "name": "preferred_language",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "en_company_name": {
+ "name": "en_company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_department_name": {
+ "name": "en_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_discription": {
+ "name": "en_discription",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_full_name": {
+ "name": "en_full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_given_name": {
+ "name": "en_given_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_grade_name": {
+ "name": "en_grade_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_sir_name": {
+ "name": "en_sir_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_title_name": {
+ "name": "en_title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_name": {
+ "name": "grade_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_title_indi_code": {
+ "name": "grade_title_indi_code",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "job_name": {
+ "name": "job_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "real_name_yn": {
+ "name": "real_name_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "server_location": {
+ "name": "server_location",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_sort_order": {
+ "name": "title_sort_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "knox_employee_company_department_idx": {
+ "name": "knox_employee_company_department_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "department_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_number_idx": {
+ "name": "knox_employee_number_idx",
+ "columns": [
+ {
+ "expression": "employee_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_user_id_idx": {
+ "name": "knox_employee_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_email_idx": {
+ "name": "knox_employee_email_idx",
+ "columns": [
+ {
+ "expression": "email_address",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.organization": {
+ "name": "organization",
+ "schema": "knox",
+ "columns": {
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_level": {
+ "name": "department_level",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_order": {
+ "name": "department_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_company_name": {
+ "name": "en_company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_department_name": {
+ "name": "en_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_manager_title": {
+ "name": "en_manager_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_sub_org_code": {
+ "name": "en_sub_org_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "in_department_code": {
+ "name": "in_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "low_department_yn": {
+ "name": "low_department_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_id": {
+ "name": "manager_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_title": {
+ "name": "manager_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_language": {
+ "name": "preferred_language",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_org_code": {
+ "name": "sub_org_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_org_name": {
+ "name": "sub_org_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upr_department_code": {
+ "name": "upr_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_upr_department_name": {
+ "name": "en_upr_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upr_department_name": {
+ "name": "upr_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_department_yn": {
+ "name": "hidden_department_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corp_code": {
+ "name": "corp_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corp_name": {
+ "name": "corp_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_corp_name": {
+ "name": "en_corp_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "knox_org_company_idx": {
+ "name": "knox_org_company_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "organization_company_code_department_code_pk": {
+ "name": "organization_company_code_department_code_pk",
+ "columns": [
+ "company_code",
+ "department_code"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.title": {
+ "name": "title",
+ "schema": "knox",
+ "columns": {
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title_code": {
+ "name": "title_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title_name": {
+ "name": "title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_title_name": {
+ "name": "en_title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "knox_title_company_idx": {
+ "name": "knox_title_company_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "title_company_code_title_code_pk": {
+ "name": "title_company_code_title_code_pk",
+ "columns": [
+ "company_code",
+ "title_code"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_lines": {
+ "name": "approval_lines",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "aplns": {
+ "name": "aplns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_lines_createdBy_users_id_fk": {
+ "name": "approval_lines_createdBy_users_id_fk",
+ "tableFrom": "approval_lines",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_logs": {
+ "name": "approval_logs",
+ "schema": "knox",
+ "columns": {
+ "ap_inf_id": {
+ "name": "ap_inf_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ep_id": {
+ "name": "ep_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_address": {
+ "name": "email_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "aplns": {
+ "name": "aplns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_template_history": {
+ "name": "approval_template_history",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "templateId": {
+ "name": "templateId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "changeDescription": {
+ "name": "changeDescription",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changedBy": {
+ "name": "changedBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_template_history_templateId_approval_templates_id_fk": {
+ "name": "approval_template_history_templateId_approval_templates_id_fk",
+ "tableFrom": "approval_template_history",
+ "tableTo": "approval_templates",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "templateId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "approval_template_history_changedBy_users_id_fk": {
+ "name": "approval_template_history_changedBy_users_id_fk",
+ "tableFrom": "approval_template_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "changedBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_template_variables": {
+ "name": "approval_template_variables",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "approvalTemplateId": {
+ "name": "approvalTemplateId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variableName": {
+ "name": "variableName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variableType": {
+ "name": "variableType",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "defaultValue": {
+ "name": "defaultValue",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_template_variables_approvalTemplateId_approval_templates_id_fk": {
+ "name": "approval_template_variables_approvalTemplateId_approval_templates_id_fk",
+ "tableFrom": "approval_template_variables",
+ "tableTo": "approval_templates",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "approvalTemplateId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "approval_template_variables_createdBy_users_id_fk": {
+ "name": "approval_template_variables_createdBy_users_id_fk",
+ "tableFrom": "approval_template_variables",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_templates": {
+ "name": "approval_templates",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approvalLineId": {
+ "name": "approvalLineId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_templates_approvalLineId_approval_lines_id_fk": {
+ "name": "approval_templates_approvalLineId_approval_lines_id_fk",
+ "tableFrom": "approval_templates",
+ "tableTo": "approval_lines",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "approvalLineId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "approval_templates_createdBy_users_id_fk": {
+ "name": "approval_templates_createdBy_users_id_fk",
+ "tableFrom": "approval_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "risks.risk_events": {
+ "name": "risk_events",
+ "schema": "risks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "event_type": {
+ "name": "event_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "event_status": {
+ "name": "event_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "manager_id": {
+ "name": "manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occurred_at": {
+ "name": "occurred_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "risk_events_vendor_id_vendors_id_fk": {
+ "name": "risk_events_vendor_id_vendors_id_fk",
+ "tableFrom": "risk_events",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "risk_events_manager_id_users_id_fk": {
+ "name": "risk_events_manager_id_users_id_fk",
+ "tableFrom": "risk_events",
+ "tableTo": "users",
+ "columnsFrom": [
+ "manager_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "risk_events_created_by_users_id_fk": {
+ "name": "risk_events_created_by_users_id_fk",
+ "tableFrom": "risk_events",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "risk_events_updated_by_users_id_fk": {
+ "name": "risk_events_updated_by_users_id_fk",
+ "tableFrom": "risk_events",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.user_domain": {
+ "name": "user_domain",
+ "schema": "public",
+ "values": [
+ "pending",
+ "evcp",
+ "procurement",
+ "sales",
+ "engineering",
+ "partners"
+ ]
+ },
+ "public.score_type": {
+ "name": "score_type",
+ "schema": "public",
+ "values": [
+ "fixed",
+ "variable"
+ ]
+ },
+ "public.qna_category": {
+ "name": "qna_category",
+ "schema": "public",
+ "values": [
+ "engineering",
+ "procurement",
+ "technical_sales"
+ ]
+ },
+ "public.gtc_type": {
+ "name": "gtc_type",
+ "schema": "public",
+ "values": [
+ "standard",
+ "project"
+ ]
+ },
+ "public.review_status": {
+ "name": "review_status",
+ "schema": "public",
+ "values": [
+ "draft",
+ "pending",
+ "reviewing",
+ "approved",
+ "rejected",
+ "revised"
+ ]
+ },
+ "public.consent_action": {
+ "name": "consent_action",
+ "schema": "public",
+ "values": [
+ "consent",
+ "revoke",
+ "update"
+ ]
+ },
+ "public.consent_type": {
+ "name": "consent_type",
+ "schema": "public",
+ "values": [
+ "privacy_policy",
+ "terms_of_service",
+ "marketing",
+ "optional"
+ ]
+ },
+ "public.policy_type": {
+ "name": "policy_type",
+ "schema": "public",
+ "values": [
+ "privacy_policy",
+ "terms_of_service"
+ ]
+ },
+ "public.award_count": {
+ "name": "award_count",
+ "schema": "public",
+ "values": [
+ "single",
+ "multiple"
+ ]
+ },
+ "public.bidding_status": {
+ "name": "bidding_status",
+ "schema": "public",
+ "values": [
+ "bidding_generated",
+ "request_for_quotation",
+ "received_quotation",
+ "set_target_price",
+ "bidding_opened",
+ "bidding_closed",
+ "evaluation_of_bidding",
+ "bidding_disposal",
+ "vendor_selected"
+ ]
+ },
+ "public.bidding_type": {
+ "name": "bidding_type",
+ "schema": "public",
+ "values": [
+ "equipment",
+ "construction",
+ "service",
+ "lease",
+ "steel_stock",
+ "piping",
+ "transport",
+ "waste",
+ "sale"
+ ]
+ },
+ "public.contract_type": {
+ "name": "contract_type",
+ "schema": "public",
+ "values": [
+ "unit_price",
+ "general",
+ "sale"
+ ]
+ },
+ "public.document_type": {
+ "name": "document_type",
+ "schema": "public",
+ "values": [
+ "notice",
+ "specification",
+ "specification_meeting",
+ "contract_draft",
+ "company_proposal",
+ "financial_doc",
+ "technical_doc",
+ "certificate",
+ "pr_document",
+ "spec_document",
+ "evaluation_doc",
+ "bid_attachment",
+ "other"
+ ]
+ },
+ "public.invitation_status": {
+ "name": "invitation_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "sent",
+ "accepted",
+ "declined",
+ "submitted"
+ ]
+ },
+ "public.quantity_unit": {
+ "name": "quantity_unit",
+ "schema": "public",
+ "values": [
+ "ea",
+ "set",
+ "kg",
+ "ton",
+ "m",
+ "m2",
+ "m3",
+ "lot",
+ "other"
+ ]
+ },
+ "public.weight_unit": {
+ "name": "weight_unit",
+ "schema": "public",
+ "values": [
+ "kg",
+ "ton",
+ "lb",
+ "g"
+ ]
+ }
+ },
+ "schemas": {
+ "mdg": "mdg",
+ "soap": "soap",
+ "nonsap": "nonsap",
+ "ecc": "ecc",
+ "knox": "knox",
+ "risks": "risks"
+ },
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {
+ "public.contracts_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contracts_detail_view_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_name": {
+ "name": "contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "end_date": {
+ "name": "end_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "partial_shipping_allowed": {
+ "name": "partial_shipping_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "partial_payment_allowed": {
+ "name": "partial_payment_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"contracts\".\"id\", \"contracts\".\"contract_no\", \"contracts\".\"contract_name\", \"contracts\".\"status\", \"contracts\".\"start_date\", \"contracts\".\"end_date\", \"contracts\".\"project_id\", \"projects\".\"code\", \"projects\".\"name\", \"contracts\".\"vendor_id\", \"vendors\".\"vendor_name\", \"contracts\".\"payment_terms\", \"contracts\".\"delivery_terms\", \"contracts\".\"delivery_date\", \"contracts\".\"delivery_location\", \"contracts\".\"currency\", \"contracts\".\"total_amount\", \"contracts\".\"discount\", \"contracts\".\"tax\", \"contracts\".\"shipping_fee\", \"contracts\".\"net_total\", \"contracts\".\"partial_shipping_allowed\", \"contracts\".\"partial_payment_allowed\", \"contracts\".\"remarks\", \"contracts\".\"version\", \"contracts\".\"created_at\", \"contracts\".\"updated_at\", EXISTS (\n SELECT 1 \n FROM \"contract_envelopes\" \n WHERE \"contract_envelopes\".\"contract_id\" = \"contracts\".\"id\"\n ) as \"has_signature\", COALESCE((\n SELECT json_agg(\n json_build_object(\n 'id', ci.id,\n 'itemId', ci.item_id,\n 'description', ci.description,\n 'quantity', ci.quantity,\n 'unitPrice', ci.unit_price,\n 'taxRate', ci.tax_rate,\n 'taxAmount', ci.tax_amount,\n 'totalLineAmount', ci.total_line_amount,\n 'remark', ci.remark,\n 'createdAt', ci.created_at,\n 'updatedAt', ci.updated_at\n )\n )\n FROM \"contract_items\" AS ci\n WHERE ci.contract_id = \"contracts\".\"id\"\n ), '[]') as \"items\", COALESCE((\n SELECT json_agg(\n json_build_object(\n 'id', ce.id,\n 'envelopeId', ce.envelope_id,\n 'documentId', ce.document_id,\n 'envelopeStatus', ce.envelope_status,\n 'fileName', ce.file_name,\n 'filePath', ce.file_path,\n 'createdAt', ce.created_at,\n 'updatedAt', ce.updated_at,\n 'signers', (\n SELECT json_agg(\n json_build_object(\n 'id', cs.id,\n 'vendorContactId', cs.vendor_contact_id,\n 'signerType', cs.signer_type,\n 'signerEmail', cs.signer_email,\n 'signerName', cs.signer_name,\n 'signerPosition', cs.signer_position,\n 'signerStatus', cs.signer_status,\n 'signedAt', cs.signed_at\n )\n )\n FROM \"contract_signers\" AS cs\n WHERE cs.envelope_id = ce.id\n )\n )\n )\n FROM \"contract_envelopes\" AS ce\n WHERE ce.contract_id = \"contracts\".\"id\"\n ), '[]') as \"envelopes\" from \"contracts\" left join \"projects\" on \"contracts\".\"project_id\" = \"projects\".\"id\" left join \"vendors\" on \"contracts\".\"vendor_id\" = \"vendors\".\"id\"",
+ "name": "contracts_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.poa_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "poa_detail_view_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_status": {
+ "name": "approval_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"poa\".\"id\", \"poa\".\"contract_no\", \"contracts\".\"project_id\", \"contracts\".\"vendor_id\", \"poa\".\"change_reason\", \"poa\".\"approval_status\", \"contracts\".\"contract_name\" as \"original_contract_name\", \"contracts\".\"status\" as \"original_status\", \"contracts\".\"start_date\" as \"original_start_date\", \"contracts\".\"end_date\" as \"original_end_date\", \"poa\".\"delivery_terms\", \"poa\".\"delivery_date\", \"poa\".\"delivery_location\", \"poa\".\"currency\", \"poa\".\"total_amount\", \"poa\".\"discount\", \"poa\".\"tax\", \"poa\".\"shipping_fee\", \"poa\".\"net_total\", \"poa\".\"created_at\", \"poa\".\"updated_at\", EXISTS (\n SELECT 1 \n FROM \"contract_envelopes\" \n WHERE \"contract_envelopes\".\"contract_id\" = \"poa\".\"id\"\n ) as \"has_signature\" from \"poa\" left join \"contracts\" on \"poa\".\"contract_no\" = \"contracts\".\"contract_no\"",
+ "name": "poa_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.project_approved_vendors": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "name_ko": {
+ "name": "name_ko",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_en": {
+ "name": "name_en",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ship'"
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendors\".\"id\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendors\".\"tax_id\", \"vendors\".\"email\", \"vendors\".\"phone\", \"vendors\".\"status\", \"vendor_types\".\"name_ko\", \"vendor_types\".\"name_en\", \"projects\".\"code\", \"projects\".\"name\", \"projects\".\"type\", \"vendor_pq_submissions\".\"submitted_at\", \"vendor_pq_submissions\".\"approved_at\" from \"vendors\" inner join \"vendor_pq_submissions\" on \"vendor_pq_submissions\".\"vendor_id\" = \"vendors\".\"id\" inner join \"projects\" on \"vendor_pq_submissions\".\"project_id\" = \"projects\".\"id\" left join \"vendor_types\" on \"vendors\".\"vendor_type_id\" = \"vendor_types\".\"id\" where \"vendor_pq_submissions\".\"status\" = 'APPROVED'",
+ "name": "project_approved_vendors",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_investigations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pq_submission_id": {
+ "name": "pq_submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "qm_manager_id": {
+ "name": "qm_manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_status": {
+ "name": "investigation_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "investigation_address": {
+ "name": "investigation_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_method": {
+ "name": "investigation_method",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_start_at": {
+ "name": "scheduled_start_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_end_at": {
+ "name": "scheduled_end_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "forecasted_at": {
+ "name": "forecasted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_result": {
+ "name": "evaluation_result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_notes": {
+ "name": "investigation_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pq_items": {
+ "name": "pq_items",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendor_investigations\".\"id\", \"vendor_investigations\".\"vendor_id\", \"vendor_investigations\".\"pq_submission_id\", \"vendor_investigations\".\"requester_id\", \"vendor_investigations\".\"qm_manager_id\", \"vendor_investigations\".\"investigation_status\", \"vendor_investigations\".\"investigation_address\", \"vendor_investigations\".\"investigation_method\", \"vendor_investigations\".\"scheduled_start_at\", \"vendor_investigations\".\"scheduled_end_at\", \"vendor_investigations\".\"forecasted_at\", \"vendor_investigations\".\"requested_at\", \"vendor_investigations\".\"confirmed_at\", \"vendor_investigations\".\"completed_at\", \"vendor_investigations\".\"evaluation_score\", \"vendor_investigations\".\"evaluation_result\", \"vendor_investigations\".\"investigation_notes\", \"vendor_investigations\".\"created_at\", \"vendor_investigations\".\"updated_at\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendor_pq_submissions\".\"pq_items\", requester.name as \"requesterName\", requester.email as \"requesterEmail\", qm_manager.name as \"qmManagerName\", qm_manager.email as \"qmManagerEmail\", (\n CASE \n WHEN EXISTS (\n SELECT 1 FROM vendor_investigation_attachments via \n WHERE via.investigation_id = \"vendor_investigations\".\"id\"\n ) \n THEN true \n ELSE false \n END\n ) as \"hasAttachments\" from \"vendor_investigations\" left join \"vendors\" on \"vendor_investigations\".\"vendor_id\" = \"vendors\".\"id\" left join users AS requester on \"vendor_investigations\".\"requester_id\" = requester.id left join users AS qm_manager on \"vendor_investigations\".\"qm_manager_id\" = qm_manager.id left join \"vendor_pq_submissions\" on \"vendor_investigations\".\"pq_submission_id\" = \"vendor_pq_submissions\".\"id\"",
+ "name": "vendor_investigations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.cbe_view": {
+ "columns": {},
+ "definition": "select \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"rfq_id\" as \"rfq_id\", \"cbe_evaluations\".\"vendor_id\" as \"vendor_id\", \"cbe_evaluations\".\"total_cost\" as \"total_cost\", \"cbe_evaluations\".\"currency\" as \"currency\", \"cbe_evaluations\".\"payment_terms\" as \"payment_terms\", \"cbe_evaluations\".\"incoterms\" as \"incoterms\", \"cbe_evaluations\".\"result\" as \"result\", \"cbe_evaluations\".\"notes\" as \"notes\", \"cbe_evaluations\".\"evaluated_by\" as \"evaluated_by\", \"cbe_evaluations\".\"evaluated_at\" as \"evaluated_at\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"users\".\"name\" as \"evaluator_name\", \"users\".\"email\" as \"evaluator_email\" from \"cbe_evaluations\" inner join \"rfqs\" on \"cbe_evaluations\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"cbe_evaluations\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" on \"cbe_evaluations\".\"evaluated_by\" = \"users\".\"id\"",
+ "name": "cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfqs_view": {
+ "columns": {},
+ "definition": "select \"rfqs\".\"id\" as \"rfq_id\", \"rfqs\".\"status\" as \"status\", \"rfqs\".\"created_at\" as \"created_at\", \"rfqs\".\"updated_at\" as \"updated_at\", \"rfqs\".\"created_by\" as \"created_by\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"rfqs\".\"parent_rfq_id\" as \"parent_rfq_id\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"users\".\"email\" as \"user_email\", \"users\".\"name\" as \"user_name\", (\n SELECT COUNT(*) \n FROM \"rfq_items\" \n WHERE \"rfq_items\".\"rfq_id\" = \"rfqs\".\"id\"\n ) as \"item_count\", (\n SELECT COUNT(*) \n FROM \"rfq_attachments\" \n WHERE \"rfq_attachments\".\"rfq_id\" = \"rfqs\".\"id\"\n ) as \"attachment_count\" from \"rfqs\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" on \"rfqs\".\"created_by\" = \"users\".\"id\"",
+ "name": "rfqs_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_cbe_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"id\" as \"vendor_response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"result\" as \"cbe_result\", \"cbe_evaluations\".\"notes\" as \"cbe_note\", \"cbe_evaluations\".\"updated_at\" as \"cbe_updated\", \"cbe_evaluations\".\"total_cost\" as \"total_cost\", \"cbe_evaluations\".\"currency\" as \"currency\", \"cbe_evaluations\".\"payment_terms\" as \"payment_terms\", \"cbe_evaluations\".\"incoterms\" as \"incoterms\", \"cbe_evaluations\".\"delivery_schedule\" as \"delivery_schedule\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"cbe_evaluations\" on (\"cbe_evaluations\".\"vendor_id\" = \"vendors\".\"id\" and \"cbe_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\")",
+ "name": "vendor_cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_cbe_view": {
+ "columns": {},
+ "definition": "select \"vendor_responses\".\"id\" as \"response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"vendor_id\" as \"vendor_id\", \"vendor_responses\".\"response_status\" as \"response_status\", \"vendor_responses\".\"notes\" as \"response_notes\", \"vendor_responses\".\"responded_by\" as \"responded_by\", \"vendor_responses\".\"responded_at\" as \"responded_at\", \"vendor_responses\".\"updated_at\" as \"response_updated_at\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"rfqs\".\"due_date\" as \"rfq_due_date\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"status\" as \"vendor_status\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"vendor_commercial_responses\".\"id\" as \"commercial_response_id\", \"vendor_commercial_responses\".\"response_status\" as \"commercial_response_status\", \"vendor_commercial_responses\".\"total_price\" as \"total_price\", \"vendor_commercial_responses\".\"currency\" as \"currency\", \"vendor_commercial_responses\".\"payment_terms\" as \"payment_terms\", \"vendor_commercial_responses\".\"incoterms\" as \"incoterms\", \"vendor_commercial_responses\".\"delivery_period\" as \"delivery_period\", \"vendor_commercial_responses\".\"warranty_period\" as \"warranty_period\", \"vendor_commercial_responses\".\"validity_period\" as \"validity_period\", \"vendor_commercial_responses\".\"price_breakdown\" as \"price_breakdown\", \"vendor_commercial_responses\".\"commercial_notes\" as \"commercial_notes\", \"vendor_commercial_responses\".\"created_at\" as \"commercial_created_at\", \"vendor_commercial_responses\".\"updated_at\" as \"commercial_updated_at\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"attachment_count\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"commercial_response_id\" = \"vendor_commercial_responses\".\"id\"\n ) as \"commercial_attachment_count\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n AND \"vendor_response_attachments\".\"attachment_type\" = 'TECHNICAL_SPEC'\n ) as \"technical_attachment_count\", (\n SELECT MAX(\"uploaded_at\") \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"latest_attachment_date\" from \"vendor_responses\" inner join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_commercial_responses\" on \"vendor_commercial_responses\".\"response_id\" = \"vendor_responses\".\"id\"",
+ "name": "vendor_response_cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_responses_view": {
+ "columns": {},
+ "definition": "select \"vendor_responses\".\"id\" as \"response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"vendor_id\" as \"vendor_id\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"rfqs\".\"due_date\" as \"rfq_due_date\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"created_at\" as \"rfq_created_at\", \"rfqs\".\"updated_at\" as \"rfq_updated_at\", \"rfqs\".\"created_by\" as \"rfq_created_by\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendor_responses\".\"response_status\" as \"response_status\", \"vendor_responses\".\"responded_at\" as \"responded_at\", CASE WHEN \"vendor_technical_responses\".\"id\" IS NOT NULL THEN TRUE ELSE FALSE END as \"has_technical_response\", \"vendor_technical_responses\".\"id\" as \"technical_response_id\", CASE WHEN \"vendor_commercial_responses\".\"id\" IS NOT NULL THEN TRUE ELSE FALSE END as \"has_commercial_response\", \"vendor_commercial_responses\".\"id\" as \"commercial_response_id\", \"vendor_commercial_responses\".\"total_price\" as \"total_price\", \"vendor_commercial_responses\".\"currency\" as \"currency\", \"rfq_evaluations\".\"id\" as \"tbe_id\", \"rfq_evaluations\".\"result\" as \"tbe_result\", \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"result\" as \"cbe_result\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"attachment_count\" from \"vendor_responses\" inner join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_technical_responses\" on \"vendor_technical_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"vendor_commercial_responses\" on \"vendor_commercial_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"rfq_evaluations\" on (\"rfq_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\" and \"rfq_evaluations\".\"vendor_id\" = \"vendor_responses\".\"vendor_id\" and \"rfq_evaluations\".\"eval_type\" = 'TBE') left join \"cbe_evaluations\" on (\"cbe_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\" and \"cbe_evaluations\".\"vendor_id\" = \"vendor_responses\".\"vendor_id\")",
+ "name": "vendor_responses_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_rfq_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\"",
+ "name": "vendor_rfq_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_tbe_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"id\" as \"vendor_response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"vendor_technical_responses\".\"id\" as \"technical_response_id\", \"vendor_technical_responses\".\"response_status\" as \"technical_response_status\", \"vendor_technical_responses\".\"summary\" as \"technical_summary\", \"vendor_technical_responses\".\"notes\" as \"technical_notes\", \"vendor_technical_responses\".\"updated_at\" as \"technical_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"rfq_evaluations\".\"id\" as \"tbe_id\", \"rfq_evaluations\".\"result\" as \"tbe_result\", \"rfq_evaluations\".\"notes\" as \"tbe_note\", \"rfq_evaluations\".\"updated_at\" as \"tbe_updated\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_technical_responses\" on \"vendor_technical_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"rfq_evaluations\" on (\"rfq_evaluations\".\"vendor_id\" = \"vendors\".\"id\" and \"rfq_evaluations\".\"eval_type\" = 'TBE' and \"rfq_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\")",
+ "name": "vendor_tbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.role_view": {
+ "columns": {},
+ "definition": "select \"roles\".\"id\" as \"id\", \"roles\".\"name\" as \"name\", \"roles\".\"description\" as \"description\", \"roles\".\"domain\" as \"domain\", \"roles\".\"created_at\" as \"created_at\", \"vendors\".\"id\" as \"company_id\", \"vendors\".\"vendor_name\" as \"company_name\", COUNT(\"users\".\"id\") as \"user_count\" from \"roles\" left join \"user_roles\" on \"user_roles\".\"role_id\" = \"roles\".\"id\" left join \"users\" on \"users\".\"id\" = \"user_roles\".\"user_id\" left join \"vendors\" on \"roles\".\"company_id\" = \"vendors\".\"id\" group by \"roles\".\"id\", \"vendors\".\"id\"",
+ "name": "role_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.user_view": {
+ "columns": {},
+ "definition": "select \"users\".\"id\" as \"user_id\", \"users\".\"name\" as \"user_name\", \"users\".\"phone\" as \"user_phone\", \"users\".\"email\" as \"user_email\", \"users\".\"domain\" as \"user_domain\", \"users\".\"image_url\" as \"user_image\", \"vendors\".\"id\" as \"company_id\", \"vendors\".\"vendor_name\" as \"company_name\", \n array_agg(\"roles\".\"name\")\n as \"roles\", \"users\".\"created_at\" as \"created_at\" from \"users\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"user_roles\" on \"users\".\"id\" = \"user_roles\".\"user_id\" left join \"roles\" on \"user_roles\".\"role_id\" = \"roles\".\"id\" group by \"users\".\"id\", \"vendors\".\"id\"",
+ "name": "user_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.form_lists_view": {
+ "columns": {},
+ "definition": "select \"tag_type_class_form_mappings\".\"id\" as \"id\", \"tag_type_class_form_mappings\".\"project_id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"tag_type_class_form_mappings\".\"tag_type_label\" as \"tag_type_label\", \"tag_type_class_form_mappings\".\"class_label\" as \"class_label\", \"tag_type_class_form_mappings\".\"form_code\" as \"form_code\", \"tag_type_class_form_mappings\".\"form_name\" as \"form_name\", \"tag_type_class_form_mappings\".\"ep\" as \"ep\", \"tag_type_class_form_mappings\".\"remark\" as \"remark\", \"tag_type_class_form_mappings\".\"created_at\" as \"created_at\", \"tag_type_class_form_mappings\".\"updated_at\" as \"updated_at\" from \"tag_type_class_form_mappings\" inner join \"projects\" on \"tag_type_class_form_mappings\".\"project_id\" = \"projects\".\"id\"",
+ "name": "form_lists_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.view_tag_subfields": {
+ "columns": {
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_description": {
+ "name": "attributes_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expression": {
+ "name": "expression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delimiter": {
+ "name": "delimiter",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"tag_subfields\".\"id\" as \"id\", \"tag_subfields\".\"tag_type_code\", \"tag_types\".\"description\", \"tag_subfields\".\"attributes_id\", \"tag_subfields\".\"attributes_description\", \"tag_subfields\".\"expression\", \"tag_subfields\".\"delimiter\", \"tag_subfields\".\"sort_order\", \"tag_subfields\".\"created_at\", \"tag_subfields\".\"updated_at\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\", \"projects\".\"name\" from \"tag_subfields\" inner join \"tag_types\" on (\"tag_subfields\".\"tag_type_code\" = \"tag_types\".\"code\" and \"tag_subfields\".\"project_id\" = \"tag_types\".\"project_id\") inner join \"projects\" on \"tag_subfields\".\"project_id\" = \"projects\".\"id\"",
+ "name": "view_tag_subfields",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.document_stages_only_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n d.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM documents d\n LEFT JOIN issue_stages ist ON d.id = ist.document_id\n GROUP BY d.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n -- 문서별 스테이지 집계 (리비전 제외)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'description', ist.description,\n 'notes', ist.notes,\n 'reminderDays', ist.reminder_days\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.doc_number,\n d.drawing_kind,\n d.vendor_doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n -- 프로젝트 및 벤더 정보\n p.code as project_code,\n v.vendor_name as vendor_name,\n v.vendor_code as vendor_code,\n c.vendor_id as vendor_id,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 전체 스테이지 (리비전 제외)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 메타 정보\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- 프로젝트 및 벤더 정보 JOIN\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN projects p ON c.project_id = p.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n -- 스테이지 관련 정보 JOIN\n LEFT JOIN document_stats ds ON d.id = ds.document_id\n LEFT JOIN current_stage_info csi ON d.id = csi.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "document_stages_only_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.document_stages_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_count": {
+ "name": "stage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_list": {
+ "name": "stage_list",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT\n d.id AS document_id,\n d.doc_number,\n d.title,\n d.status,\n d.issued_date,\n d.contract_id,\n (SELECT COUNT(*) FROM issue_stages WHERE document_id = d.id) AS stage_count,\n COALESCE( \n (SELECT json_agg(i.stage_name) FROM issue_stages i WHERE i.document_id = d.id), \n '[]'\n ) AS stage_list,\n d.created_at,\n d.updated_at\n FROM documents d\n",
+ "name": "document_stages_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.enhanced_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision": {
+ "name": "latest_revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_status": {
+ "name": "latest_revision_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_name": {
+ "name": "latest_revision_uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_submitted_date": {
+ "name": "latest_submitted_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n d.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM documents d\n LEFT JOIN issue_stages ist ON d.id = ist.document_id\n GROUP BY d.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n latest_revision_info AS (\n SELECT DISTINCT ON (ist.document_id)\n ist.document_id,\n r.id as latest_revision_id,\n r.revision as latest_revision,\n r.revision_status as latest_revision_status,\n r.uploader_name as latest_revision_uploader_name,\n r.submitted_date as latest_submitted_date\n FROM revisions r\n JOIN issue_stages ist ON r.issue_stage_id = ist.id\n ORDER BY ist.document_id, r.created_at DESC\n ),\n -- 리비전별 첨부파일 집계\n revision_attachments AS (\n SELECT \n r.id as revision_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', da.id,\n 'revisionId', da.revision_id,\n 'fileName', da.file_name,\n 'filePath', da.file_path,\n 'fileSize', da.file_size,\n 'fileType', da.file_type,\n 'createdAt', da.created_at,\n 'updatedAt', da.updated_at\n ) ORDER BY da.created_at\n ) FILTER (WHERE da.id IS NOT NULL),\n '[]'::json\n ) as attachments\n FROM revisions r\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY r.id\n ),\n -- 스테이지별 리비전 집계 (첨부파일 포함)\n stage_revisions AS (\n SELECT \n ist.id as stage_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', r.id,\n 'issueStageId', r.issue_stage_id,\n 'revision', r.revision,\n 'uploaderType', r.uploader_type,\n 'uploaderId', r.uploader_id,\n 'uploaderName', r.uploader_name,\n 'comment', r.comment,\n 'usage', r.usage,\n 'revisionStatus', r.revision_status,\n 'submittedDate', r.submitted_date,\n 'uploadedAt', r.uploaded_at,\n 'approvedDate', r.approved_date,\n 'reviewStartDate', r.review_start_date,\n 'rejectedDate', r.rejected_date,\n 'reviewerId', r.reviewer_id,\n 'reviewerName', r.reviewer_name,\n 'reviewComments', r.review_comments,\n 'createdAt', r.created_at,\n 'updatedAt', r.updated_at,\n 'attachments', ra.attachments\n ) ORDER BY r.created_at\n ) FILTER (WHERE r.id IS NOT NULL),\n '[]'::json\n ) as revisions\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN revision_attachments ra ON r.id = ra.revision_id\n GROUP BY ist.id\n ),\n -- 문서별 스테이지 집계 (리비전 포함)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'revisions', sr.revisions\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n LEFT JOIN stage_revisions sr ON ist.id = sr.stage_id\n GROUP BY ist.document_id\n ),\n attachment_counts AS (\n SELECT \n ist.document_id,\n COUNT(da.id) as attachment_count\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.doc_number,\n d.drawing_kind,\n d.vendor_doc_number, -- ✅ 벤더 문서 번호 추가\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n\n d.c_gbn,\n d.d_gbn,\n d.degree_gbn,\n d.dept_gbn,\n d.s_gbn,\n d.j_gbn,\n\n\n \n -- ✅ 프로젝트 및 벤더 정보 추가\n c.project_id as project_id,\n p.code as project_code,\n v.vendor_name as vendor_name,\n v.vendor_code as vendor_code,\n c.vendor_id as vendor_id,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 최신 리비전 정보\n lri.latest_revision_id,\n lri.latest_revision,\n lri.latest_revision_status,\n lri.latest_revision_uploader_name,\n lri.latest_submitted_date,\n \n -- 전체 스테이지 (리비전 및 첨부파일 포함)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 기타\n COALESCE(ac.attachment_count, 0) as attachment_count,\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- ✅ contracts, projects, vendors 테이블 JOIN 추가\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN projects p ON c.project_id = p.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n LEFT JOIN document_stats ds ON d.id = ds.document_id\n LEFT JOIN current_stage_info csi ON d.id = csi.document_id\n LEFT JOIN latest_revision_info lri ON d.id = lri.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n LEFT JOIN attachment_counts ac ON d.id = ac.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "enhanced_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.simplified_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_move_gbn": {
+ "name": "drawing_move_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discipline": {
+ "name": "discipline",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_document_id": {
+ "name": "external_document_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_system_type": {
+ "name": "external_system_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_synced_at": {
+ "name": "external_synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_drawing_no": {
+ "name": "shi_drawing_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager": {
+ "name": "manager",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_enm": {
+ "name": "manager_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_no": {
+ "name": "manager_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group": {
+ "name": "register_group",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group_id": {
+ "name": "register_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_no": {
+ "name": "create_user_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_id": {
+ "name": "create_user_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_enm": {
+ "name": "create_user_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_id": {
+ "name": "first_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_name": {
+ "name": "first_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_plan_date": {
+ "name": "first_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_actual_date": {
+ "name": "first_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_id": {
+ "name": "second_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_name": {
+ "name": "second_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_plan_date": {
+ "name": "second_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_actual_date": {
+ "name": "second_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH \n -- 리비전별 첨부파일 집계\n revision_attachments AS (\n SELECT \n r.id as revision_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', da.id,\n 'revisionId', da.revision_id,\n 'fileName', da.file_name,\n 'filePath', da.file_path,\n 'fileSize', da.file_size,\n 'fileType', da.file_type,\n 'createdAt', da.created_at,\n 'updatedAt', da.updated_at\n ) ORDER BY da.created_at\n ) FILTER (WHERE da.id IS NOT NULL),\n '[]'::json\n ) as attachments\n FROM revisions r\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY r.id\n ),\n \n -- 스테이지별 리비전 집계 (첨부파일 포함)\n stage_revisions AS (\n SELECT \n ist.id as stage_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', r.id,\n 'issueStageId', r.issue_stage_id,\n 'revision', r.revision,\n 'uploaderType', r.uploader_type,\n 'uploaderId', r.uploader_id,\n 'uploaderName', r.uploader_name,\n 'comment', r.comment,\n 'usage', r.usage,\n 'usageType', r.usage_type,\n 'revisionStatus', r.revision_status,\n 'submittedDate', r.submitted_date,\n 'uploadedAt', r.uploaded_at,\n 'approvedDate', r.approved_date,\n 'reviewStartDate', r.review_start_date,\n 'rejectedDate', r.rejected_date,\n 'reviewerId', r.reviewer_id,\n 'reviewerName', r.reviewer_name,\n 'reviewComments', r.review_comments,\n 'createdAt', r.created_at,\n 'updatedAt', r.updated_at,\n 'attachments', COALESCE(ra.attachments, '[]'::json)\n ) ORDER BY r.created_at\n ) FILTER (WHERE r.id IS NOT NULL),\n '[]'::json\n ) as revisions\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN revision_attachments ra ON r.id = ra.revision_id\n GROUP BY ist.id\n ),\n \n -- 문서별 스테이지 집계 (리비전 포함)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'revisions', COALESCE(sr.revisions, '[]'::json)\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n LEFT JOIN stage_revisions sr ON ist.id = sr.stage_id\n GROUP BY ist.document_id\n ),\n \n -- 첫 번째 스테이지 정보 (drawingKind에 따라 다른 조건)\n first_stage_info AS (\n SELECT \n document_id,\n first_stage_id,\n first_stage_name,\n first_stage_plan_date,\n first_stage_actual_date\n FROM (\n SELECT \n ist.document_id,\n ist.id as first_stage_id,\n ist.stage_name as first_stage_name,\n ist.plan_date as first_stage_plan_date,\n ist.actual_date as first_stage_actual_date,\n ROW_NUMBER() OVER (PARTITION BY ist.document_id ORDER BY ist.stage_order ASC) as rn\n FROM issue_stages ist\n JOIN documents d ON ist.document_id = d.id\n WHERE \n (d.drawing_kind = 'B4' AND LOWER(ist.stage_name) LIKE '%pre%') OR\n (d.drawing_kind = 'B3' AND LOWER(ist.stage_name) LIKE '%approval%') OR\n (d.drawing_kind = 'B5' AND LOWER(ist.stage_name) LIKE '%first%')\n ) ranked\n WHERE rn = 1\n ),\n \n -- 두 번째 스테이지 정보 (drawingKind에 따라 다른 조건)\n second_stage_info AS (\n SELECT \n document_id,\n second_stage_id,\n second_stage_name,\n second_stage_plan_date,\n second_stage_actual_date\n FROM (\n SELECT \n ist.document_id,\n ist.id as second_stage_id,\n ist.stage_name as second_stage_name,\n ist.plan_date as second_stage_plan_date,\n ist.actual_date as second_stage_actual_date,\n ROW_NUMBER() OVER (PARTITION BY ist.document_id ORDER BY ist.stage_order ASC) as rn\n FROM issue_stages ist\n JOIN documents d ON ist.document_id = d.id\n WHERE \n (d.drawing_kind = 'B4' AND LOWER(ist.stage_name) LIKE '%work%') OR\n (d.drawing_kind = 'B3' AND LOWER(ist.stage_name) LIKE '%work%') OR\n (d.drawing_kind = 'B5' AND LOWER(ist.stage_name) LIKE '%second%')\n ) ranked\n WHERE rn = 1\n ),\n \n -- 첨부파일 수 집계\n attachment_counts AS (\n SELECT \n ist.document_id,\n COUNT(da.id) as attachment_count\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.project_id,\n d.vendor_id,\n d.doc_number,\n d.drawing_kind,\n d.drawing_move_gbn,\n d.discipline,\n d.vendor_doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n -- 외부 시스템 연동 정보\n d.external_document_id,\n d.external_system_type,\n d.external_synced_at,\n \n -- DOLCE 응답의 추가 정보들\n d.shi_drawing_no,\n d.manager,\n d.manager_enm,\n d.manager_no,\n d.register_group,\n d.register_group_id,\n \n -- 생성자 정보\n d.create_user_no,\n d.create_user_id,\n d.create_user_enm,\n \n -- 프로젝트 및 벤더 정보\n p.code as project_code,\n v.vendor_name,\n v.vendor_code,\n \n -- B4 전용 필드들\n d.c_gbn,\n d.d_gbn,\n d.degree_gbn,\n d.dept_gbn,\n d.s_gbn,\n d.j_gbn,\n \n -- 첫 번째 스테이지 정보\n fsi.first_stage_id,\n fsi.first_stage_name,\n fsi.first_stage_plan_date,\n fsi.first_stage_actual_date,\n \n -- 두 번째 스테이지 정보\n ssi.second_stage_id,\n ssi.second_stage_name,\n ssi.second_stage_plan_date,\n ssi.second_stage_actual_date,\n \n -- 전체 스테이지 (리비전 및 첨부파일 포함)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 기타\n COALESCE(ac.attachment_count, 0) as attachment_count,\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- projects, vendors 테이블 JOIN (projectId가 이제 documents에 직접 있음)\n LEFT JOIN projects p ON d.project_id = p.id AND p.type = 'ship'\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n -- 스테이지 정보 JOIN\n LEFT JOIN first_stage_info fsi ON d.id = fsi.document_id\n LEFT JOIN second_stage_info ssi ON d.id = ssi.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n LEFT JOIN attachment_counts ac ON d.id = ac.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "simplified_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.stage_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n sd.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM stage_documents sd\n LEFT JOIN stage_issue_stages ist ON sd.id = ist.document_id\n GROUP BY sd.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM stage_issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n -- 문서별 스테이지 집계 (리비전 제외)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'description', ist.description,\n 'notes', ist.notes,\n 'reminderDays', ist.reminder_days\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM stage_issue_stages ist\n GROUP BY ist.document_id\n )\n \n SELECT \n sd.id as document_id,\n sd.doc_number,\n sd.vendor_doc_number,\n sd.title,\n sd.status,\n sd.issued_date,\n \n -- 프로젝트 및 벤더 정보 (직접 참조로 간소화)\n sd.project_id,\n sd.contract_id,\n p.code as project_code,\n sd.vendor_id,\n v.vendor_name,\n v.vendor_code,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 전체 스테이지 (리비전 제외)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 메타 정보\n sd.created_at,\n sd.updated_at\n \n FROM stage_documents sd\n -- 간소화된 JOIN (vendors는 vendor_id로 직접 조인)\n LEFT JOIN projects p ON sd.project_id = p.id\n LEFT JOIN vendors v ON sd.vendor_id = v.id\n \n -- 스테이지 관련 정보 JOIN\n LEFT JOIN document_stats ds ON sd.id = ds.document_id\n LEFT JOIN current_stage_info csi ON sd.id = csi.document_id\n LEFT JOIN stage_aggregation sa ON sd.id = sa.document_id\n \n ORDER BY sd.created_at DESC\n",
+ "name": "stage_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.sync_status_view": {
+ "columns": {
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_changes": {
+ "name": "total_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pending_changes": {
+ "name": "pending_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "synced_changes": {
+ "name": "synced_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "failed_changes": {
+ "name": "failed_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_sync_at": {
+ "name": "last_sync_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "next_sync_at": {
+ "name": "next_sync_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_enabled": {
+ "name": "sync_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n WITH change_stats AS (\n SELECT \n cl.vendor_id,\n sc.target_system,\n COUNT(*) as total_changes,\n COUNT(CASE WHEN cl.is_synced = false AND cl.sync_attempts < sc.retry_max_attempts THEN 1 END) as pending_changes,\n COUNT(CASE WHEN cl.is_synced = true THEN 1 END) as synced_changes,\n COUNT(CASE WHEN cl.sync_attempts >= sc.retry_max_attempts AND cl.is_synced = false THEN 1 END) as failed_changes,\n MAX(cl.synced_at) as last_sync_at\n FROM change_logs cl\n CROSS JOIN sync_configs sc \n WHERE cl.vendor_id = sc.vendor_id\n AND (cl.target_systems IS NULL OR cl.target_systems @> to_jsonb(ARRAY[sc.target_system]))\n GROUP BY cl.vendor_id, sc.target_system\n )\n SELECT \n cs.vendor_id,\n cs.target_system,\n COALESCE(cs.total_changes, 0) as total_changes,\n COALESCE(cs.pending_changes, 0) as pending_changes,\n COALESCE(cs.synced_changes, 0) as synced_changes,\n COALESCE(cs.failed_changes, 0) as failed_changes,\n cs.last_sync_at,\n CASE \n WHEN sc.sync_enabled = true AND sc.last_successful_sync IS NOT NULL \n THEN sc.last_successful_sync + (sc.sync_interval_minutes || ' minutes')::interval\n ELSE NULL\n END as next_sync_at,\n sc.sync_enabled\n FROM sync_configs sc\n LEFT JOIN change_stats cs ON sc.vendor_id = cs.vendor_id AND sc.target_system = cs.target_system\n",
+ "name": "sync_status_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_documents_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latest_stage_id": {
+ "name": "latest_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_name": {
+ "name": "latest_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_plan_date": {
+ "name": "latest_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_actual_date": {
+ "name": "latest_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision": {
+ "name": "latest_revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_type": {
+ "name": "latest_revision_uploader_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_name": {
+ "name": "latest_revision_uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT \n d.id, \n d.doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n (SELECT id FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_id,\n (SELECT stage_name FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_name,\n (SELECT plan_date FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_plan_date,\n (SELECT actual_date FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_actual_date,\n \n (SELECT r.id FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_id,\n (SELECT r.revision FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision,\n (SELECT r.uploader_type FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_uploader_type,\n (SELECT r.uploader_name FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_uploader_name,\n \n (SELECT COUNT(*) FROM document_attachments a JOIN revisions r ON a.revision_id = r.id JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id) AS attachment_count,\n \n d.created_at,\n d.updated_at\n FROM documents d\n JOIN contracts c ON d.contract_id = c.id\n ",
+ "name": "vendor_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_candidates_with_vendor_info": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'COLLECTED'"
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendor_candidates\".\"id\", \"vendor_candidates\".\"company_name\", \"vendor_candidates\".\"contact_email\", \"vendor_candidates\".\"contact_phone\", \"vendor_candidates\".\"tax_id\", \"vendor_candidates\".\"address\", \"vendor_candidates\".\"country\", \"vendor_candidates\".\"source\", \"vendor_candidates\".\"status\", \"vendor_candidates\".\"items\", \"vendor_candidates\".\"remark\", \"vendor_candidates\".\"created_at\", \"vendor_candidates\".\"updated_at\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendors\".\"created_at\" as \"vendor_created_at\", (\n SELECT l2.\"created_at\"\n FROM \"vendor_candidate_logs\" l2\n WHERE l2.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l2.\"action\" = 'status_change'\n ORDER BY l2.\"created_at\" DESC\n LIMIT 1\n ) as \"last_status_change_at\", (\n SELECT u.\"name\"\n FROM \"users\" u\n JOIN \"vendor_candidate_logs\" l3\n ON l3.\"user_id\" = u.\"id\"\n WHERE l3.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l3.\"action\" = 'status_change'\n ORDER BY l3.\"created_at\" DESC\n LIMIT 1\n ) as \"last_status_change_by\", (\n SELECT l4.\"created_at\"\n FROM \"vendor_candidate_logs\" l4\n WHERE l4.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l4.\"action\" = 'invite_sent'\n ORDER BY l4.\"created_at\" DESC\n LIMIT 1\n ) as \"last_invitation_at\", (\n SELECT u2.\"name\"\n FROM \"users\" u2\n JOIN \"vendor_candidate_logs\" l5\n ON l5.\"user_id\" = u2.\"id\"\n WHERE l5.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l5.\"action\" = 'invite_sent'\n ORDER BY l5.\"created_at\" DESC\n LIMIT 1\n ) as \"last_invitation_by\" from \"vendor_candidates\" left join \"vendors\" on \"vendor_candidates\".\"vendor_id\" = \"vendors\".\"id\"",
+ "name": "vendor_candidates_with_vendor_info",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "business_size": {
+ "name": "business_size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corporate_registration_number": {
+ "name": "corporate_registration_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_agency": {
+ "name": "credit_agency",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_rating": {
+ "name": "credit_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cash_flow_rating": {
+ "name": "cash_flow_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"id\", \"vendor_name\", \"vendor_code\", \"tax_id\", \"address\", \"business_size\", \"country\", \"phone\", \"email\", \"website\", \"status\", \"representative_name\", \"representative_birth\", \"representative_email\", \"representative_phone\", \"corporate_registration_number\", \"credit_agency\", \"credit_rating\", \"cash_flow_rating\", \"created_at\", \"updated_at\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', c.id,\n 'contactName', c.contact_name,\n 'contactPosition', c.contact_position,\n 'contactEmail', c.contact_email,\n 'contactPhone', c.contact_phone,\n 'isPrimary', c.is_primary\n )\n ),\n '[]'::json\n )\n FROM vendor_contacts c\n WHERE c.vendor_id = vendors.id)\n as \"contacts\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', a.id,\n 'fileName', a.file_name,\n 'filePath', a.file_path,\n 'attachmentType', a.attachment_type,\n 'createdAt', a.created_at\n )\n ORDER BY a.attachment_type, a.created_at DESC\n ),\n '[]'::json\n )\n FROM vendor_attachments a\n WHERE a.vendor_id = vendors.id)\n as \"attachments\", \n (SELECT COUNT(*)\n FROM vendor_attachments a\n WHERE a.vendor_id = vendors.id)\n as \"attachment_count\", \n (SELECT COUNT(*) \n FROM vendor_contacts c\n WHERE c.vendor_id = vendors.id)\n as \"contact_count\" from \"vendors\"",
+ "name": "vendor_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_items_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"vendor_possible_items\".\"id\", \"vendor_possible_items\".\"vendor_id\", \"items\".\"item_name\", \"items\".\"item_code\", \"items\".\"description\", \"vendor_possible_items\".\"created_at\", \"vendor_possible_items\".\"updated_at\" from \"vendor_possible_items\" left join \"items\" on \"vendor_possible_items\".\"item_code\" = \"items\".\"item_code\"",
+ "name": "vendor_items_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_materials_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"vendor_possible_materials\".\"id\", \"vendor_possible_materials\".\"vendor_id\", \"materials\".\"item_name\", \"materials\".\"item_code\", \"materials\".\"description\", \"materials\".\"unit_of_measure\", \"materials\".\"steel_type\", \"materials\".\"grade_material\", \"vendor_possible_materials\".\"created_at\", \"vendor_possible_materials\".\"updated_at\" from \"vendor_possible_materials\" left join \"materials\" on \"vendor_possible_materials\".\"item_code\" = \"materials\".\"item_code\"",
+ "name": "vendor_materials_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendors_with_types": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"tax_id\" as \"tax_id\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"phone\" as \"phone\", \"vendors\".\"email\" as \"email\", \"vendors\".\"business_size\" as \"business_size\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"status\", \"vendors\".\"vendor_type_id\" as \"vendor_type_id\", \"vendors\".\"representative_name\" as \"representative_name\", \"vendors\".\"representative_birth\" as \"representative_birth\", \"vendors\".\"representative_email\" as \"representative_email\", \"vendors\".\"representative_phone\" as \"representative_phone\", \"vendors\".\"corporate_registration_number\" as \"corporate_registration_number\", \"vendors\".\"items\" as \"items\", \"vendors\".\"credit_agency\" as \"credit_agency\", \"vendors\".\"credit_rating\" as \"credit_rating\", \"vendors\".\"cash_flow_rating\" as \"cash_flow_rating\", \"vendors\".\"created_at\" as \"created_at\", \"vendors\".\"updated_at\" as \"updated_at\", \"vendor_types\".\"name_ko\" as \"vendor_type_name\", \"vendor_types\".\"name_en\" as \"vendor_type_name_en\", \"vendor_types\".\"code\" as \"vendor_type_code\", \n CASE\n WHEN \"vendors\".\"status\" = 'ACTIVE' THEN '정규업체'\n WHEN \"vendors\".\"status\" IN ('INACTIVE', 'BLACKLISTED', 'REJECTED') THEN ''\n ELSE '잠재업체'\n END\n as \"vendor_category\" from \"vendors\" left join \"vendor_types\" on \"vendors\".\"vendor_type_id\" = \"vendor_types\".\"id\"",
+ "name": "vendors_with_types",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.basic_contract_view": {
+ "columns": {},
+ "definition": "select \"basic_contract\".\"id\" as \"id\", \"basic_contract\".\"template_id\" as \"template_id\", \"basic_contract\".\"vendor_id\" as \"vendor_id\", \"basic_contract\".\"requested_by\" as \"requested_by\", \"basic_contract\".\"status\" as \"basic_contract_status\", \"basic_contract\".\"created_at\" as \"created_at\", \"basic_contract\".\"updated_at\" as \"updated_at\", \"basic_contract\".\"completed_at\" as \"completed_at\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"email\" as \"vendor_email\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"users\".\"name\" as \"requested_by_name\", \"basic_contract_templates\".\"template_name\" as \"template_name\", \"basic_contract_templates\".\"revision\" as \"template_revision\", \"basic_contract_templates\".\"status\" as \"template_status\", \"basic_contract_templates\".\"validity_period\" as \"validity_period\", \"basic_contract_templates\".\"legal_review_required\" as \"legal_review_required\", \"basic_contract_templates\".\"shipbuilding_applicable\" as \"shipbuilding_applicable\", \"basic_contract_templates\".\"wind_applicable\" as \"wind_applicable\", \"basic_contract_templates\".\"pc_applicable\" as \"pc_applicable\", \"basic_contract_templates\".\"nb_applicable\" as \"nb_applicable\", \"basic_contract_templates\".\"rc_applicable\" as \"rc_applicable\", \"basic_contract_templates\".\"gy_applicable\" as \"gy_applicable\", \"basic_contract_templates\".\"sys_applicable\" as \"sys_applicable\", \"basic_contract_templates\".\"infra_applicable\" as \"infra_applicable\", \"basic_contract_templates\".\"file_path\" as \"template_file_path\", \"basic_contract_templates\".\"file_name\" as \"template_file_name\", \"basic_contract\".\"file_path\" as \"signed_file_path\", \"basic_contract\".\"file_name\" as \"signed_file_name\", \"basic_contract_templates\".\"created_at\" as \"template_created_at\", \"basic_contract_templates\".\"created_by\" as \"template_created_by\", \"basic_contract_templates\".\"updated_at\" as \"template_updated_at\", \"basic_contract_templates\".\"updated_by\" as \"template_updated_by\", \"basic_contract_templates\".\"disposed_at\" as \"template_disposed_at\", \"basic_contract_templates\".\"restored_at\" as \"template_restored_at\" from \"basic_contract\" left join \"vendors\" on \"basic_contract\".\"vendor_id\" = \"vendors\".\"id\" left join \"users\" on \"basic_contract\".\"requested_by\" = \"users\".\"id\" left join \"basic_contract_templates\" on \"basic_contract\".\"template_id\" = \"basic_contract_templates\".\"id\"",
+ "name": "basic_contract_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.pr_items_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_item": {
+ "name": "rfq_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item": {
+ "name": "pr_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_no": {
+ "name": "pr_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_category": {
+ "name": "material_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "acc": {
+ "name": "acc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "size": {
+ "name": "size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gross_weight": {
+ "name": "gross_weight",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "gw_uom": {
+ "name": "gw_uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_no": {
+ "name": "spec_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_url": {
+ "name": "spec_url",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tracking_no": {
+ "name": "tracking_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_yn": {
+ "name": "major_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "project_def": {
+ "name": "project_def",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_sc": {
+ "name": "project_sc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_kl": {
+ "name": "project_kl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_lc": {
+ "name": "project_lc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_dl": {
+ "name": "project_dl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"pr_items\".\"id\", \"pr_items\".\"procurement_rfqs_id\", \"pr_items\".\"rfq_item\", \"pr_items\".\"pr_item\", \"pr_items\".\"pr_no\", \"pr_items\".\"material_code\", \"pr_items\".\"material_category\", \"pr_items\".\"acc\", \"pr_items\".\"material_description\", \"pr_items\".\"size\", \"pr_items\".\"delivery_date\", \"pr_items\".\"quantity\", \"pr_items\".\"uom\", \"pr_items\".\"gross_weight\", \"pr_items\".\"gw_uom\", \"pr_items\".\"spec_no\", \"pr_items\".\"spec_url\", \"pr_items\".\"tracking_no\", \"pr_items\".\"major_yn\", \"pr_items\".\"project_def\", \"pr_items\".\"project_sc\", \"pr_items\".\"project_kl\", \"pr_items\".\"project_lc\", \"pr_items\".\"project_dl\", \"pr_items\".\"remark\", \"procurement_rfqs\".\"rfq_code\", \"procurement_rfqs\".\"item_code\", \"procurement_rfqs\".\"item_name\" from \"pr_items\" left join \"procurement_rfqs\" on \"pr_items\".\"procurement_rfqs_id\" = \"procurement_rfqs\".\"id\"",
+ "name": "pr_items_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.procurement_rfq_details_view": {
+ "columns": {},
+ "definition": "select \"rfq_details\".\"id\" as \"detail_id\", \"rfqs\".\"id\" as \"rfq_id\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"rfqs\".\"item_code\" as \"item_code\", \"rfqs\".\"item_name\" as \"item_name\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"country\" as \"vendor_country\", \"rfq_details\".\"currency\" as \"currency\", \"payment_terms\".\"code\" as \"payment_terms_code\", \"payment_terms\".\"description\" as \"payment_terms_description\", \"incoterms\".\"code\" as \"incoterms_code\", \"incoterms\".\"description\" as \"incoterms_description\", \"rfq_details\".\"incoterms_detail\" as \"incoterms_detail\", \"rfq_details\".\"delivery_date\" as \"delivery_date\", \"rfq_details\".\"tax_code\" as \"tax_code\", \"rfq_details\".\"place_of_shipping\" as \"place_of_shipping\", \"rfq_details\".\"place_of_destination\" as \"place_of_destination\", \"rfq_details\".\"material_price_related_yn\" as \"material_price_related_yn\", \"updated_by_user\".\"name\" as \"updated_by_user_name\", \"rfq_details\".\"updated_at\" as \"updated_at\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"rfqs\".\"id\"\n ) as \"pr_items_count\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"rfqs\".\"id\" \n AND major_yn = true\n ) as \"major_items_count\", (\n SELECT COUNT(*) \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"comment_count\", (\n SELECT created_at \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"last_comment_date\", (\n SELECT created_at \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\" AND is_vendor_comment = true\n ORDER BY created_at DESC LIMIT 1\n ) as \"last_vendor_comment_date\", (\n SELECT COUNT(*) \n FROM procurement_rfq_attachments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"attachment_count\", (\n SELECT COUNT(*) > 0\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"has_quotation\", (\n SELECT status\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"quotation_status\", (\n SELECT total_price\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"quotation_total_price\", (\n SELECT quotation_version\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY quotation_version DESC LIMIT 1\n ) as \"quotation_version\", (\n SELECT COUNT(DISTINCT quotation_version)\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"quotation_version_count\", (\n SELECT created_at\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY quotation_version DESC LIMIT 1\n ) as \"last_quotation_date\" from \"procurement_rfq_details\" \"rfq_details\" left join \"procurement_rfqs\" \"rfqs\" on \"rfq_details\".\"procurement_rfqs_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendors\" on \"rfq_details\".\"vendors_id\" = \"vendors\".\"id\" left join \"payment_terms\" on \"rfq_details\".\"payment_terms_code\" = \"payment_terms\".\"code\" left join \"incoterms\" on \"rfq_details\".\"incoterms_code\" = \"incoterms\".\"code\" left join \"users\" \"updated_by_user\" on \"rfq_details\".\"updated_by\" = \"updated_by_user\".\"id\"",
+ "name": "procurement_rfq_details_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.procurement_rfqs_view": {
+ "columns": {},
+ "definition": "select \"procurement_rfqs\".\"id\" as \"id\", \"procurement_rfqs\".\"rfq_code\" as \"rfq_code\", \"procurement_rfqs\".\"series\" as \"series\", \"procurement_rfqs\".\"rfq_sealed_yn\" as \"rfq_sealed_yn\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"procurement_rfqs\".\"item_code\" as \"item_code\", \"procurement_rfqs\".\"item_name\" as \"item_name\", \"procurement_rfqs\".\"status\" as \"status\", \"procurement_rfqs\".\"pic_code\" as \"pic_code\", \"procurement_rfqs\".\"rfq_send_date\" as \"rfq_send_date\", \"procurement_rfqs\".\"due_date\" as \"due_date\", (\n SELECT MIN(submitted_at)\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"procurement_rfqs\".\"id\"\n AND submitted_at IS NOT NULL\n ) as \"earliest_quotation_submitted_at\", \"created_by_user\".\"name\" as \"created_by_user_name\", \"sent_by_user\".\"name\" as \"sent_by_user_name\", \"procurement_rfqs\".\"updated_at\" as \"updated_at\", \"updated_by_user\".\"name\" as \"updated_by_user_name\", \"procurement_rfqs\".\"remark\" as \"remark\", (\n SELECT material_code \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n AND major_yn = true\n LIMIT 1\n ) as \"major_item_material_code\", (\n SELECT pr_no \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n AND major_yn = true\n LIMIT 1\n ) as \"po_no\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n ) as \"pr_items_count\" from \"procurement_rfqs\" left join \"projects\" on \"procurement_rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" \"created_by_user\" on \"procurement_rfqs\".\"created_by\" = \"created_by_user\".\"id\" left join \"users\" \"updated_by_user\" on \"procurement_rfqs\".\"updated_by\" = \"updated_by_user\".\"id\" left join \"users\" \"sent_by_user\" on \"procurement_rfqs\".\"sent_by\" = \"sent_by_user\".\"id\"",
+ "name": "procurement_rfqs_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.attachment_revision_history": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_id": {
+ "name": "client_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_no": {
+ "name": "client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_name": {
+ "name": "client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_path": {
+ "name": "client_file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_size": {
+ "name": "client_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_comment": {
+ "name": "client_revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_created_at": {
+ "name": "client_revision_created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest_client_revision": {
+ "name": "is_latest_client_revision",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_vendor_responses": {
+ "name": "total_vendor_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_vendors": {
+ "name": "responded_vendors",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pending_vendors": {
+ "name": "pending_vendors",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n ba.id as attachment_id,\n ba.attachment_type,\n ba.serial_no,\n \n -- 발주처 리비전 정보\n rev.id as client_revision_id,\n rev.revision_no as client_revision_no,\n rev.original_file_name as client_file_name,\n rev.file_size as client_file_size,\n rev.file_path as client_file_path,\n rev.revision_comment as client_revision_comment,\n rev.created_at as client_revision_created_at,\n rev.is_latest as is_latest_client_revision,\n \n -- 벤더 응답 통계\n COALESCE(response_stats.total_responses, 0) as total_vendor_responses,\n COALESCE(response_stats.responded_count, 0) as responded_vendors,\n COALESCE(response_stats.pending_count, 0) as pending_vendors,\n COALESCE(response_stats.total_files, 0) as total_response_files\n \n FROM b_rfqs br\n JOIN b_rfq_attachments ba ON br.id = ba.rfq_id\n JOIN b_rfq_attachment_revisions rev ON ba.id = rev.attachment_id\n LEFT JOIN (\n SELECT \n var.attachment_id,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN var.response_status = 'NOT_RESPONDED' THEN 1 END) as pending_count,\n COUNT(vra.id) as total_files\n FROM vendor_attachment_responses var\n LEFT JOIN vendor_response_attachments_b vra ON var.id = vra.vendor_response_id\n GROUP BY var.attachment_id\n ) response_stats ON ba.id = response_stats.attachment_id\n \n ORDER BY ba.id, rev.created_at DESC\n",
+ "name": "attachment_revision_history",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.attachments_with_latest_revision": {
+ "columns": {
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_comment": {
+ "name": "revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n a.id as attachment_id,\n a.attachment_type,\n a.serial_no,\n a.rfq_id,\n a.description,\n a.current_revision,\n \n r.id as revision_id,\n r.file_name,\n r.original_file_name,\n r.file_path,\n r.file_size,\n r.file_type,\n r.revision_comment,\n \n a.created_by,\n u.name as created_by_name,\n a.created_at,\n a.updated_at\n FROM b_rfq_attachments a\n LEFT JOIN b_rfq_attachment_revisions r ON a.latest_revision_id = r.id\n LEFT JOIN users u ON a.created_by = u.id\n ",
+ "name": "attachments_with_latest_revision",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.b_rfqs_master": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_type": {
+ "name": "project_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.description,\n br.status,\n br.due_date,\n br.pic_code,\n br.pic_name,\n br.eng_pic_name,\n br.package_no,\n br.package_name,\n br.project_id,\n p.code as project_code,\n p.name as project_name,\n p.type as project_type,\n br.project_company,\n br.project_flag,\n br.project_site,\n COALESCE(att_count.total_attachments, 0) as total_attachments,\n br.created_at,\n br.updated_at\n FROM b_rfqs br\n LEFT JOIN projects p ON br.project_id = p.id\n LEFT JOIN (\n SELECT rfq_id, COUNT(*) as total_attachments\n FROM b_rfq_attachments\n GROUP BY rfq_id\n ) att_count ON br.id = att_count.rfq_id\n",
+ "name": "b_rfqs_master",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.final_rfq_detail": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_rfq_id": {
+ "name": "final_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_rfq_status": {
+ "name": "final_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_description": {
+ "name": "incoterms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_description": {
+ "name": "payment_terms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "firsttime_yn": {
+ "name": "firsttime_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_remark": {
+ "name": "vendor_remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n fr.id as final_rfq_id,\n fr.final_rfq_status,\n fr.vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n fr.due_date,\n fr.valid_date,\n fr.delivery_date,\n fr.incoterms_code,\n inc.description as incoterms_description,\n fr.payment_terms_code,\n pt.description as payment_terms_description,\n fr.currency,\n fr.tax_code,\n fr.place_of_shipping,\n fr.place_of_destination,\n fr.short_list,\n fr.return_yn,\n fr.cp_request_yn,\n fr.prject_gtc_yn,\n fr.firsttime_yn,\n fr.material_price_related_yn,\n fr.return_revision,\n fr.gtc,\n fr.gtc_valid_date,\n fr.classification,\n fr.sparepart,\n fr.remark,\n fr.vendor_remark,\n fr.created_at,\n fr.updated_at\n FROM b_rfqs br\n JOIN final_rfq fr ON br.id = fr.rfq_id\n LEFT JOIN vendors v ON fr.vendor_id = v.id\n LEFT JOIN incoterms inc ON fr.incoterms_code = inc.code\n LEFT JOIN payment_terms pt ON fr.payment_terms_code = pt.code\n",
+ "name": "final_rfq_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.initial_rfq_detail": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_rfq_id": {
+ "name": "initial_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_rfq_status": {
+ "name": "initial_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_category": {
+ "name": "vendor_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_description": {
+ "name": "incoterms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_revision": {
+ "name": "rfq_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n ir.id as initial_rfq_id,\n ir.initial_rfq_status,\n ir.vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n v.vendor_category as vendor_category,\n ir.due_date,\n ir.valid_date,\n ir.incoterms_code,\n inc.description as incoterms_description,\n ir.short_list,\n ir.return_yn,\n ir.cp_request_yn,\n ir.prject_gtc_yn,\n ir.return_revision,\n ir.rfq_revision,\n ir.gtc,\n ir.gtc_valid_date,\n ir.classification,\n ir.sparepart,\n ir.created_at,\n ir.updated_at\n FROM b_rfqs br\n JOIN initial_rfq ir ON br.id = ir.rfq_id\n LEFT JOIN vendors_with_types v ON ir.vendor_id = v.id\n LEFT JOIN incoterms inc ON ir.incoterms_code = inc.code\n",
+ "name": "initial_rfq_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfq_dashboard": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_vendor_count": {
+ "name": "initial_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_vendor_count": {
+ "name": "final_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_response_rate": {
+ "name": "initial_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_response_rate": {
+ "name": "final_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "overall_progress": {
+ "name": "overall_progress",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_to_deadline": {
+ "name": "days_to_deadline",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by_name": {
+ "name": "updated_by_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by_email": {
+ "name": "updated_by_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n -- ② SELECT 절 확장 -------------------------------------------\n SELECT\n br.id AS rfq_id,\n br.rfq_code,\n br.description,\n br.status,\n br.due_date,\n p.code AS project_code,\n p.name AS project_name,\n br.package_no,\n br.package_name,\n br.pic_code,\n br.pic_name,\n br.eng_pic_name,\n br.project_company,\n br.project_flag,\n br.project_site,\n br.remark,\n \n -- 첨부/벤더 요약 -----------------------\n COALESCE(att_count.total_attachments, 0) AS total_attachments,\n COALESCE(init_summary.vendor_count, 0) AS initial_vendor_count,\n COALESCE(final_summary.vendor_count, 0) AS final_vendor_count,\n COALESCE(init_summary.avg_response_rate, 0) AS initial_response_rate,\n COALESCE(final_summary.avg_response_rate, 0) AS final_response_rate,\n \n -- 진행률·마감까지 일수 --------------\n CASE \n WHEN br.status = 'DRAFT' THEN 0\n WHEN br.status = 'Doc. Received' THEN 10\n WHEN br.status = 'PIC Assigned' THEN 20\n WHEN br.status = 'Doc. Confirmed' THEN 30\n WHEN br.status = 'Init. RFQ Sent' THEN 40\n WHEN br.status = 'Init. RFQ Answered' THEN 50\n WHEN br.status = 'TBE started' THEN 60\n WHEN br.status = 'TBE finished' THEN 70\n WHEN br.status = 'Final RFQ Sent' THEN 80\n WHEN br.status = 'Quotation Received' THEN 90\n WHEN br.status = 'Vendor Selected' THEN 100\n ELSE 0\n END AS overall_progress,\n (br.due_date - CURRENT_DATE) AS days_to_deadline,\n \n br.created_at,\n br.updated_at,\n \n -- 💡 추가되는 컬럼 -------------------\n upd.name AS updated_by_name,\n upd.email AS updated_by_email\n FROM b_rfqs br\n LEFT JOIN projects p ON br.project_id = p.id\n \n -- ③ 사용자 정보 조인 --------------------\n LEFT JOIN users upd ON br.updated_by = upd.id\n \n -- (나머지 이미 있던 JOIN 들은 그대로) -----\n LEFT JOIN (\n SELECT rfq_id, COUNT(*) AS total_attachments\n FROM b_rfq_attachments\n GROUP BY rfq_id\n ) att_count ON br.id = att_count.rfq_id\n \n LEFT JOIN (\n SELECT \n rfq_id, \n COUNT(DISTINCT vendor_id) AS vendor_count,\n AVG(response_rate) AS avg_response_rate\n FROM vendor_response_summary\n WHERE rfq_type = 'INITIAL'\n GROUP BY rfq_id\n ) init_summary ON br.id = init_summary.rfq_id\n \n LEFT JOIN (\n SELECT \n rfq_id, \n COUNT(DISTINCT vendor_id) AS vendor_count,\n AVG(response_rate) AS avg_response_rate\n FROM vendor_response_summary\n WHERE rfq_type = 'FINAL'\n GROUP BY rfq_id\n ) final_summary ON br.id = final_summary.rfq_id\n ",
+ "name": "rfq_dashboard",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfq_progress_summary": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_to_deadline": {
+ "name": "days_to_deadline",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachments_with_multiple_revisions": {
+ "name": "attachments_with_multiple_revisions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_client_revisions": {
+ "name": "total_client_revisions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_vendor_count": {
+ "name": "initial_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_total_responses": {
+ "name": "initial_total_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_responded_count": {
+ "name": "initial_responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_up_to_date_count": {
+ "name": "initial_up_to_date_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_version_mismatch_count": {
+ "name": "initial_version_mismatch_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_response_rate": {
+ "name": "initial_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_version_match_rate": {
+ "name": "initial_version_match_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_vendor_count": {
+ "name": "final_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_total_responses": {
+ "name": "final_total_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_responded_count": {
+ "name": "final_responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_up_to_date_count": {
+ "name": "final_up_to_date_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_version_mismatch_count": {
+ "name": "final_version_mismatch_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_response_rate": {
+ "name": "final_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_version_match_rate": {
+ "name": "final_version_match_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n br.due_date,\n (br.due_date - CURRENT_DATE) as days_to_deadline,\n \n -- 첨부파일 통계\n attachment_stats.total_attachments,\n attachment_stats.attachments_with_multiple_revisions,\n attachment_stats.total_client_revisions,\n \n -- Initial RFQ 통계\n COALESCE(initial_stats.vendor_count, 0) as initial_vendor_count,\n COALESCE(initial_stats.total_responses, 0) as initial_total_responses,\n COALESCE(initial_stats.responded_count, 0) as initial_responded_count,\n COALESCE(initial_stats.up_to_date_count, 0) as initial_up_to_date_count,\n COALESCE(initial_stats.version_mismatch_count, 0) as initial_version_mismatch_count,\n COALESCE(initial_stats.response_rate, 0) as initial_response_rate,\n COALESCE(initial_stats.version_match_rate, 0) as initial_version_match_rate,\n \n -- Final RFQ 통계\n COALESCE(final_stats.vendor_count, 0) as final_vendor_count,\n COALESCE(final_stats.total_responses, 0) as final_total_responses,\n COALESCE(final_stats.responded_count, 0) as final_responded_count,\n COALESCE(final_stats.up_to_date_count, 0) as final_up_to_date_count,\n COALESCE(final_stats.version_mismatch_count, 0) as final_version_mismatch_count,\n COALESCE(final_stats.response_rate, 0) as final_response_rate,\n COALESCE(final_stats.version_match_rate, 0) as final_version_match_rate,\n \n COALESCE(file_stats.total_files, 0) as total_response_files\n \n FROM b_rfqs br\n LEFT JOIN (\n SELECT \n ba.rfq_id,\n COUNT(*) as total_attachments,\n COUNT(CASE WHEN rev_count.total_revisions > 1 THEN 1 END) as attachments_with_multiple_revisions,\n SUM(rev_count.total_revisions) as total_client_revisions\n FROM b_rfq_attachments ba\n LEFT JOIN (\n SELECT \n attachment_id,\n COUNT(*) as total_revisions\n FROM b_rfq_attachment_revisions\n GROUP BY attachment_id\n ) rev_count ON ba.id = rev_count.attachment_id\n GROUP BY ba.rfq_id\n ) attachment_stats ON br.id = attachment_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(DISTINCT var.vendor_id) as vendor_count,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) as up_to_date_count,\n COUNT(CASE WHEN vrd.effective_status = 'VERSION_MISMATCH' THEN 1 END) as version_mismatch_count,\n ROUND(\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(*), 0), 2\n ) as response_rate,\n ROUND(\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END), 0), 2\n ) as version_match_rate\n FROM b_rfqs br\n JOIN vendor_response_detail vrd ON br.id = vrd.rfq_id\n JOIN vendor_attachment_responses var ON vrd.response_id = var.id\n WHERE var.rfq_type = 'INITIAL'\n GROUP BY br.id\n ) initial_stats ON br.id = initial_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(DISTINCT var.vendor_id) as vendor_count,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) as up_to_date_count,\n COUNT(CASE WHEN vrd.effective_status = 'VERSION_MISMATCH' THEN 1 END) as version_mismatch_count,\n ROUND(\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(*), 0), 2\n ) as response_rate,\n ROUND(\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END), 0), 2\n ) as version_match_rate\n FROM b_rfqs br\n JOIN vendor_response_detail vrd ON br.id = vrd.rfq_id\n JOIN vendor_attachment_responses var ON vrd.response_id = var.id\n WHERE var.rfq_type = 'FINAL'\n GROUP BY br.id\n ) final_stats ON br.id = final_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(vra.id) as total_files\n FROM b_rfqs br\n JOIN b_rfq_attachments ba ON br.id = ba.rfq_id\n JOIN vendor_attachment_responses var ON ba.id = var.attachment_id\n LEFT JOIN vendor_response_attachments_b vra ON var.id = vra.vendor_response_id\n GROUP BY br.id\n ) file_stats ON br.id = file_stats.rfq_id\n",
+ "name": "rfq_progress_summary",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_attachments_enhanced": {
+ "columns": {
+ "response_attachment_id": {
+ "name": "response_attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_id": {
+ "name": "latest_client_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_no": {
+ "name": "latest_client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_name": {
+ "name": "latest_client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_version_matched": {
+ "name": "is_version_matched",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version_lag": {
+ "name": "version_lag",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "needs_update": {
+ "name": "needs_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_sequence": {
+ "name": "file_sequence",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest_response_file": {
+ "name": "is_latest_response_file",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n vra.id as response_attachment_id,\n vra.vendor_response_id,\n vra.file_name,\n vra.original_file_name,\n vra.file_path,\n vra.file_size,\n vra.file_type,\n vra.description,\n vra.uploaded_at,\n \n -- 응답 기본 정보\n var.attachment_id,\n var.vendor_id,\n var.rfq_type,\n var.rfq_record_id,\n var.response_status,\n var.current_revision,\n var.responded_revision,\n \n -- 코멘트 (새로 추가된 필드 포함)\n var.response_comment,\n var.vendor_comment,\n var.revision_request_comment,\n \n -- 날짜 (새로 추가된 필드 포함)\n var.requested_at,\n var.responded_at,\n var.revision_requested_at,\n \n -- 첨부파일 정보\n ba.attachment_type,\n ba.serial_no,\n ba.rfq_id,\n \n -- 벤더 정보\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n \n -- 발주처 현재 리비전 정보\n latest_rev.id as latest_client_revision_id,\n latest_rev.revision_no as latest_client_revision_no,\n latest_rev.original_file_name as latest_client_file_name,\n \n -- 리비전 비교\n CASE \n WHEN var.responded_revision = ba.current_revision THEN true \n ELSE false \n END as is_version_matched,\n \n -- 버전 차이 계산 (Rev.0, Rev.1 형태 가정)\n CASE \n WHEN var.responded_revision IS NULL THEN NULL\n WHEN ba.current_revision IS NULL THEN NULL\n ELSE CAST(SUBSTRING(ba.current_revision FROM '[0-9]+') AS INTEGER) - \n CAST(SUBSTRING(var.responded_revision FROM '[0-9]+') AS INTEGER)\n END as version_lag,\n \n CASE \n WHEN var.response_status = 'RESPONDED' \n AND var.responded_revision != ba.current_revision THEN true \n ELSE false \n END as needs_update,\n \n -- 파일 순서\n ROW_NUMBER() OVER (\n PARTITION BY var.id \n ORDER BY vra.uploaded_at DESC\n ) as file_sequence,\n \n -- 최신 응답 파일 여부\n CASE \n WHEN ROW_NUMBER() OVER (\n PARTITION BY var.id \n ORDER BY vra.uploaded_at DESC\n ) = 1 THEN true \n ELSE false \n END as is_latest_response_file\n \n FROM vendor_response_attachments_b vra\n JOIN vendor_attachment_responses var ON vra.vendor_response_id = var.id\n JOIN b_rfq_attachments ba ON var.attachment_id = ba.id\n LEFT JOIN vendors v ON var.vendor_id = v.id\n LEFT JOIN b_rfq_attachment_revisions latest_rev ON ba.latest_revision_id = latest_rev.id\n",
+ "name": "vendor_response_attachments_enhanced",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_detail": {
+ "columns": {
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_description": {
+ "name": "attachment_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_no": {
+ "name": "latest_client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_name": {
+ "name": "latest_client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_size": {
+ "name": "latest_client_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_comment": {
+ "name": "latest_client_revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_version_matched": {
+ "name": "is_version_matched",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version_lag": {
+ "name": "version_lag",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "needs_update": {
+ "name": "needs_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_multiple_revisions": {
+ "name": "has_multiple_revisions",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_file_name": {
+ "name": "latest_response_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_file_size": {
+ "name": "latest_response_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_uploaded_at": {
+ "name": "latest_response_uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "effective_status": {
+ "name": "effective_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n var.id as response_id,\n ba.rfq_id,\n br.rfq_code,\n var.rfq_type,\n var.rfq_record_id,\n \n -- 첨부파일 정보\n ba.id as attachment_id,\n ba.attachment_type,\n ba.serial_no,\n ba.description as attachment_description,\n \n -- 벤더 정보\n v.id as vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n \n -- 응답 상태\n var.response_status,\n var.current_revision,\n var.responded_revision,\n \n -- 코멘트 (새로 추가된 필드 포함)\n var.response_comment,\n var.vendor_comment,\n var.revision_request_comment,\n \n -- 날짜 (새로 추가된 필드 포함)\n var.requested_at,\n var.responded_at,\n var.revision_requested_at,\n \n -- 발주처 최신 리비전\n latest_rev.revision_no as latest_client_revision_no,\n latest_rev.original_file_name as latest_client_file_name,\n latest_rev.file_size as latest_client_file_size,\n latest_rev.revision_comment as latest_client_revision_comment,\n \n -- 리비전 분석\n CASE \n WHEN var.responded_revision = ba.current_revision THEN true \n ELSE false \n END as is_version_matched,\n \n CASE \n WHEN var.responded_revision IS NULL OR ba.current_revision IS NULL THEN NULL\n ELSE CAST(SUBSTRING(ba.current_revision FROM '[0-9]+') AS INTEGER) - \n CAST(SUBSTRING(var.responded_revision FROM '[0-9]+') AS INTEGER)\n END as version_lag,\n \n CASE \n WHEN var.response_status = 'RESPONDED' \n AND var.responded_revision != ba.current_revision THEN true \n ELSE false \n END as needs_update,\n \n CASE \n WHEN revision_count.total_revisions > 1 THEN true \n ELSE false \n END as has_multiple_revisions,\n \n -- 응답 파일 정보\n COALESCE(file_stats.total_files, 0) as total_response_files,\n file_stats.latest_file_name as latest_response_file_name,\n file_stats.latest_file_size as latest_response_file_size,\n file_stats.latest_uploaded_at as latest_response_uploaded_at,\n \n -- 효과적인 상태\n CASE \n WHEN var.response_status = 'NOT_RESPONDED' THEN 'NOT_RESPONDED'\n WHEN var.response_status = 'WAIVED' THEN 'WAIVED'\n WHEN var.response_status = 'REVISION_REQUESTED' THEN 'REVISION_REQUESTED'\n WHEN var.response_status = 'RESPONDED' AND var.responded_revision = ba.current_revision THEN 'UP_TO_DATE'\n WHEN var.response_status = 'RESPONDED' AND var.responded_revision != ba.current_revision THEN 'VERSION_MISMATCH'\n ELSE var.response_status\n END as effective_status\n \n FROM vendor_attachment_responses var\n JOIN b_rfq_attachments ba ON var.attachment_id = ba.id\n JOIN b_rfqs br ON ba.rfq_id = br.id\n LEFT JOIN vendors v ON var.vendor_id = v.id\n LEFT JOIN b_rfq_attachment_revisions latest_rev ON ba.latest_revision_id = latest_rev.id\n LEFT JOIN (\n SELECT \n attachment_id,\n COUNT(*) as total_revisions\n FROM b_rfq_attachment_revisions\n GROUP BY attachment_id\n ) revision_count ON ba.id = revision_count.attachment_id\n LEFT JOIN (\n SELECT \n vendor_response_id,\n COUNT(*) as total_files,\n MAX(original_file_name) as latest_file_name,\n MAX(file_size) as latest_file_size,\n MAX(uploaded_at) as latest_uploaded_at\n FROM vendor_response_attachments_b\n GROUP BY vendor_response_id\n ) file_stats ON var.id = file_stats.vendor_response_id\n",
+ "name": "vendor_response_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_summary": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_count": {
+ "name": "responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pending_count": {
+ "name": "pending_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "waived_count": {
+ "name": "waived_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_count": {
+ "name": "revision_requested_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_rate": {
+ "name": "response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completion_rate": {
+ "name": "completion_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n v.id as vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n var.rfq_type,\n COUNT(var.id) as total_attachments,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN var.response_status = 'NOT_RESPONDED' THEN 1 END) as pending_count,\n COUNT(CASE WHEN var.response_status = 'WAIVED' THEN 1 END) as waived_count,\n COUNT(CASE WHEN var.response_status = 'REVISION_REQUESTED' THEN 1 END) as revision_requested_count,\n ROUND(\n (COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status != 'WAIVED' THEN 1 END), 0)), \n 2\n ) as response_rate,\n ROUND(\n ((COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) + \n COUNT(CASE WHEN var.response_status = 'WAIVED' THEN 1 END)) * 100.0 / COUNT(var.id)), \n 2\n ) as completion_rate\n FROM b_rfqs br\n JOIN b_rfq_attachments bra ON br.id = bra.rfq_id\n JOIN vendor_attachment_responses var ON bra.id = var.attachment_id\n JOIN vendors v ON var.vendor_id = v.id\n GROUP BY br.id, br.rfq_code, br.status, v.id, v.vendor_code, v.vendor_name, v.country, v.business_size, var.rfq_type\n",
+ "name": "vendor_response_summary",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.tech_vendor_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_eng": {
+ "name": "country_eng",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_fab": {
+ "name": "country_fab",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_name": {
+ "name": "agent_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_phone": {
+ "name": "agent_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_email": {
+ "name": "agent_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "tech_vendor_type": {
+ "name": "tech_vendor_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"id\", \"vendor_name\", \"vendor_code\", \"tax_id\", \"address\", \"country\", \"country_eng\", \"country_fab\", \"agent_name\", \"agent_phone\", \"agent_email\", \"phone\", \"email\", \"website\", \"status\", \"tech_vendor_type\", \"representative_name\", \"representative_email\", \"representative_phone\", \"representative_birth\", \"created_at\", \"updated_at\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', c.id,\n 'contactName', c.contact_name,\n 'contactPosition', c.contact_position,\n 'contactTitle', c.contact_title,\n 'contactEmail', c.contact_email,\n 'contactPhone', c.contact_phone,\n 'isPrimary', c.is_primary\n )\n ),\n '[]'::json\n )\n FROM tech_vendor_contacts c\n WHERE c.vendor_id = tech_vendors.id)\n as \"contacts\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', a.id,\n 'fileName', a.file_name,\n 'filePath', a.file_path,\n 'attachmentType', a.attachment_type,\n 'createdAt', a.created_at\n )\n ORDER BY a.attachment_type, a.created_at DESC\n ),\n '[]'::json\n )\n FROM tech_vendor_attachments a\n WHERE a.vendor_id = tech_vendors.id)\n as \"attachments\", \n (SELECT COUNT(*)\n FROM tech_vendor_attachments a\n WHERE a.vendor_id = tech_vendors.id)\n as \"attachment_count\", \n (SELECT COUNT(*) \n FROM vendor_contacts c\n WHERE c.vendor_id = tech_vendors.id)\n as \"contact_count\", \n (SELECT COUNT(*) \n FROM tech_vendor_possible_items i\n WHERE i.vendor_id = tech_vendors.id)\n as \"item_count\" from \"tech_vendors\"",
+ "name": "tech_vendor_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.esg_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"esg_evaluations\".\"id\", \"esg_evaluations\".\"serial_number\", \"esg_evaluations\".\"category\", \"esg_evaluations\".\"inspection_item\", \"esg_evaluations\".\"is_active\", \"esg_evaluations\".\"created_at\", \"esg_evaluations\".\"updated_at\", count(distinct \"esg_evaluation_items\".\"id\") as \"total_evaluation_items\", count(\"esg_answer_options\".\"id\") as \"total_answer_options\", coalesce(sum(\"esg_answer_options\".\"score\"), 0) as \"max_possible_score\", \n (\n SELECT array_agg(evaluation_item order by order_index) \n FROM esg_evaluation_items \n WHERE esg_evaluation_id = \"esg_evaluations\".\"id\" \n AND is_active = true \n AND evaluation_item is not null\n )\n as \"evaluation_items_list\" from \"esg_evaluations\" left join \"esg_evaluation_items\" on \"esg_evaluations\".\"id\" = \"esg_evaluation_items\".\"esg_evaluation_id\" AND \"esg_evaluation_items\".\"is_active\" = true left join \"esg_answer_options\" on \"esg_evaluation_items\".\"id\" = \"esg_answer_options\".\"esg_evaluation_item_id\" AND \"esg_answer_options\".\"is_active\" = true group by \"esg_evaluations\".\"id\", \"esg_evaluations\".\"serial_number\", \"esg_evaluations\".\"category\", \"esg_evaluations\".\"inspection_item\", \"esg_evaluations\".\"is_active\", \"esg_evaluations\".\"created_at\", \"esg_evaluations\".\"updated_at\"",
+ "name": "esg_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.evaluation_targets_with_departments": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"evaluation_targets\".\"id\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"evaluation_targets\".\"status\", \"evaluation_targets\".\"consensus_status\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"confirmed_at\", \"evaluation_targets\".\"confirmed_by\", \"evaluation_targets\".\"ld_claim_count\", \"evaluation_targets\".\"ld_claim_amount\", \"evaluation_targets\".\"ld_claim_currency\", \"evaluation_targets\".\"created_at\", \"evaluation_targets\".\"updated_at\", order_reviewer.name as \"order_reviewer_name\", order_reviewer.email as \"order_reviewer_email\", order_etr.department_name_from as \"order_department_name\", order_review.is_approved as \"order_is_approved\", order_review.reviewed_at as \"order_reviewed_at\", procurement_reviewer.name as \"procurement_reviewer_name\", procurement_reviewer.email as \"procurement_reviewer_email\", procurement_etr.department_name_from as \"procurement_department_name\", procurement_review.is_approved as \"procurement_is_approved\", procurement_review.reviewed_at as \"procurement_reviewed_at\", quality_reviewer.name as \"quality_reviewer_name\", quality_reviewer.email as \"quality_reviewer_email\", quality_etr.department_name_from as \"quality_department_name\", quality_review.is_approved as \"quality_is_approved\", quality_review.reviewed_at as \"quality_reviewed_at\", design_reviewer.name as \"design_reviewer_name\", design_reviewer.email as \"design_reviewer_email\", design_etr.department_name_from as \"design_department_name\", design_review.is_approved as \"design_is_approved\", design_review.reviewed_at as \"design_reviewed_at\", cs_reviewer.name as \"cs_reviewer_name\", cs_reviewer.email as \"cs_reviewer_email\", cs_etr.department_name_from as \"cs_department_name\", cs_review.is_approved as \"cs_is_approved\", cs_review.reviewed_at as \"cs_reviewed_at\" from \"evaluation_targets\" left join evaluation_target_reviewers order_etr on \"evaluation_targets\".\"id\" = order_etr.evaluation_target_id AND order_etr.department_code = 'ORDER_EVAL' left join users order_reviewer on order_etr.reviewer_user_id = order_reviewer.id left join evaluation_target_reviews order_review on \"evaluation_targets\".\"id\" = order_review.evaluation_target_id \n AND order_review.reviewer_user_id = order_reviewer.id \n AND order_review.department_code = 'ORDER_EVAL' left join evaluation_target_reviewers procurement_etr on \"evaluation_targets\".\"id\" = procurement_etr.evaluation_target_id AND procurement_etr.department_code = 'PROCUREMENT_EVAL' left join users procurement_reviewer on procurement_etr.reviewer_user_id = procurement_reviewer.id left join evaluation_target_reviews procurement_review on \"evaluation_targets\".\"id\" = procurement_review.evaluation_target_id \n AND procurement_review.reviewer_user_id = procurement_reviewer.id \n AND procurement_review.department_code = 'PROCUREMENT_EVAL' left join evaluation_target_reviewers quality_etr on \"evaluation_targets\".\"id\" = quality_etr.evaluation_target_id AND quality_etr.department_code = 'QUALITY_EVAL' left join users quality_reviewer on quality_etr.reviewer_user_id = quality_reviewer.id left join evaluation_target_reviews quality_review on \"evaluation_targets\".\"id\" = quality_review.evaluation_target_id \n AND quality_review.reviewer_user_id = quality_reviewer.id \n AND quality_review.department_code = 'QUALITY_EVAL' left join evaluation_target_reviewers design_etr on \"evaluation_targets\".\"id\" = design_etr.evaluation_target_id AND design_etr.department_code = 'DESIGN_EVAL' left join users design_reviewer on design_etr.reviewer_user_id = design_reviewer.id left join evaluation_target_reviews design_review on \"evaluation_targets\".\"id\" = design_review.evaluation_target_id \n AND design_review.reviewer_user_id = design_reviewer.id \n AND design_review.department_code = 'DESIGN_EVAL' left join evaluation_target_reviewers cs_etr on \"evaluation_targets\".\"id\" = cs_etr.evaluation_target_id AND cs_etr.department_code = 'CS_EVAL' left join users cs_reviewer on cs_etr.reviewer_user_id = cs_reviewer.id left join evaluation_target_reviews cs_review on \"evaluation_targets\".\"id\" = cs_review.evaluation_target_id \n AND cs_review.reviewer_user_id = cs_reviewer.id \n AND cs_review.department_code = 'CS_EVAL'",
+ "name": "evaluation_targets_with_departments",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.periodic_evaluations_aggregated_view": {
+ "columns": {
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select CONCAT(\"evaluation_year\", '_', \"vendor_id\") as \"id\", \"evaluation_year\", \"vendor_id\", \"vendor_code\", \"vendor_name\", \"domestic_foreign\", \"material_type\", ROUND(AVG(NULLIF(\"process_score\", 0)), 1) as \"process_score\", ROUND(AVG(NULLIF(\"price_score\", 0)), 1) as \"price_score\", ROUND(AVG(NULLIF(\"delivery_score\", 0)), 1) as \"delivery_score\", ROUND(AVG(NULLIF(\"self_evaluation_score\", 0)), 1) as \"self_evaluation_score\", ROUND(AVG(NULLIF(\"participation_bonus\", 0)), 1) as \"participation_bonus\", ROUND(AVG(NULLIF(\"quality_deduction\", 0)), 1) as \"quality_deduction\", ROUND(AVG(NULLIF(\"final_score\", 0)), 1) as \"final_score\", \n CASE \n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 90 THEN 'S'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 80 THEN 'A'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 70 THEN 'B'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 60 THEN 'C'\n ELSE 'D'\n END\n as \"evaluation_grade\", \n CASE \n WHEN AVG(NULLIF(\"final_score\", 0)) >= 90 THEN 'S'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 80 THEN 'A'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 70 THEN 'B'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 60 THEN 'C'\n ELSE 'D'\n END\n as \"final_grade\", \n CASE \n WHEN COUNT(CASE WHEN \"status\" = 'FINALIZED' THEN 1 END) = COUNT(*) THEN 'FINALIZED'\n WHEN COUNT(CASE WHEN \"status\" IN ('REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) = COUNT(*) THEN 'REVIEW_COMPLETED'\n WHEN COUNT(CASE WHEN \"status\" IN ('IN_REVIEW', 'REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) > 0 THEN 'IN_REVIEW'\n WHEN COUNT(CASE WHEN \"status\" IN ('SUBMITTED', 'IN_REVIEW', 'REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) > 0 THEN 'SUBMITTED'\n ELSE 'PENDING_SUBMISSION'\n END\n as \"status\", \n CASE \n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"order_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"procurement_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"quality_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"design_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"cs_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"admin_eval_status\", \n BOOL_AND(\"documents_submitted\")\n as \"documents_submitted\", MAX(\"submission_date\") as \"submission_date\", MAX(\"submission_deadline\") as \"submission_deadline\", MAX(\"review_completed_at\") as \"review_completed_at\", MAX(\"finalized_at\") as \"finalized_at\", \n CASE \n WHEN COUNT(DISTINCT \"division\") > 1 THEN 'BOTH'\n ELSE MAX(\"division\")\n END\n as \"division\", COUNT(*)::int as \"evaluation_count\", STRING_AGG(DISTINCT \"division\", ',') as \"divisions\", SUM(\"total_reviewers\")::int as \"total_reviewers\", SUM(\"completed_reviewers\")::int as \"completed_reviewers\", SUM(\"pending_reviewers\")::int as \"pending_reviewers\", MAX(\"evaluation_period\") as \"evaluation_period\", STRING_AGG(\"evaluation_note\", ' | ') as \"evaluation_note\", (ARRAY_AGG(\"periodic_evaluations_view\".\"finalized_by\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by\", (ARRAY_AGG(\"periodic_evaluations_view\".\"name\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by_user_name\", (ARRAY_AGG(\"periodic_evaluations_view\".\"email\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by_user_email\", MIN(\"created_at\") as \"created_at\", MAX(\"updated_at\") as \"updated_at\", (ARRAY_AGG(\"periodic_evaluations_view\".\"evaluation_target_id\"))[1] as \"evaluation_target_id\", \n STRING_AGG(DISTINCT \"admin_comment\", ' | ')\n as \"evaluation_target_admin_comment\", \n STRING_AGG(DISTINCT \"consolidated_comment\", ' | ')\n as \"evaluation_target_consolidated_comment\", (ARRAY_AGG(\"periodic_evaluations_view\".\"consensus_status\" ORDER BY \"periodic_evaluations_view\".\"updated_at\" DESC NULLS LAST))[1] as \"evaluation_target_consensus_status\", \n MAX(\"confirmed_at\")\n as \"evaluation_target_confirmed_at\" from \"periodic_evaluations_view\" group by \"periodic_evaluations_view\".\"evaluation_year\", \"periodic_evaluations_view\".\"vendor_id\", \"periodic_evaluations_view\".\"vendor_code\", \"periodic_evaluations_view\".\"vendor_name\", \"periodic_evaluations_view\".\"domestic_foreign\", \"periodic_evaluations_view\".\"material_type\"",
+ "name": "periodic_evaluations_aggregated_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.periodic_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"periodic_evaluations\".\"id\", \"periodic_evaluations\".\"evaluation_target_id\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_id\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"periodic_evaluations\".\"evaluation_period\", \"periodic_evaluations\".\"documents_submitted\", \"periodic_evaluations\".\"submission_date\", \"periodic_evaluations\".\"submission_deadline\", \"periodic_evaluations\".\"final_score\", \"periodic_evaluations\".\"final_grade\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'processScore'\n AND re.is_completed = true\n ) as \"process_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'priceScore'\n AND re.is_completed = true\n ) as \"price_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'deliveryScore'\n AND re.is_completed = true\n ) as \"delivery_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'selfEvaluationScore'\n AND re.is_completed = true\n ) as \"self_evaluation_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'bonus'\n AND re.is_completed = true\n ) as \"participation_bonus\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'penalty'\n AND re.is_completed = true\n ) as \"quality_deduction\", \"periodic_evaluations\".\"status\", \"periodic_evaluations\".\"review_completed_at\", \"periodic_evaluations\".\"finalized_at\", \"periodic_evaluations\".\"finalized_by\", \"periodic_evaluations\".\"evaluation_note\", \"periodic_evaluations\".\"created_at\", \"periodic_evaluations\".\"updated_at\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"consensus_status\", \"evaluation_targets\".\"confirmed_at\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'ORDER_EVAL'\n LIMIT 1\n ) as \"order_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'PROCUREMENT_EVAL'\n LIMIT 1\n ) as \"procurement_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'QUALITY_EVAL'\n LIMIT 1\n ) as \"quality_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'DESIGN_EVAL'\n LIMIT 1\n ) as \"design_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'CS_EVAL'\n LIMIT 1\n ) as \"cs_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'admin'\n LIMIT 1\n ) as \"admin_eval_status\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n ) as \"total_reviewers\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND re.is_completed = true\n ) as \"completed_reviewers\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND re.is_completed = false\n ) as \"pending_reviewers\", \"users\".\"name\", \"users\".\"email\" from \"periodic_evaluations\" left join \"evaluation_targets\" on \"periodic_evaluations\".\"evaluation_target_id\" = \"evaluation_targets\".\"id\" left join \"users\" on \"periodic_evaluations\".\"finalized_by\" = \"users\".\"id\" order by \"periodic_evaluations\".\"created_at\"",
+ "name": "periodic_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.reviewer_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_target_reviewer_id": {
+ "name": "evaluation_target_reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_completed": {
+ "name": "is_completed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_grade": {
+ "name": "evaluation_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name_from": {
+ "name": "department_name_from",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "assigned_by": {
+ "name": "assigned_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"reviewer_evaluations\".\"id\", \"reviewer_evaluations\".\"periodic_evaluation_id\", \"reviewer_evaluations\".\"evaluation_target_reviewer_id\", \"reviewer_evaluations\".\"is_completed\", \"reviewer_evaluations\".\"completed_at\", \"reviewer_evaluations\".\"reviewer_comment\", \"reviewer_evaluations\".\"created_at\", \"reviewer_evaluations\".\"updated_at\", \"periodic_evaluations\".\"evaluation_period\", \"reviewer_evaluations\".\"submitted_at\", \"periodic_evaluations\".\"documents_submitted\", \"periodic_evaluations\".\"submission_date\", \"periodic_evaluations\".\"submission_deadline\", \"periodic_evaluations\".\"final_score\", \"periodic_evaluations\".\"final_grade\", \"periodic_evaluations\".\"evaluation_score\", \"periodic_evaluations\".\"evaluation_grade\", \"periodic_evaluations\".\"status\", \"periodic_evaluations\".\"review_completed_at\", \"periodic_evaluations\".\"finalized_at\", \"periodic_evaluations\".\"finalized_by\", \"periodic_evaluations\".\"evaluation_note\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_id\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"confirmed_at\", \"evaluation_targets\".\"confirmed_by\", \"evaluation_targets\".\"ld_claim_count\", \"evaluation_targets\".\"ld_claim_amount\", \"evaluation_targets\".\"ld_claim_currency\", \"evaluation_target_reviewers\".\"department_code\", \"evaluation_target_reviewers\".\"department_name_from\", \"evaluation_target_reviewers\".\"reviewer_user_id\", reviewer_user.name as \"reviewer_name\", reviewer_user.email as \"reviewer_email\", \"evaluation_target_reviewers\".\"assigned_at\", \"evaluation_target_reviewers\".\"assigned_by\", assigned_by_user.name as \"assigned_by_user_name\", finalized_by_user.name as \"finalized_by_user_name\", finalized_by_user.email as \"finalized_by_user_email\", \n CASE \n WHEN \"reviewer_evaluations\".\"is_completed\" = true THEN 'COMPLETED'\n ELSE 'NOT_STARTED'\n END\n as \"evaluation_progress\" from \"reviewer_evaluations\" left join \"periodic_evaluations\" on \"reviewer_evaluations\".\"periodic_evaluation_id\" = \"periodic_evaluations\".\"id\" left join \"evaluation_targets\" on \"periodic_evaluations\".\"evaluation_target_id\" = \"evaluation_targets\".\"id\" left join \"evaluation_target_reviewers\" on \"reviewer_evaluations\".\"evaluation_target_reviewer_id\" = \"evaluation_target_reviewers\".\"id\" left join users reviewer_user on \"evaluation_target_reviewers\".\"reviewer_user_id\" = reviewer_user.id left join users assigned_by_user on \"evaluation_target_reviewers\".\"assigned_by\" = assigned_by_user.id left join users finalized_by_user on \"periodic_evaluations\".\"finalized_by\" = finalized_by_user.id order by \"reviewer_evaluations\".\"is_completed\" ASC, \"reviewer_evaluations\".\"updated_at\" DESC",
+ "name": "reviewer_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.reg_eval_criteria_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "category2": {
+ "name": "category2",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'processScore'"
+ },
+ "item": {
+ "name": "item",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "range": {
+ "name": "range",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score_equip_ship": {
+ "name": "score_equip_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_equip_marine": {
+ "name": "score_equip_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_ship": {
+ "name": "score_bulk_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_marine": {
+ "name": "score_bulk_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"reg_eval_criteria_details\".\"id\", \"reg_eval_criteria_details\".\"criteria_id\", \"reg_eval_criteria\".\"category\", \"reg_eval_criteria\".\"category2\", \"reg_eval_criteria\".\"item\", \"reg_eval_criteria\".\"classification\", \"reg_eval_criteria\".\"range\", \"reg_eval_criteria_details\".\"detail\", \"reg_eval_criteria_details\".\"order_index\", \"reg_eval_criteria_details\".\"score_equip_ship\", \"reg_eval_criteria_details\".\"score_equip_marine\", \"reg_eval_criteria_details\".\"score_bulk_ship\", \"reg_eval_criteria_details\".\"score_bulk_marine\", \"reg_eval_criteria\".\"remarks\" from \"reg_eval_criteria\" left join \"reg_eval_criteria_details\" on \"reg_eval_criteria\".\"id\" = \"reg_eval_criteria_details\".\"criteria_id\" order by \"reg_eval_criteria\".\"id\", \"reg_eval_criteria_details\".\"order_index\"",
+ "name": "reg_eval_criteria_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.project_gtc_view": {
+ "columns": {},
+ "definition": "select \"projects\".\"id\" as \"id\", \"projects\".\"code\" as \"code\", \"projects\".\"name\" as \"name\", \"projects\".\"type\" as \"type\", \"projects\".\"created_at\" as \"project_created_at\", \"projects\".\"updated_at\" as \"project_updated_at\", \"project_gtc_files\".\"id\" as \"gtc_file_id\", \"project_gtc_files\".\"file_name\" as \"fileName\", \"project_gtc_files\".\"file_path\" as \"filePath\", \"project_gtc_files\".\"original_file_name\" as \"originalFileName\", \"project_gtc_files\".\"file_size\" as \"fileSize\", \"project_gtc_files\".\"mime_type\" as \"mimeType\", \"project_gtc_files\".\"created_at\" as \"gtcCreatedAt\", \"project_gtc_files\".\"updated_at\" as \"gtcUpdatedAt\" from \"projects\" left join \"project_gtc_files\" on \"projects\".\"id\" = \"project_gtc_files\".\"project_id\"",
+ "name": "project_gtc_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_answer_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "qna_id": {
+ "name": "qna_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"qna_answer\".\"id\", \"qna_answer\".\"qna_id\", \"qna_answer\".\"content\", \"qna_answer\".\"author\", \"qna_answer\".\"created_at\" as \"created_at\", \"qna_answer\".\"updated_at\" as \"updated_at\", \"qna_answer\".\"is_deleted\" as \"is_deleted\", \"qna_answer\".\"deleted_at\" as \"deleted_at\", \"qna\".\"title\" as \"question_title\", \"qna\".\"category\" as \"question_category\", \"qna\".\"author\" as \"question_author\", \"qna\".\"created_at\" as \"question_created_at\", \"users\".\"name\" as \"author_name\", \"users\".\"email\" as \"author_email\", \"users\".\"domain\" as \"author_domain\", \"users\".\"phone\" as \"author_phone\", \"users\".\"image_url\" as \"author_image_url\", \"users\".\"language\" as \"author_language\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", \"tech_vendors\".\"vendor_code\" as \"tech_vendor_code\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", COALESCE(\"vendors\".\"vendor_code\", \"tech_vendors\".\"vendor_code\") as \"company_code\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"total_comments\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"comment_count\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.parent_comment_id IS NULL\n AND qc.is_deleted = false\n ) as \"parent_comments_count\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.parent_comment_id IS NOT NULL\n AND qc.is_deleted = false\n ) as \"child_comments_count\", (\n SELECT MAX(qc.created_at)\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"last_commented_at\", (\n SELECT ROW_NUMBER() OVER (\n PARTITION BY qa2.qna_id \n ORDER BY qa2.created_at ASC\n )\n FROM \"qna_answer\" qa2\n WHERE qa2.id = \"qna_answer\".\"id\"\n AND qa2.is_deleted = false\n ) as \"answer_order\", (\n \"qna_answer\".\"id\" = (\n SELECT qa2.id\n FROM \"qna_answer\" qa2\n WHERE qa2.qna_id = \"qna_answer\".\"qna_id\"\n AND qa2.is_deleted = false\n ORDER BY qa2.created_at ASC\n LIMIT 1\n )\n ) as \"is_first_answer\", (\n \"qna_answer\".\"id\" = (\n SELECT qa2.id\n FROM \"qna_answer\" qa2\n WHERE qa2.qna_id = \"qna_answer\".\"qna_id\"\n AND qa2.is_deleted = false\n ORDER BY qa2.created_at DESC\n LIMIT 1\n )\n ) as \"is_latest_answer\" from \"qna_answer\" left join \"qna\" on \"qna_answer\".\"qna_id\" = \"qna\".\"id\" left join \"users\" on \"qna_answer\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna_answer\".\"is_deleted\" = false order by \"qna_answer\".\"created_at\"",
+ "name": "qna_answer_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_comment_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_id": {
+ "name": "answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"qna_comments\".\"id\", \"qna_comments\".\"content\", \"qna_comments\".\"author\", \"qna_comments\".\"answer_id\", \"qna_comments\".\"parent_comment_id\", \"qna_comments\".\"created_at\" as \"created_at\", \"qna_comments\".\"updated_at\" as \"updated_at\", \"qna_comments\".\"is_deleted\" as \"is_deleted\", \"qna_comments\".\"deleted_at\" as \"deleted_at\", \"qna_answer\".\"content\" as \"answer_content\", \"qna_answer\".\"author\" as \"answer_author\", \"qna_answer\".\"created_at\" as \"answer_created_at\", \"qna_answer\".\"qna_id\" as \"qna_id\", \"qna\".\"title\" as \"question_title\", \"qna\".\"category\" as \"question_category\", \"qna\".\"author\" as \"question_author\", \"users\".\"name\" as \"author_name\", \"users\".\"email\" as \"author_email\", \"users\".\"domain\" as \"author_domain\", \"users\".\"image_url\" as \"author_image_url\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", \"qna_comments\".\"parent_comment_id\" IS NULL as \"is_parent_comment\", \"qna_comments\".\"parent_comment_id\" IS NOT NULL as \"is_child_comment\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc2\n WHERE qc2.parent_comment_id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"child_comments_count\", (\n SELECT COUNT(*) > 0\n FROM \"qna_comments\" qc2\n WHERE qc2.parent_comment_id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"has_child_comments\", \n CASE \n WHEN \"qna_comments\".\"parent_comment_id\" IS NULL THEN 0\n ELSE 1\n END\n as \"comment_depth\", (\n SELECT ROW_NUMBER() OVER (\n PARTITION BY qc2.answer_id, qc2.parent_comment_id\n ORDER BY qc2.created_at ASC\n )\n FROM \"qna_comments\" qc2\n WHERE qc2.id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"comment_order\" from \"qna_comments\" left join \"qna_answer\" on \"qna_comments\".\"answer_id\" = \"qna_answer\".\"id\" left join \"qna\" on \"qna_answer\".\"qna_id\" = \"qna\".\"id\" left join \"users\" on \"qna_comments\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna_comments\".\"is_deleted\" = false order by \"qna_comments\".\"created_at\"",
+ "name": "qna_comment_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "qna_category",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'partners'"
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'en'"
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "last_login_at": {
+ "name": "last_login_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"qna\".\"id\", \"qna\".\"title\", \"qna\".\"content\", \"qna\".\"author\", \"qna\".\"category\", \"qna\".\"created_at\", \"qna\".\"updated_at\", \"qna\".\"is_deleted\", \"qna\".\"deleted_at\", \"users\".\"name\", \"users\".\"email\", \"users\".\"domain\", \"users\".\"phone\", \"users\".\"image_url\", \"users\".\"language\", \"users\".\"is_active\", \"users\".\"last_login_at\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"status\" as \"vendor_status\", \"vendors\".\"country\" as \"vendor_country\", \"vendors\".\"business_size\" as \"vendor_business_size\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", \"tech_vendors\".\"vendor_code\" as \"tech_vendor_code\", \"tech_vendors\".\"status\" as \"tech_vendor_status\", \"tech_vendors\".\"country\" as \"tech_vendor_country\", \"tech_vendors\".\"tech_vendor_type\" as \"tech_vendor_type\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", COALESCE(\"vendors\".\"vendor_code\", \"tech_vendors\".\"vendor_code\") as \"company_code\", COALESCE(\"vendors\".\"country\", \"tech_vendors\".\"country\") as \"company_country\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", (\n SELECT COUNT(*)::int\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"total_answers\", (\n SELECT COUNT(*)::int\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"answer_count\", (\n SELECT MAX(qa.created_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"last_answered_at\", (\n SELECT MIN(qa.created_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"first_answered_at\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qc.is_deleted = false\n AND qa.is_deleted = false\n ) as \"total_comments\", (\n SELECT GREATEST(\n \"qna\".\"updated_at\",\n COALESCE((\n SELECT MAX(qa.updated_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ), \"qna\".\"updated_at\"),\n COALESCE((\n SELECT MAX(qc.updated_at)\n FROM \"qna_comments\" qc\n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qc.is_deleted = false\n AND qa.is_deleted = false\n ), \"qna\".\"updated_at\")\n )\n ) as \"last_activity_at\", (\n SELECT COUNT(*) > 0\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"has_answers\", (\n SELECT COUNT(*) > 0\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"is_answered\", (\n (SELECT COUNT(*) FROM \"qna_answer\" qa WHERE qa.qna_id = \"qna\".\"id\" AND qa.is_deleted = false) >= 3\n OR\n (SELECT COUNT(*) FROM \"qna_comments\" qc \n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id \n WHERE qa.qna_id = \"qna\".\"id\" AND qc.is_deleted = false AND qa.is_deleted = false) >= 5\n ) as \"is_popular\" from \"qna\" left join \"users\" on \"qna\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna\".\"is_deleted\" = false order by \"qna\".\"created_at\"",
+ "name": "qna_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.template_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sample_data": {
+ "name": "sample_data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_email": {
+ "name": "created_by_email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variables": {
+ "name": "variables",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.content,\n t.description,\n t.category,\n t.sample_data,\n t.is_active,\n t.version,\n t.created_by,\n u.name AS created_by_name,\n u.email AS created_by_email,\n t.created_at,\n t.updated_at,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', v.id,\n 'variableName', v.variable_name,\n 'variableType', v.variable_type,\n 'defaultValue', v.default_value,\n 'isRequired', v.is_required,\n 'description', v.description,\n 'displayOrder', v.display_order\n ) ORDER BY v.display_order\n ) FILTER (WHERE v.id IS NOT NULL),\n '[]'::json\n ) AS variables\n FROM \"templates\" t\n LEFT JOIN \"users\" u ON t.created_by = u.id\n LEFT JOIN \"template_variables\" v ON t.id = v.template_id\n GROUP BY\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.content,\n t.description,\n t.category,\n t.sample_data,\n t.is_active,\n t.version,\n t.created_by,\n u.name,\n u.email,\n t.created_at,\n t.updated_at\n",
+ "name": "template_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.template_list_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_email": {
+ "name": "created_by_email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_count": {
+ "name": "variable_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "required_variable_count": {
+ "name": "required_variable_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.description,\n t.category,\n t.is_active,\n t.version,\n t.created_by,\n u.name AS created_by_name,\n u.email AS created_by_email,\n t.created_at,\n t.updated_at,\n COALESCE(v.variable_count, 0) AS variable_count,\n COALESCE(v.required_variable_count, 0) AS required_variable_count\n FROM \"templates\" t\n LEFT JOIN \"users\" u ON t.created_by = u.id\n LEFT JOIN (\n SELECT\n template_id,\n COUNT(*) AS variable_count,\n COUNT(*) FILTER (WHERE is_required) AS required_variable_count\n FROM \"template_variables\"\n GROUP BY template_id\n ) v ON t.id = v.template_id\n",
+ "name": "template_list_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_clauses_tree_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"gtc_clauses\".\"id\", \"gtc_clauses\".\"document_id\", \"gtc_clauses\".\"parent_id\", \"gtc_clauses\".\"item_number\", \"gtc_clauses\".\"category\", \"gtc_clauses\".\"subtitle\", \"gtc_clauses\".\"content\", \"gtc_clauses\".\"sort_order\", \"gtc_clauses\".\"depth\", \"gtc_clauses\".\"full_path\", \"gtc_clauses\".\"images\", \"gtc_clauses\".\"is_active\", \"gtc_clauses\".\"created_at\", \"gtc_clauses\".\"created_by_id\", \"gtc_clauses\".\"updated_at\", \"gtc_clauses\".\"updated_by_id\", \"gtc_clauses\".\"edit_reason\", \"gtc_documents\".\"type\", \"gtc_documents\".\"file_name\", \"gtc_documents\".\"revision\", \"gtc_documents\".\"project_id\", created_by_user.name as \"created_by_name\", created_by_user.email as \"created_by_email\", updated_by_user.name as \"updated_by_name\", updated_by_user.email as \"updated_by_email\", parent_clause.item_number as \"parent_item_number\", parent_clause.subtitle as \"parent_subtitle\", \n (\n SELECT count(*)\n FROM gtc_clauses children\n WHERE children.parent_id = \"gtc_clauses\".\"id\"\n AND children.is_active = true\n )\n as \"children_count\", \n (\n SELECT count(*)\n FROM gtc_clauses siblings\n WHERE siblings.parent_id = \"gtc_clauses\".\"parent_id\"\n AND siblings.is_active = true\n )\n as \"siblings_count\", \n \"gtc_clauses\".\"created_by_id\" != \"gtc_clauses\".\"updated_by_id\" OR \n \"gtc_clauses\".\"created_at\" != \"gtc_clauses\".\"updated_at\"\n as \"has_edit_history\" from \"gtc_clauses\" left join \"gtc_documents\" on \"gtc_clauses\".\"document_id\" = \"gtc_documents\".\"id\" left join users created_by_user on \"gtc_clauses\".\"created_by_id\" = created_by_user.id left join users updated_by_user on \"gtc_clauses\".\"updated_by_id\" = updated_by_user.id left join gtc_clauses parent_clause on \"gtc_clauses\".\"parent_id\" = parent_clause.id",
+ "name": "gtc_clauses_tree_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_documents_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"gtc_documents\".\"id\", \"gtc_documents\".\"type\", \"gtc_documents\".\"project_id\", \"gtc_documents\".\"revision\", \"gtc_documents\".\"title\", \"gtc_documents\".\"file_name\", \"gtc_documents\".\"file_path\", \"gtc_documents\".\"file_size\", \"gtc_documents\".\"created_at\", \"gtc_documents\".\"created_by_id\", \"gtc_documents\".\"updated_at\", \"gtc_documents\".\"updated_by_id\", \"gtc_documents\".\"edit_reason\", \"gtc_documents\".\"is_active\", \"projects\".\"code\", \"projects\".\"name\", created_by_user.name as \"created_by_name\", created_by_user.email as \"created_by_email\", updated_by_user.name as \"updated_by_name\", updated_by_user.email as \"updated_by_email\", \n (\n SELECT count(*)\n FROM gtc_documents gd2\n WHERE gd2.type = \"gtc_documents\".\"type\"\n AND gd2.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd2.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd2.project_id IS NULL)\n )\n )\n as \"total_documents_in_group\", \n (\n SELECT max(revision)\n FROM gtc_documents gd3\n WHERE gd3.type = \"gtc_documents\".\"type\"\n AND gd3.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd3.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd3.project_id IS NULL)\n )\n )\n as \"latest_revision\", \n \"gtc_documents\".\"revision\" = (\n SELECT max(revision)\n FROM gtc_documents gd4\n WHERE gd4.type = \"gtc_documents\".\"type\"\n AND gd4.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd4.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd4.project_id IS NULL)\n )\n )\n as \"is_latest_revision\", \n (\n SELECT id\n FROM gtc_documents gd5\n WHERE gd5.type = \"gtc_documents\".\"type\"\n AND gd5.is_active = true\n AND gd5.revision < \"gtc_documents\".\"revision\"\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd5.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd5.project_id IS NULL)\n )\n ORDER BY gd5.revision DESC\n LIMIT 1\n )\n as \"previous_revision_id\", \n (\n SELECT id\n FROM gtc_documents gd6\n WHERE gd6.type = \"gtc_documents\".\"type\"\n AND gd6.is_active = true\n AND gd6.revision > \"gtc_documents\".\"revision\"\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd6.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd6.project_id IS NULL)\n )\n ORDER BY gd6.revision ASC\n LIMIT 1\n )\n as \"next_revision_id\", \n CASE \n WHEN \"gtc_documents\".\"file_size\" IS NULL THEN NULL\n WHEN \"gtc_documents\".\"file_size\" < 1024 THEN \"gtc_documents\".\"file_size\" || ' B'\n WHEN \"gtc_documents\".\"file_size\" < 1024 * 1024 THEN round(\"gtc_documents\".\"file_size\" / 1024.0, 1) || ' KB'\n WHEN \"gtc_documents\".\"file_size\" < 1024 * 1024 * 1024 THEN round(\"gtc_documents\".\"file_size\" / (1024.0 * 1024), 1) || ' MB'\n ELSE round(\"gtc_documents\".\"file_size\" / (1024.0 * 1024 * 1024), 1) || ' GB'\n END\n as \"file_size_formatted\", \n CASE \n WHEN \"gtc_documents\".\"project_id\" IS NOT NULL THEN (\n SELECT count(*)\n FROM gtc_documents gd7\n WHERE gd7.project_id = \"gtc_documents\".\"project_id\"\n AND gd7.is_active = true\n )\n ELSE NULL\n END\n as \"project_total_documents\", \n (\n SELECT array_agg(revision ORDER BY revision)\n FROM gtc_documents gd8\n WHERE gd8.type = \"gtc_documents\".\"type\"\n AND gd8.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd8.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd8.project_id IS NULL)\n )\n )\n as \"revision_history\", \n \"gtc_documents\".\"created_by_id\" != \"gtc_documents\".\"updated_by_id\" OR \n \"gtc_documents\".\"created_at\" != \"gtc_documents\".\"updated_at\"\n as \"has_edit_history\" from \"gtc_documents\" left join \"projects\" on \"gtc_documents\".\"project_id\" = \"projects\".\"id\" left join users created_by_user on \"gtc_documents\".\"created_by_id\" = created_by_user.id left join users updated_by_user on \"gtc_documents\".\"updated_by_id\" = updated_by_user.id",
+ "name": "gtc_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_vendor_clauses_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_document_id": {
+ "name": "vendor_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_clause_id": {
+ "name": "base_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_number_modified": {
+ "name": "is_number_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_category_modified": {
+ "name": "is_category_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_subtitle_modified": {
+ "name": "is_subtitle_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_content_modified": {
+ "name": "is_content_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_document_id": {
+ "name": "base_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_note": {
+ "name": "negotiation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_excluded": {
+ "name": "is_excluded",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"gtc_vendor_clauses\".\"id\", \"gtc_vendor_clauses\".\"vendor_document_id\", \"gtc_vendor_clauses\".\"base_clause_id\", \"gtc_vendor_clauses\".\"parent_id\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_item_number\", \"gtc_clauses\".\"item_number\")\n as \"effective_item_number\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_category\", \"gtc_clauses\".\"category\")\n as \"effective_category\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_subtitle\", \"gtc_clauses\".\"subtitle\")\n as \"effective_subtitle\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_content\", \"gtc_clauses\".\"content\")\n as \"effective_content\", \"gtc_vendor_clauses\".\"is_number_modified\", \"gtc_vendor_clauses\".\"is_category_modified\", \"gtc_vendor_clauses\".\"is_subtitle_modified\", \"gtc_vendor_clauses\".\"is_content_modified\", \"gtc_clauses\".\"item_number\", \"gtc_clauses\".\"category\", \"gtc_clauses\".\"subtitle\", \"gtc_clauses\".\"content\", \"gtc_vendor_documents\".\"vendor_id\", \"vendors\".\"vendor_code\", \"vendors\".\"vendor_name\", \"gtc_vendor_documents\".\"base_document_id\", \"gtc_documents\".\"type\", \"gtc_documents\".\"file_name\", \"gtc_vendor_clauses\".\"review_status\", \"gtc_vendor_clauses\".\"negotiation_note\", \"gtc_vendor_clauses\".\"is_excluded\", \"gtc_vendor_clauses\".\"sort_order\", \"gtc_vendor_clauses\".\"depth\", \"gtc_vendor_clauses\".\"full_path\", \n \"gtc_vendor_clauses\".\"is_number_modified\" OR \n \"gtc_vendor_clauses\".\"is_category_modified\" OR \n \"gtc_vendor_clauses\".\"is_subtitle_modified\" OR \n \"gtc_vendor_clauses\".\"is_content_modified\"\n as \"has_modifications\", \"gtc_vendor_clauses\".\"created_at\", \"gtc_vendor_clauses\".\"updated_at\" from \"gtc_vendor_clauses\" left join \"gtc_clauses\" on \"gtc_vendor_clauses\".\"base_clause_id\" = \"gtc_clauses\".\"id\" left join \"gtc_vendor_documents\" on \"gtc_vendor_clauses\".\"vendor_document_id\" = \"gtc_vendor_documents\".\"id\" left join \"vendors\" on \"gtc_vendor_documents\".\"vendor_id\" = \"vendors\".\"id\" left join \"gtc_documents\" on \"gtc_vendor_documents\".\"base_document_id\" = \"gtc_documents\".\"id\"",
+ "name": "gtc_vendor_clauses_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.legal_works_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_urgent": {
+ "name": "is_urgent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "request_date": {
+ "name": "request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consultation_date": {
+ "name": "consultation_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expected_answer_date": {
+ "name": "expected_answer_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_completion_date": {
+ "name": "legal_completion_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer": {
+ "name": "reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_responder": {
+ "name": "legal_responder",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachment": {
+ "name": "has_attachment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "review_department": {
+ "name": "review_department",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inquiry_type": {
+ "name": "inquiry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "request_content": {
+ "name": "request_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "contract_project_name": {
+ "name": "contract_project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_amount": {
+ "name": "contract_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"legal_works\".\"id\", \"legal_works\".\"category\", \"legal_works\".\"status\", \"legal_works\".\"company_id\", \"legal_works\".\"vendor_code\", \"legal_works\".\"vendor_name\", \"legal_works\".\"is_urgent\", \"legal_works\".\"request_date\", \"legal_works\".\"consultation_date\", \"legal_works\".\"expected_answer_date\", \"legal_works\".\"legal_completion_date\", \"legal_works\".\"reviewer\", \"legal_works\".\"legal_responder\", \"legal_works\".\"has_attachment\", \"legal_works\".\"created_at\", \"legal_works\".\"updated_at\", \"legal_work_requests\".\"review_department\", \"legal_work_requests\".\"inquiry_type\", \"legal_work_requests\".\"title\", \"legal_work_requests\".\"request_content\", \"legal_work_requests\".\"is_public\", \"legal_work_requests\".\"contract_project_name\", \"legal_work_requests\".\"contract_type\", \"legal_work_requests\".\"contract_amount\", (\n SELECT response_content \n FROM legal_work_responses lwr_latest \n WHERE lwr_latest.legal_work_id = \"legal_works\".\"id\" \n ORDER BY lwr_latest.created_at DESC \n LIMIT 1\n ) as \"response_content\", (\n SELECT COUNT(*)::integer \n FROM legal_work_attachments lwa \n WHERE lwa.legal_work_id = \"legal_works\".\"id\"\n ) as \"attachment_count\" from \"legal_works\" left join \"legal_work_requests\" on \"legal_works\".\"id\" = \"legal_work_requests\".\"legal_work_id\" left join \"vendors\" on \"legal_works\".\"company_id\" = \"vendors\".\"id\"",
+ "name": "legal_works_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.bidding_list_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_number": {
+ "name": "bidding_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "contract_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bidding_type": {
+ "name": "bidding_type",
+ "type": "bidding_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "award_count": {
+ "name": "award_count",
+ "type": "award_count",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'single'"
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_date": {
+ "name": "pre_quote_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_registration_date": {
+ "name": "bidding_registration_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_start_date": {
+ "name": "submission_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_end_date": {
+ "name": "submission_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_date": {
+ "name": "evaluation_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_specification_meeting": {
+ "name": "has_specification_meeting",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "has_pr_document": {
+ "name": "has_pr_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "budget": {
+ "name": "budget",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_price": {
+ "name": "target_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_bid_price": {
+ "name": "final_bid_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "bidding_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bidding_generated'"
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_email": {
+ "name": "manager_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_phone": {
+ "name": "manager_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "meeting_date": {
+ "name": "meeting_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "location": {
+ "name": "location",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "definition": "select \"biddings\".\"id\", \"biddings\".\"bidding_number\", \"biddings\".\"revision\", \"biddings\".\"project_name\", \"biddings\".\"item_name\", \"biddings\".\"title\", \"biddings\".\"description\", \"biddings\".\"content\", \"biddings\".\"contract_type\", \"biddings\".\"bidding_type\", \"biddings\".\"award_count\", \"biddings\".\"contract_period\", \"biddings\".\"pre_quote_date\", \"biddings\".\"bidding_registration_date\", \"biddings\".\"submission_start_date\", \"biddings\".\"submission_end_date\", \"biddings\".\"evaluation_date\", \"biddings\".\"has_specification_meeting\", \"biddings\".\"has_pr_document\", \"biddings\".\"pr_number\", \"biddings\".\"currency\", \"biddings\".\"budget\", \"biddings\".\"target_price\", \"biddings\".\"final_bid_price\", \"biddings\".\"status\", \"biddings\".\"is_public\", \"biddings\".\"manager_name\", \"biddings\".\"manager_email\", \"biddings\".\"manager_phone\", \"biddings\".\"remarks\", \"biddings\".\"created_by\", \"biddings\".\"created_at\", \"biddings\".\"updated_at\", \"biddings\".\"updated_by\", \"specification_meetings\".\"id\" IS NOT NULL as \"has_specification_meeting_details\", \"specification_meetings\".\"meeting_date\", \"specification_meetings\".\"location\", \"specification_meetings\".\"contact_person\", \"specification_meetings\".\"is_required\", \n COALESCE((\n SELECT count(*) \n FROM pr_documents \n WHERE bidding_id = \"biddings\".\"id\"\n ), 0)\n as \"pr_document_count\", \n (\n SELECT array_agg(document_name ORDER BY registered_at DESC)\n FROM pr_documents \n WHERE bidding_id = \"biddings\".\"id\"\n LIMIT 5\n )\n as \"pr_document_names\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ), 0)\n as \"participant_expected\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'submitted'\n ), 0)\n as \"participant_participated\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'declined'\n ), 0)\n as \"participant_declined\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status IN ('pending', 'sent')\n ), 0)\n as \"participant_pending\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'accepted'\n ), 0)\n as \"participant_accepted\", \n CASE \n WHEN (\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ) > 0 \n THEN ROUND(\n (\n SELECT count(*)::decimal \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'submitted'\n ) / (\n SELECT count(*)::decimal \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ) * 100, 1\n )\n ELSE 0 \n END\n as \"participation_rate\", \n (\n SELECT AVG(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"avg_pre_quote_amount\", \n (\n SELECT MIN(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"min_pre_quote_amount\", \n (\n SELECT MAX(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"max_pre_quote_amount\", \n (\n SELECT AVG(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"avg_final_quote_amount\", \n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"min_final_quote_amount\", \n (\n SELECT MAX(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"max_final_quote_amount\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND is_pre_quote_selected = true\n ), 0)\n as \"selected_for_final_bid_count\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND is_winner = true\n ), 0)\n as \"winner_count\", \n (\n SELECT array_agg(v.vendor_name ORDER BY v.vendor_name)\n FROM bidding_companies bc\n JOIN vendors v ON bc.company_id = v.id\n WHERE bc.bidding_id = \"biddings\".\"id\" \n AND bc.is_winner = true\n )\n as \"winner_company_names\", \n CASE \n WHEN \"biddings\".\"submission_start_date\" IS NULL OR \"biddings\".\"submission_end_date\" IS NULL \n THEN 'not_scheduled'\n WHEN NOW() < \"biddings\".\"submission_start_date\" \n THEN 'scheduled'\n WHEN NOW() BETWEEN \"biddings\".\"submission_start_date\" AND \"biddings\".\"submission_end_date\" \n THEN 'active'\n WHEN NOW() > \"biddings\".\"submission_end_date\" \n THEN 'closed'\n ELSE 'unknown'\n END\n as \"submission_status\", \n CASE \n WHEN \"biddings\".\"submission_end_date\" IS NOT NULL \n AND NOW() < \"biddings\".\"submission_end_date\" \n THEN EXTRACT(DAYS FROM (\"biddings\".\"submission_end_date\" - NOW()))::integer\n ELSE NULL \n END\n as \"days_until_deadline\", \n CASE \n WHEN \"biddings\".\"submission_start_date\" IS NOT NULL \n AND NOW() < \"biddings\".\"submission_start_date\" \n THEN EXTRACT(DAYS FROM (\"biddings\".\"submission_start_date\" - NOW()))::integer\n ELSE NULL \n END\n as \"days_until_start\", \n CASE \n WHEN \"biddings\".\"budget\" IS NOT NULL AND \"biddings\".\"budget\" > 0\n AND (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) IS NOT NULL\n THEN ROUND(\n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) / \"biddings\".\"budget\" * 100, 1\n )\n ELSE NULL \n END\n as \"budget_efficiency_rate\", \n CASE \n WHEN \"biddings\".\"target_price\" IS NOT NULL AND \"biddings\".\"target_price\" > 0\n AND (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) IS NOT NULL\n THEN ROUND(\n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) / \"biddings\".\"target_price\" * 100, 1\n )\n ELSE NULL \n END\n as \"target_price_efficiency_rate\", \n CASE \"biddings\".\"status\"\n WHEN 'bidding_generated' THEN 10\n WHEN 'request_for_quotation' THEN 20\n WHEN 'received_quotation' THEN 40\n WHEN 'set_target_price' THEN 60\n WHEN 'bidding_opened' THEN 70\n WHEN 'bidding_closed' THEN 80\n WHEN 'evaluation_of_bidding' THEN 90\n WHEN 'vendor_selected' THEN 100\n WHEN 'bidding_disposal' THEN 0\n ELSE 0\n END\n as \"progress_score\", \n GREATEST(\n \"biddings\".\"updated_at\",\n COALESCE((\n SELECT MAX(updated_at) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ), \"biddings\".\"updated_at\")\n )\n as \"last_activity_date\" from \"biddings\" left join \"specification_meetings\" on \"biddings\".\"id\" = \"specification_meetings\".\"bidding_id\"",
+ "name": "bidding_list_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "risks.risks_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "event_type": {
+ "name": "event_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "event_status": {
+ "name": "event_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "manager_id": {
+ "name": "manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occurred_at": {
+ "name": "occurred_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"risks\".\"risk_events\".\"id\", \"risks\".\"risk_events\".\"event_type\", \"risks\".\"risk_events\".\"vendor_id\", \"vendors\".\"vendor_code\", \"vendors\".\"vendor_name\", \"vendors\".\"tax_id\", \"risks\".\"risk_events\".\"provider\", \"risks\".\"risk_events\".\"content\", \"risks\".\"risk_events\".\"event_status\", \"risks\".\"risk_events\".\"manager_id\", \"users\".\"name\", \"risks\".\"risk_events\".\"admin_comment\", \"risks\".\"risk_events\".\"occurred_at\" from \"risks\".\"risk_events\" left join \"vendors\" on \"vendors\".\"id\" = \"risks\".\"risk_events\".\"vendor_id\" left join \"users\" on \"users\".\"id\" = \"risks\".\"risk_events\".\"manager_id\"",
+ "name": "risks_view",
+ "schema": "risks",
+ "isExisting": false,
+ "materialized": false
+ }
+ },
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/db/migrations/meta/0291_snapshot.json b/db/migrations/meta/0291_snapshot.json
new file mode 100644
index 00000000..7f3cc91f
--- /dev/null
+++ b/db/migrations/meta/0291_snapshot.json
@@ -0,0 +1,48457 @@
+{
+ "id": "4fffa3c2-0a6d-4aaf-8d71-7efc66234c30",
+ "prevId": "7cca1d11-5749-4231-9e84-b231c8d21838",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.companies": {
+ "name": "companies",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "companies_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "taxID": {
+ "name": "taxID",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_envelopes": {
+ "name": "contract_envelopes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_envelopes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "envelope_id": {
+ "name": "envelope_id",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "envelope_status": {
+ "name": "envelope_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contract_envelopes_contract_id_contracts_id_fk": {
+ "name": "contract_envelopes_contract_id_contracts_id_fk",
+ "tableFrom": "contract_envelopes",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_items": {
+ "name": "contract_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_items_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_id": {
+ "name": "item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "unit_price": {
+ "name": "unit_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_rate": {
+ "name": "tax_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_amount": {
+ "name": "tax_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_line_amount": {
+ "name": "total_line_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "contract_items_contract_item_idx": {
+ "name": "contract_items_contract_item_idx",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "item_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "contract_items_contract_id_contracts_id_fk": {
+ "name": "contract_items_contract_id_contracts_id_fk",
+ "tableFrom": "contract_items",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contract_items_item_id_items_id_fk": {
+ "name": "contract_items_item_id_items_id_fk",
+ "tableFrom": "contract_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contract_items_contract_id_item_id_unique": {
+ "name": "contract_items_contract_id_item_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_id",
+ "item_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_signers": {
+ "name": "contract_signers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_signers_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "envelope_id": {
+ "name": "envelope_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_contact_id": {
+ "name": "vendor_contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "signer_type": {
+ "name": "signer_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'VENDOR'"
+ },
+ "signer_email": {
+ "name": "signer_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "signer_name": {
+ "name": "signer_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "signer_position": {
+ "name": "signer_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "signer_status": {
+ "name": "signer_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "signed_at": {
+ "name": "signed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contract_signers_envelope_id_contract_envelopes_id_fk": {
+ "name": "contract_signers_envelope_id_contract_envelopes_id_fk",
+ "tableFrom": "contract_signers",
+ "tableTo": "contract_envelopes",
+ "columnsFrom": [
+ "envelope_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contract_signers_vendor_contact_id_vendor_contacts_id_fk": {
+ "name": "contract_signers_vendor_contact_id_vendor_contacts_id_fk",
+ "tableFrom": "contract_signers",
+ "tableTo": "vendor_contacts",
+ "columnsFrom": [
+ "vendor_contact_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contracts": {
+ "name": "contracts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contracts_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_name": {
+ "name": "contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "end_date": {
+ "name": "end_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "partial_shipping_allowed": {
+ "name": "partial_shipping_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "partial_payment_allowed": {
+ "name": "partial_payment_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contracts_project_id_projects_id_fk": {
+ "name": "contracts_project_id_projects_id_fk",
+ "tableFrom": "contracts",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contracts_vendor_id_vendors_id_fk": {
+ "name": "contracts_vendor_id_vendors_id_fk",
+ "tableFrom": "contracts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contracts_contract_no_unique": {
+ "name": "contracts_contract_no_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_no"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.poa": {
+ "name": "poa",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "poa_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_contract_no": {
+ "name": "original_contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_contract_name": {
+ "name": "original_contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_status": {
+ "name": "original_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_status": {
+ "name": "approval_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "poa_original_contract_no_contracts_contract_no_fk": {
+ "name": "poa_original_contract_no_contracts_contract_no_fk",
+ "tableFrom": "poa",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "original_contract_no"
+ ],
+ "columnsTo": [
+ "contract_no"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "poa_project_id_projects_id_fk": {
+ "name": "poa_project_id_projects_id_fk",
+ "tableFrom": "poa",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "poa_vendor_id_vendors_id_fk": {
+ "name": "poa_vendor_id_vendors_id_fk",
+ "tableFrom": "poa",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_offshore_hull": {
+ "name": "item_offshore_hull",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_item_list": {
+ "name": "sub_item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_offshore_top": {
+ "name": "item_offshore_top",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_item_list": {
+ "name": "sub_item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_shipbuilding": {
+ "name": "item_shipbuilding",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ship_types": {
+ "name": "ship_types",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'OPTION'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.items": {
+ "name": "items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_no": {
+ "name": "project_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "package_code": {
+ "name": "package_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sm_code": {
+ "name": "sm_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_item_code": {
+ "name": "parent_item_code",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_level": {
+ "name": "item_level",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delete_flag": {
+ "name": "delete_flag",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_date": {
+ "name": "change_date",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "base_unit_of_measure": {
+ "name": "base_unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_item_unique": {
+ "name": "project_item_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_no",
+ "item_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.materials": {
+ "name": "materials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_item_code": {
+ "name": "parent_item_code",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_level": {
+ "name": "item_level",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delete_flag": {
+ "name": "delete_flag",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_date": {
+ "name": "change_date",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "base_unit_of_measure": {
+ "name": "base_unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "materials_item_code_unique": {
+ "name": "materials_item_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "item_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pq_criterias": {
+ "name": "pq_criterias",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_point": {
+ "name": "check_point",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_group_name": {
+ "name": "sub_group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pq_list_id": {
+ "name": "pq_list_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "input_format": {
+ "name": "input_format",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'TEXT'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pq_criterias_pq_list_id_pq_lists_id_fk": {
+ "name": "pq_criterias_pq_list_id_pq_lists_id_fk",
+ "tableFrom": "pq_criterias",
+ "tableTo": "pq_lists",
+ "columnsFrom": [
+ "pq_list_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pq_lists": {
+ "name": "pq_lists",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_to": {
+ "name": "valid_to",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pq_lists_project_id_projects_id_fk": {
+ "name": "pq_lists_project_id_projects_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "pq_lists_created_by_users_id_fk": {
+ "name": "pq_lists_created_by_users_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "pq_lists_updated_by_users_id_fk": {
+ "name": "pq_lists_updated_by_users_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.site_visit_request_attachments": {
+ "name": "site_visit_request_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "site_visit_request_id": {
+ "name": "site_visit_request_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_site_visit_info_id": {
+ "name": "vendor_site_visit_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "site_visit_request_attachments_site_visit_request_id_site_visit_requests_id_fk": {
+ "name": "site_visit_request_attachments_site_visit_request_id_site_visit_requests_id_fk",
+ "tableFrom": "site_visit_request_attachments",
+ "tableTo": "site_visit_requests",
+ "columnsFrom": [
+ "site_visit_request_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "site_visit_request_attachments_vendor_site_visit_info_id_vendor_site_visit_info_id_fk": {
+ "name": "site_visit_request_attachments_vendor_site_visit_info_id_vendor_site_visit_info_id_fk",
+ "tableFrom": "site_visit_request_attachments",
+ "tableTo": "vendor_site_visit_info",
+ "columnsFrom": [
+ "vendor_site_visit_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.site_visit_requests": {
+ "name": "site_visit_requests",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "investigation_id": {
+ "name": "investigation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "inspection_duration": {
+ "name": "inspection_duration",
+ "type": "numeric(4, 1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_start_date": {
+ "name": "requested_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_end_date": {
+ "name": "requested_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_attendees": {
+ "name": "shi_attendees",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "vendor_requests": {
+ "name": "vendor_requests",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "additional_requests": {
+ "name": "additional_requests",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REQUESTED'"
+ },
+ "sent_at": {
+ "name": "sent_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "site_visit_requests_investigation_id_vendor_investigations_id_fk": {
+ "name": "site_visit_requests_investigation_id_vendor_investigations_id_fk",
+ "tableFrom": "site_visit_requests",
+ "tableTo": "vendor_investigations",
+ "columnsFrom": [
+ "investigation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "site_visit_requests_requester_id_users_id_fk": {
+ "name": "site_visit_requests_requester_id_users_id_fk",
+ "tableFrom": "site_visit_requests",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_criteria_attachments": {
+ "name": "vendor_criteria_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_criteria_answer_id": {
+ "name": "vendor_criteria_answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_criteria_attachments_vendor_criteria_answer_id_vendor_pq_criteria_answers_id_fk": {
+ "name": "vendor_criteria_attachments_vendor_criteria_answer_id_vendor_pq_criteria_answers_id_fk",
+ "tableFrom": "vendor_criteria_attachments",
+ "tableTo": "vendor_pq_criteria_answers",
+ "columnsFrom": [
+ "vendor_criteria_answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_investigation_attachments": {
+ "name": "vendor_investigation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "investigation_id": {
+ "name": "investigation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'REPORT'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_investigation_attachments_investigation_id_vendor_investigations_id_fk": {
+ "name": "vendor_investigation_attachments_investigation_id_vendor_investigations_id_fk",
+ "tableFrom": "vendor_investigation_attachments",
+ "tableTo": "vendor_investigations",
+ "columnsFrom": [
+ "investigation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_investigations": {
+ "name": "vendor_investigations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pq_submission_id": {
+ "name": "pq_submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "qm_manager_id": {
+ "name": "qm_manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_status": {
+ "name": "investigation_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "investigation_address": {
+ "name": "investigation_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_method": {
+ "name": "investigation_method",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_start_at": {
+ "name": "scheduled_start_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_end_at": {
+ "name": "scheduled_end_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "forecasted_at": {
+ "name": "forecasted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_result": {
+ "name": "evaluation_result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_notes": {
+ "name": "investigation_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "purchase_comment": {
+ "name": "purchase_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_investigations_vendor_id_vendors_id_fk": {
+ "name": "vendor_investigations_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_investigations_pq_submission_id_vendor_pq_submissions_id_fk": {
+ "name": "vendor_investigations_pq_submission_id_vendor_pq_submissions_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "vendor_pq_submissions",
+ "columnsFrom": [
+ "pq_submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "cascade"
+ },
+ "vendor_investigations_requester_id_users_id_fk": {
+ "name": "vendor_investigations_requester_id_users_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_investigations_qm_manager_id_users_id_fk": {
+ "name": "vendor_investigations_qm_manager_id_users_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "qm_manager_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_submissions": {
+ "name": "vendor_pq_submissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "pq_number": {
+ "name": "pq_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REQUESTED'"
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agreements": {
+ "name": "agreements",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "pq_items": {
+ "name": "pq_items",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejected_at": {
+ "name": "rejected_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reject_reason": {
+ "name": "reject_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_pq_submission": {
+ "name": "unique_pq_submission",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_pq_submissions_requester_id_users_id_fk": {
+ "name": "vendor_pq_submissions_requester_id_users_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_pq_submissions_vendor_id_vendors_id_fk": {
+ "name": "vendor_pq_submissions_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_submissions_project_id_projects_id_fk": {
+ "name": "vendor_pq_submissions_project_id_projects_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_pq_submissions_pq_number_unique": {
+ "name": "vendor_pq_submissions_pq_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pq_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_criteria_answers": {
+ "name": "vendor_pq_criteria_answers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "answer": {
+ "name": "answer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_comment": {
+ "name": "shi_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_reply": {
+ "name": "vendor_reply",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_pq_criteria_answers_vendor_id_vendors_id_fk": {
+ "name": "vendor_pq_criteria_answers_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_criteria_answers_criteria_id_pq_criterias_id_fk": {
+ "name": "vendor_pq_criteria_answers_criteria_id_pq_criterias_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "pq_criterias",
+ "columnsFrom": [
+ "criteria_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_criteria_answers_project_id_projects_id_fk": {
+ "name": "vendor_pq_criteria_answers_project_id_projects_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_review_logs": {
+ "name": "vendor_pq_review_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_pq_criteria_answer_id": {
+ "name": "vendor_pq_criteria_answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_name": {
+ "name": "reviewer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_pq_review_logs_vendor_pq_criteria_answer_id_vendor_pq_criteria_answers_id_fk": {
+ "name": "vendor_pq_review_logs_vendor_pq_criteria_answer_id_vendor_pq_criteria_answers_id_fk",
+ "tableFrom": "vendor_pq_review_logs",
+ "tableTo": "vendor_pq_criteria_answers",
+ "columnsFrom": [
+ "vendor_pq_criteria_answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_site_visit_info": {
+ "name": "vendor_site_visit_info",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "site_visit_request_id": {
+ "name": "site_visit_request_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_name": {
+ "name": "factory_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_location": {
+ "name": "factory_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_address": {
+ "name": "factory_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_name": {
+ "name": "factory_pic_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_phone": {
+ "name": "factory_pic_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_email": {
+ "name": "factory_pic_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_directions": {
+ "name": "factory_directions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_procedure": {
+ "name": "access_procedure",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachments": {
+ "name": "has_attachments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "other_info": {
+ "name": "other_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "submitted_by": {
+ "name": "submitted_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_site_visit_info_site_visit_request_id_site_visit_requests_id_fk": {
+ "name": "vendor_site_visit_info_site_visit_request_id_site_visit_requests_id_fk",
+ "tableFrom": "vendor_site_visit_info",
+ "tableTo": "site_visit_requests",
+ "columnsFrom": [
+ "site_visit_request_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_site_visit_info_submitted_by_users_id_fk": {
+ "name": "vendor_site_visit_info_submitted_by_users_id_fk",
+ "tableFrom": "vendor_site_visit_info",
+ "tableTo": "users",
+ "columnsFrom": [
+ "submitted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_projects": {
+ "name": "bidding_projects",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "proj_nm": {
+ "name": "proj_nm",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sector": {
+ "name": "sector",
+ "type": "char(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proj_msrm": {
+ "name": "proj_msrm",
+ "type": "numeric(3, 0)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kunnr": {
+ "name": "kunnr",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kunnr_nm": {
+ "name": "kunnr_nm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cls_1": {
+ "name": "cls_1",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cls1_nm": {
+ "name": "cls1_nm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ptype": {
+ "name": "ptype",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ptype_nm": {
+ "name": "ptype_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_cd": {
+ "name": "pmodel_cd",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_nm": {
+ "name": "pmodel_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_sz": {
+ "name": "pmodel_sz",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_uom": {
+ "name": "pmodel_uom",
+ "type": "char(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "txt04": {
+ "name": "txt04",
+ "type": "char(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "txt30": {
+ "name": "txt30",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "estm_pm": {
+ "name": "estm_pm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pjt_type": {
+ "name": "pjt_type",
+ "type": "varchar",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "bidding_projects_pspid_unique": {
+ "name": "bidding_projects_pspid_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pspid"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_series": {
+ "name": "project_series",
+ "schema": "",
+ "columns": {
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sers_no": {
+ "name": "sers_no",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sc_dt": {
+ "name": "sc_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kl_dt": {
+ "name": "kl_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "lc_dt": {
+ "name": "lc_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dl_dt": {
+ "name": "dl_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dock_no": {
+ "name": "dock_no",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dock_nm": {
+ "name": "dock_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proj_no": {
+ "name": "proj_no",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "post1": {
+ "name": "post1",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "project_sersNo_unique": {
+ "name": "project_sersNo_unique",
+ "columns": [
+ {
+ "expression": "pspid",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "sers_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_series_pspid_bidding_projects_pspid_fk": {
+ "name": "project_series_pspid_bidding_projects_pspid_fk",
+ "tableFrom": "project_series",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "pspid"
+ ],
+ "columnsTo": [
+ "pspid"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.projects": {
+ "name": "projects",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ship'"
+ },
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "projects_pspid_unique": {
+ "name": "projects_pspid_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pspid"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.cbe_evaluations": {
+ "name": "cbe_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluated_by": {
+ "name": "evaluated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluated_at": {
+ "name": "evaluated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "result": {
+ "name": "result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_cost": {
+ "name": "total_cost",
+ "type": "numeric(18, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_schedule": {
+ "name": "delivery_schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cbe_evaluations_rfq_id_rfqs_id_fk": {
+ "name": "cbe_evaluations_rfq_id_rfqs_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "cbe_evaluations_vendor_id_vendors_id_fk": {
+ "name": "cbe_evaluations_vendor_id_vendors_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "cbe_evaluations_evaluated_by_users_id_fk": {
+ "name": "cbe_evaluations_evaluated_by_users_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "evaluated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_attachments": {
+ "name": "rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_id": {
+ "name": "evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cbe_id": {
+ "name": "cbe_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_attachments_rfq_id_rfqs_id_fk": {
+ "name": "rfq_attachments_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_vendor_id_vendors_id_fk": {
+ "name": "rfq_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_evaluation_id_rfq_evaluations_id_fk": {
+ "name": "rfq_attachments_evaluation_id_rfq_evaluations_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfq_evaluations",
+ "columnsFrom": [
+ "evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_cbe_id_cbe_evaluations_id_fk": {
+ "name": "rfq_attachments_cbe_id_cbe_evaluations_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "cbe_evaluations",
+ "columnsFrom": [
+ "cbe_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_comment_id_rfq_comments_id_fk": {
+ "name": "rfq_attachments_comment_id_rfq_comments_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_comments": {
+ "name": "rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment_text": {
+ "name": "comment_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "commented_by": {
+ "name": "commented_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_id": {
+ "name": "evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cbe_id": {
+ "name": "cbe_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_comments_rfq_id_rfqs_id_fk": {
+ "name": "rfq_comments_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_vendor_id_vendors_id_fk": {
+ "name": "rfq_comments_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_commented_by_users_id_fk": {
+ "name": "rfq_comments_commented_by_users_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "commented_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_evaluation_id_rfq_evaluations_id_fk": {
+ "name": "rfq_comments_evaluation_id_rfq_evaluations_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "rfq_evaluations",
+ "columnsFrom": [
+ "evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_cbe_id_vendor_responses_id_fk": {
+ "name": "rfq_comments_cbe_id_vendor_responses_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "cbe_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_evaluations": {
+ "name": "rfq_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "eval_type": {
+ "name": "eval_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "result": {
+ "name": "result",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_evaluations_rfq_id_rfqs_id_fk": {
+ "name": "rfq_evaluations_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_evaluations",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_evaluations_vendor_id_vendors_id_fk": {
+ "name": "rfq_evaluations_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_evaluations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_items": {
+ "name": "rfq_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_items_rfq_id_rfqs_id_fk": {
+ "name": "rfq_items_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_items",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "rfq_items_item_code_items_item_code_fk": {
+ "name": "rfq_items_item_code_items_item_code_fk",
+ "tableFrom": "rfq_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfqs": {
+ "name": "rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_project_id": {
+ "name": "bid_project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PURCHASE'"
+ },
+ "parent_rfq_id": {
+ "name": "parent_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfqs_project_id_projects_id_fk": {
+ "name": "rfqs_project_id_projects_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_bid_project_id_bidding_projects_id_fk": {
+ "name": "rfqs_bid_project_id_bidding_projects_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "bid_project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_created_by_users_id_fk": {
+ "name": "rfqs_created_by_users_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_parent_rfq_id_rfqs_id_fk": {
+ "name": "rfqs_parent_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "parent_rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "rfqs_rfq_code_unique": {
+ "name": "rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_commercial_responses": {
+ "name": "vendor_commercial_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric(18, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_period": {
+ "name": "delivery_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "warranty_period": {
+ "name": "warranty_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validity_period": {
+ "name": "validity_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "price_breakdown": {
+ "name": "price_breakdown",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commercial_notes": {
+ "name": "commercial_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_commercial_responses_response_id_vendor_responses_id_fk": {
+ "name": "vendor_commercial_responses_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_commercial_responses",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_attachments": {
+ "name": "vendor_response_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "technical_response_id": {
+ "name": "technical_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commercial_response_id": {
+ "name": "commercial_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_attachments_response_id_vendor_responses_id_fk": {
+ "name": "vendor_response_attachments_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_technical_response_id_vendor_technical_responses_id_fk": {
+ "name": "vendor_response_attachments_technical_response_id_vendor_technical_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_technical_responses",
+ "columnsFrom": [
+ "technical_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_commercial_response_id_vendor_commercial_responses_id_fk": {
+ "name": "vendor_response_attachments_commercial_response_id_vendor_commercial_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_commercial_responses",
+ "columnsFrom": [
+ "commercial_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_responses": {
+ "name": "vendor_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REVIEWING'"
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_by": {
+ "name": "responded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "vendor_response_unique": {
+ "name": "vendor_response_unique",
+ "columns": [
+ {
+ "expression": "rfq_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_responses_rfq_id_rfqs_id_fk": {
+ "name": "vendor_responses_rfq_id_rfqs_id_fk",
+ "tableFrom": "vendor_responses",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_responses_vendor_id_vendors_id_fk": {
+ "name": "vendor_responses_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_responses",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_technical_responses": {
+ "name": "vendor_technical_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_technical_responses_response_id_vendor_responses_id_fk": {
+ "name": "vendor_technical_responses_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_technical_responses",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.departments": {
+ "name": "departments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "departments_department_code_unique": {
+ "name": "departments_department_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.login_attempts": {
+ "name": "login_attempts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "login_attempts_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "failure_reason": {
+ "name": "failure_reason",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attempted_at": {
+ "name": "attempted_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "login_attempts_email_idx": {
+ "name": "login_attempts_email_idx",
+ "columns": [
+ {
+ "expression": "email",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "login_attempts_attempted_at_idx": {
+ "name": "login_attempts_attempted_at_idx",
+ "columns": [
+ {
+ "expression": "attempted_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "login_attempts_ip_address_idx": {
+ "name": "login_attempts_ip_address_idx",
+ "columns": [
+ {
+ "expression": "ip_address",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "login_attempts_user_id_users_id_fk": {
+ "name": "login_attempts_user_id_users_id_fk",
+ "tableFrom": "login_attempts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mfa_tokens": {
+ "name": "mfa_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "mfa_tokens_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "phone_number": {
+ "name": "phone_number",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attempts": {
+ "name": "attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "mfa_tokens_user_id_idx": {
+ "name": "mfa_tokens_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "mfa_tokens_token_idx": {
+ "name": "mfa_tokens_token_idx",
+ "columns": [
+ {
+ "expression": "token",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "mfa_tokens_expires_at_idx": {
+ "name": "mfa_tokens_expires_at_idx",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "mfa_tokens_user_id_users_id_fk": {
+ "name": "mfa_tokens_user_id_users_id_fk",
+ "tableFrom": "mfa_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.otps": {
+ "name": "otps",
+ "schema": "",
+ "columns": {
+ "email": {
+ "name": "email",
+ "type": "varchar(256)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "otpToken": {
+ "name": "otpToken",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "otp_expires": {
+ "name": "otp_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.password_history": {
+ "name": "password_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "password_history_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "salt": {
+ "name": "salt",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "replaced_at": {
+ "name": "replaced_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "password_history_user_id_idx": {
+ "name": "password_history_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "password_history_created_at_idx": {
+ "name": "password_history_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "password_history_user_id_users_id_fk": {
+ "name": "password_history_user_id_users_id_fk",
+ "tableFrom": "password_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.passwords": {
+ "name": "passwords",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "passwords_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "salt": {
+ "name": "salt",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "strength": {
+ "name": "strength",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_uppercase": {
+ "name": "has_uppercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_lowercase": {
+ "name": "has_lowercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_numbers": {
+ "name": "has_numbers",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_symbols": {
+ "name": "has_symbols",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "length": {
+ "name": "length",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "passwords_user_id_idx": {
+ "name": "passwords_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "passwords_active_idx": {
+ "name": "passwords_active_idx",
+ "columns": [
+ {
+ "expression": "is_active",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "passwords_user_id_users_id_fk": {
+ "name": "passwords_user_id_users_id_fk",
+ "tableFrom": "passwords",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.permissions": {
+ "name": "permissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "permissions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_key": {
+ "name": "permission_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.role_permissions": {
+ "name": "role_permissions",
+ "schema": "",
+ "columns": {
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_id": {
+ "name": "permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "role_permissions_role_id_roles_id_fk": {
+ "name": "role_permissions_role_id_roles_id_fk",
+ "tableFrom": "role_permissions",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "role_permissions_permission_id_permissions_id_fk": {
+ "name": "role_permissions_permission_id_permissions_id_fk",
+ "tableFrom": "role_permissions",
+ "tableTo": "permissions",
+ "columnsFrom": [
+ "permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "roles_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "roles_company_id_vendors_id_fk": {
+ "name": "roles_company_id_vendors_id_fk",
+ "tableFrom": "roles",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security_settings": {
+ "name": "security_settings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "security_settings_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "min_password_length": {
+ "name": "min_password_length",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 8
+ },
+ "require_uppercase": {
+ "name": "require_uppercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_lowercase": {
+ "name": "require_lowercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_numbers": {
+ "name": "require_numbers",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_symbols": {
+ "name": "require_symbols",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "password_expiry_days": {
+ "name": "password_expiry_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 90
+ },
+ "password_history_count": {
+ "name": "password_history_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "max_failed_attempts": {
+ "name": "max_failed_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "lockout_duration_minutes": {
+ "name": "lockout_duration_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 30
+ },
+ "require_mfa_for_partners": {
+ "name": "require_mfa_for_partners",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "sms_token_expiry_minutes": {
+ "name": "sms_token_expiry_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "max_sms_attempts_per_day": {
+ "name": "max_sms_attempts_per_day",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 10
+ },
+ "session_timeout_minutes": {
+ "name": "session_timeout_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 480
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "epId": {
+ "name": "epId",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deptCode": {
+ "name": "deptCode",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deptName": {
+ "name": "deptName",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tech_company_id": {
+ "name": "tech_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'partners'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'en'"
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mfa_enabled": {
+ "name": "mfa_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "mfa_secret": {
+ "name": "mfa_secret",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_locked": {
+ "name": "is_locked",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "lockout_until": {
+ "name": "lockout_until",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "failed_login_attempts": {
+ "name": "failed_login_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_login_at": {
+ "name": "last_login_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password_change_required": {
+ "name": "password_change_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "deactivated_at": {
+ "name": "deactivated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deactivation_reason": {
+ "name": "deactivation_reason",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_consent_update": {
+ "name": "last_consent_update",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consent_version": {
+ "name": "consent_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requires_consent_update": {
+ "name": "requires_consent_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "users_email_idx": {
+ "name": "users_email_idx",
+ "columns": [
+ {
+ "expression": "email",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "users_phone_idx": {
+ "name": "users_phone_idx",
+ "columns": [
+ {
+ "expression": "phone",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "users_company_id_vendors_id_fk": {
+ "name": "users_company_id_vendors_id_fk",
+ "tableFrom": "users",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "users_tech_company_id_tech_vendors_id_fk": {
+ "name": "users_tech_company_id_tech_vendors_id_fk",
+ "tableFrom": "users",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "tech_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "users_email_unique": {
+ "name": "users_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.form_entries": {
+ "name": "form_entries",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "form_entries_contract_item_id_contract_items_id_fk": {
+ "name": "form_entries_contract_item_id_contract_items_id_fk",
+ "tableFrom": "form_entries",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.form_metas": {
+ "name": "form_metas",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "columns": {
+ "name": "columns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "form_metas_project_id_projects_id_fk": {
+ "name": "form_metas_project_id_projects_id_fk",
+ "tableFrom": "form_metas",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "form_code_project_unique": {
+ "name": "form_code_project_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "form_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.forms": {
+ "name": "forms",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "forms_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "eng": {
+ "name": "eng",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "im": {
+ "name": "im",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "contract_item_form_code_unique": {
+ "name": "contract_item_form_code_unique",
+ "columns": [
+ {
+ "expression": "contract_item_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "form_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "forms_contract_item_id_contract_items_id_fk": {
+ "name": "forms_contract_item_id_contract_items_id_fk",
+ "tableFrom": "forms",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_class_attributes": {
+ "name": "tag_class_attributes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tag_class_attributes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_class_id": {
+ "name": "tag_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "att_id": {
+ "name": "att_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "def_val": {
+ "name": "def_val",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uom_id": {
+ "name": "uom_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "seq": {
+ "name": "seq",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "tag_class_attributes_seq_idx": {
+ "name": "tag_class_attributes_seq_idx",
+ "columns": [
+ {
+ "expression": "seq",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "tag_class_attributes_tag_class_id_tag_classes_id_fk": {
+ "name": "tag_class_attributes_tag_class_id_tag_classes_id_fk",
+ "tableFrom": "tag_class_attributes",
+ "tableTo": "tag_classes",
+ "columnsFrom": [
+ "tag_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_att_id_in_tag_class": {
+ "name": "uniq_att_id_in_tag_class",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_class_id",
+ "att_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_classes": {
+ "name": "tag_classes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tag_classes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subclasses": {
+ "name": "subclasses",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'[]'::json"
+ },
+ "subclass_remark": {
+ "name": "subclass_remark",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{}'::json"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_classes_project_id_projects_id_fk": {
+ "name": "tag_classes_project_id_projects_id_fk",
+ "tableFrom": "tag_classes",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tag_classes_tag_type_code_project_id_tag_types_code_project_id_fk": {
+ "name": "tag_classes_tag_type_code_project_id_tag_types_code_project_id_fk",
+ "tableFrom": "tag_classes",
+ "tableTo": "tag_types",
+ "columnsFrom": [
+ "tag_type_code",
+ "project_id"
+ ],
+ "columnsTo": [
+ "code",
+ "project_id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_code_in_project": {
+ "name": "uniq_code_in_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_subfield_options": {
+ "name": "tag_subfield_options",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_subfield_options_project_id_projects_id_fk": {
+ "name": "tag_subfield_options_project_id_projects_id_fk",
+ "tableFrom": "tag_subfield_options",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_attribute_project_code": {
+ "name": "uniq_attribute_project_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "attributes_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_subfields": {
+ "name": "tag_subfields",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_description": {
+ "name": "attributes_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expression": {
+ "name": "expression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delimiter": {
+ "name": "delimiter",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_subfields_project_id_projects_id_fk": {
+ "name": "tag_subfields_project_id_projects_id_fk",
+ "tableFrom": "tag_subfields",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_tag_type_attribute": {
+ "name": "uniq_tag_type_attribute",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "tag_type_code",
+ "attributes_id"
+ ]
+ },
+ "uniq_attribute_id_project": {
+ "name": "uniq_attribute_id_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "attributes_id",
+ "project_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_type_class_form_mappings": {
+ "name": "tag_type_class_form_mappings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_label": {
+ "name": "tag_type_label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "class_label": {
+ "name": "class_label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ep": {
+ "name": "ep",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_mapping_in_project": {
+ "name": "uniq_mapping_in_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "tag_type_label",
+ "class_label",
+ "form_code",
+ "remark"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_types": {
+ "name": "tag_types",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_types_project_id_projects_id_fk": {
+ "name": "tag_types_project_id_projects_id_fk",
+ "tableFrom": "tag_types",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tag_types_code_project_id_pk": {
+ "name": "tag_types_code_project_id_pk",
+ "columns": [
+ "code",
+ "project_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tags": {
+ "name": "tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tags_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_id": {
+ "name": "form_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_idx": {
+ "name": "tag_idx",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_no": {
+ "name": "tag_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type": {
+ "name": "tag_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "class": {
+ "name": "class",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_class_id": {
+ "name": "tag_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tags_contract_item_id_contract_items_id_fk": {
+ "name": "tags_contract_item_id_contract_items_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tags_form_id_forms_id_fk": {
+ "name": "tags_form_id_forms_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "forms",
+ "columnsFrom": [
+ "form_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tags_tag_class_id_tag_classes_id_fk": {
+ "name": "tags_tag_class_id_tag_classes_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "tag_classes",
+ "columnsFrom": [
+ "tag_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contract_item_tag_idx_unique": {
+ "name": "contract_item_tag_idx_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_item_id",
+ "tag_idx"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_items": {
+ "name": "template_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "form_mapping_id": {
+ "name": "form_mapping_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tmpl_id": {
+ "name": "tmpl_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tmpl_type": {
+ "name": "tmpl_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "spr_lst_setup": {
+ "name": "spr_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "grd_lst_setup": {
+ "name": "grd_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "spr_itm_lst_setup": {
+ "name": "spr_itm_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_items_form_mapping_id_tag_type_class_form_mappings_id_fk": {
+ "name": "template_items_form_mapping_id_tag_type_class_form_mappings_id_fk",
+ "tableFrom": "template_items",
+ "tableTo": "tag_type_class_form_mappings",
+ "columnsFrom": [
+ "form_mapping_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_tmpl_in_form_mapping": {
+ "name": "uniq_tmpl_in_form_mapping",
+ "nullsNotDistinct": false,
+ "columns": [
+ "form_mapping_id",
+ "tmpl_id"
+ ]
+ },
+ "uniq_name_in_form_mapping": {
+ "name": "uniq_name_in_form_mapping",
+ "nullsNotDistinct": false,
+ "columns": [
+ "form_mapping_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_data_report_temps": {
+ "name": "vendor_data_report_temps",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_id": {
+ "name": "form_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_data_report_temps_contract_item_id_contract_items_id_fk": {
+ "name": "vendor_data_report_temps_contract_item_id_contract_items_id_fk",
+ "tableFrom": "vendor_data_report_temps",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_data_report_temps_form_id_forms_id_fk": {
+ "name": "vendor_data_report_temps_form_id_forms_id_fk",
+ "tableFrom": "vendor_data_report_temps",
+ "tableTo": "forms",
+ "columnsFrom": [
+ "form_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.change_logs": {
+ "name": "change_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_id": {
+ "name": "entity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "changed_fields": {
+ "name": "changed_fields",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "old_values": {
+ "name": "old_values",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_values": {
+ "name": "new_values",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_name": {
+ "name": "user_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_synced": {
+ "name": "is_synced",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "sync_attempts": {
+ "name": "sync_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "last_sync_error": {
+ "name": "last_sync_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "synced_at": {
+ "name": "synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_systems": {
+ "name": "target_systems",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'[]'::jsonb"
+ }
+ },
+ "indexes": {
+ "idx_change_logs_vendor_synced": {
+ "name": "idx_change_logs_vendor_synced",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_synced",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_created_at": {
+ "name": "idx_change_logs_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_entity": {
+ "name": "idx_change_logs_entity",
+ "columns": [
+ {
+ "expression": "entity_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "entity_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_sync_attempts": {
+ "name": "idx_change_logs_sync_attempts",
+ "columns": [
+ {
+ "expression": "sync_attempts",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_attachments": {
+ "name": "document_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "document_attachments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upload_id": {
+ "name": "upload_id",
+ "type": "varchar(36)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "varchar(36)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dolce_file_path": {
+ "name": "dolce_file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_attachments_revision_id_revisions_id_fk": {
+ "name": "document_attachments_revision_id_revisions_id_fk",
+ "tableFrom": "document_attachments",
+ "tableTo": "revisions",
+ "columnsFrom": [
+ "revision_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.documents": {
+ "name": "documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "documents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_move_gbn": {
+ "name": "drawing_move_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discipline": {
+ "name": "discipline",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_document_id": {
+ "name": "external_document_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_system_type": {
+ "name": "external_system_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_synced_at": {
+ "name": "external_synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_drawing_no": {
+ "name": "shi_drawing_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager": {
+ "name": "manager",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_enm": {
+ "name": "manager_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_no": {
+ "name": "manager_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group": {
+ "name": "register_group",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group_id": {
+ "name": "register_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_no": {
+ "name": "create_user_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_id": {
+ "name": "create_user_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_enm": {
+ "name": "create_user_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_contract_doc_status": {
+ "name": "unique_contract_doc_status",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_contract_vendor_doc": {
+ "name": "unique_contract_vendor_doc",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"vendor_doc_number\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_external_doc": {
+ "name": "unique_external_doc",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_system_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"external_document_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_project_doc_status": {
+ "name": "unique_project_doc_status",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_external_doc_project": {
+ "name": "unique_external_doc_project",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_system_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"external_document_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "drawing_kind_idx": {
+ "name": "drawing_kind_idx",
+ "columns": [
+ {
+ "expression": "drawing_kind",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "documents_project_id_projects_id_fk": {
+ "name": "documents_project_id_projects_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "documents_contract_id_contracts_id_fk": {
+ "name": "documents_contract_id_contracts_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "documents_vendor_id_vendors_id_fk": {
+ "name": "documents_vendor_id_vendors_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_stages": {
+ "name": "issue_stages",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "issue_stages_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_name": {
+ "name": "stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "plan_date": {
+ "name": "plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actual_date": {
+ "name": "actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stage_status": {
+ "name": "stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "stage_order": {
+ "name": "stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'MEDIUM'"
+ },
+ "assignee_id": {
+ "name": "assignee_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assignee_name": {
+ "name": "assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reminder_days": {
+ "name": "reminder_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_document_stage": {
+ "name": "unique_document_stage",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "document_stage_order": {
+ "name": "document_stage_order",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_order",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_stages_document_id_documents_id_fk": {
+ "name": "issue_stages_document_id_documents_id_fk",
+ "tableFrom": "issue_stages",
+ "tableTo": "documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.revisions": {
+ "name": "revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "revisions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "issue_stage_id": {
+ "name": "issue_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "uploader_type": {
+ "name": "uploader_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'vendor'"
+ },
+ "uploader_id": {
+ "name": "uploader_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploader_name": {
+ "name": "uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage": {
+ "name": "usage",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_type": {
+ "name": "usage_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_status": {
+ "name": "revision_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'SUBMITTED'"
+ },
+ "submitted_date": {
+ "name": "submitted_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_start_date": {
+ "name": "review_start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_date": {
+ "name": "approved_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejected_date": {
+ "name": "rejected_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_id": {
+ "name": "reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_name": {
+ "name": "reviewer_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_upload_id": {
+ "name": "external_upload_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "register_id": {
+ "name": "register_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "unique_stage_revision_usage": {
+ "name": "unique_stage_revision_usage",
+ "columns": [
+ {
+ "expression": "issue_stage_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "usage",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "COALESCE(\"usage_type\", '')",
+ "asc": true,
+ "isExpression": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.stage_documents": {
+ "name": "stage_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "stage_documents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_project_doc": {
+ "name": "unique_project_doc",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_project_vendor_doc": {
+ "name": "unique_project_vendor_doc",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"stage_documents\".\"vendor_doc_number\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_doc_vendor_id_idx": {
+ "name": "stage_doc_vendor_id_idx",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_doc_status_idx": {
+ "name": "stage_doc_status_idx",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "stage_documents_project_id_projects_id_fk": {
+ "name": "stage_documents_project_id_projects_id_fk",
+ "tableFrom": "stage_documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.stage_issue_stages": {
+ "name": "stage_issue_stages",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "stage_issue_stages_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_name": {
+ "name": "stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "plan_date": {
+ "name": "plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actual_date": {
+ "name": "actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stage_status": {
+ "name": "stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "stage_order": {
+ "name": "stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'MEDIUM'"
+ },
+ "assignee_id": {
+ "name": "assignee_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assignee_name": {
+ "name": "assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reminder_days": {
+ "name": "reminder_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_stage_document_stage": {
+ "name": "unique_stage_document_stage",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_document_stage_order": {
+ "name": "stage_document_stage_order",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_order",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "stage_issue_stages_document_id_stage_documents_id_fk": {
+ "name": "stage_issue_stages_document_id_stage_documents_id_fk",
+ "tableFrom": "stage_issue_stages",
+ "tableTo": "stage_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_batches": {
+ "name": "sync_batches",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "batch_size": {
+ "name": "batch_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "retry_count": {
+ "name": "retry_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "change_log_ids": {
+ "name": "change_log_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "success_count": {
+ "name": "success_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "failure_count": {
+ "name": "failure_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_metadata": {
+ "name": "sync_metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_sync_batches_project_system": {
+ "name": "idx_sync_batches_project_system",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_system",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sync_batches_status": {
+ "name": "idx_sync_batches_status",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sync_batches_created_at": {
+ "name": "idx_sync_batches_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_configs": {
+ "name": "sync_configs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_enabled": {
+ "name": "sync_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "sync_interval_minutes": {
+ "name": "sync_interval_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 30
+ },
+ "last_successful_sync": {
+ "name": "last_successful_sync",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_sync_attempt": {
+ "name": "last_sync_attempt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpoint_url": {
+ "name": "endpoint_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_token": {
+ "name": "auth_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_version": {
+ "name": "api_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'v1'"
+ },
+ "max_batch_size": {
+ "name": "max_batch_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 100
+ },
+ "retry_max_attempts": {
+ "name": "retry_max_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_sync_configs_contract_system": {
+ "name": "idx_sync_configs_contract_system",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_system",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_attachments": {
+ "name": "vendor_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'GENERAL'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_attachments_vendor_id_vendors_id_fk": {
+ "name": "vendor_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_candidates": {
+ "name": "vendor_candidates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'COLLECTED'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_candidates_vendor_id_vendors_id_fk": {
+ "name": "vendor_candidates_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_candidates",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_contacts": {
+ "name": "vendor_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_position": {
+ "name": "contact_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_department": {
+ "name": "contact_department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_task": {
+ "name": "contact_task",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_primary": {
+ "name": "is_primary",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_contacts_vendor_id_vendors_id_fk": {
+ "name": "vendor_contacts_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_contacts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_possible_items": {
+ "name": "vendor_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_possible_items_vendor_id_vendors_id_fk": {
+ "name": "vendor_possible_items_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_possible_items",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_possible_items_item_code_items_item_code_fk": {
+ "name": "vendor_possible_items_item_code_items_item_code_fk",
+ "tableFrom": "vendor_possible_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_possible_materials": {
+ "name": "vendor_possible_materials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_possible_materials_vendor_id_vendors_id_fk": {
+ "name": "vendor_possible_materials_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_possible_materials",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_possible_materials_item_code_materials_item_code_fk": {
+ "name": "vendor_possible_materials_item_code_materials_item_code_fk",
+ "tableFrom": "vendor_possible_materials",
+ "tableTo": "materials",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_types": {
+ "name": "vendor_types",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_ko": {
+ "name": "name_ko",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_en": {
+ "name": "name_en",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_types_code_unique": {
+ "name": "vendor_types_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendors": {
+ "name": "vendors",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "vendor_type_id": {
+ "name": "vendor_type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_work_expirence": {
+ "name": "representative_work_expirence",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "corporate_registration_number": {
+ "name": "corporate_registration_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_agency": {
+ "name": "credit_agency",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_rating": {
+ "name": "credit_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cash_flow_rating": {
+ "name": "cash_flow_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "business_size": {
+ "name": "business_size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendors_vendor_type_id_vendor_types_id_fk": {
+ "name": "vendors_vendor_type_id_vendor_types_id_fk",
+ "tableFrom": "vendors",
+ "tableTo": "vendor_types",
+ "columnsFrom": [
+ "vendor_type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tasks": {
+ "name": "tasks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(30)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'todo'"
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bug'"
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'low'"
+ },
+ "archived": {
+ "name": "archived",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "current_timestamp"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "tasks_code_unique": {
+ "name": "tasks_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_candidate_logs": {
+ "name": "vendor_candidate_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_candidate_id": {
+ "name": "vendor_candidate_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_candidate_logs_vendor_candidate_id_vendor_candidates_id_fk": {
+ "name": "vendor_candidate_logs_vendor_candidate_id_vendor_candidates_id_fk",
+ "tableFrom": "vendor_candidate_logs",
+ "tableTo": "vendor_candidates",
+ "columnsFrom": [
+ "vendor_candidate_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_candidate_logs_user_id_users_id_fk": {
+ "name": "vendor_candidate_logs_user_id_users_id_fk",
+ "tableFrom": "vendor_candidate_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendors_logs": {
+ "name": "vendors_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendors_logs_vendor_id_vendors_id_fk": {
+ "name": "vendors_logs_vendor_id_vendors_id_fk",
+ "tableFrom": "vendors_logs",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendors_logs_user_id_users_id_fk": {
+ "name": "vendors_logs_user_id_users_id_fk",
+ "tableFrom": "vendors_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.basic_contract": {
+ "name": "basic_contract",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "basic_contract_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_by": {
+ "name": "requested_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "basic_contract_template_id_basic_contract_templates_id_fk": {
+ "name": "basic_contract_template_id_basic_contract_templates_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "basic_contract_templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_vendor_id_vendors_id_fk": {
+ "name": "basic_contract_vendor_id_vendors_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_requested_by_users_id_fk": {
+ "name": "basic_contract_requested_by_users_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requested_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.basic_contract_templates": {
+ "name": "basic_contract_templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "basic_contract_templates_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "template_name": {
+ "name": "template_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validity_period": {
+ "name": "validity_period",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_review_required": {
+ "name": "legal_review_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "shipbuilding_applicable": {
+ "name": "shipbuilding_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "wind_applicable": {
+ "name": "wind_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "pc_applicable": {
+ "name": "pc_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "nb_applicable": {
+ "name": "nb_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "rc_applicable": {
+ "name": "rc_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "gy_applicable": {
+ "name": "gy_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sys_applicable": {
+ "name": "sys_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "infra_applicable": {
+ "name": "infra_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disposed_at": {
+ "name": "disposed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restored_at": {
+ "name": "restored_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "basic_contract_templates_created_by_users_id_fk": {
+ "name": "basic_contract_templates_created_by_users_id_fk",
+ "tableFrom": "basic_contract_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_templates_updated_by_users_id_fk": {
+ "name": "basic_contract_templates_updated_by_users_id_fk",
+ "tableFrom": "basic_contract_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "template_name_revision_unique": {
+ "name": "template_name_revision_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "template_name",
+ "revision"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.incoterms": {
+ "name": "incoterms",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(20)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.payment_terms": {
+ "name": "payment_terms",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.place_of_shipping": {
+ "name": "place_of_shipping",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(20)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_items": {
+ "name": "pr_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_item": {
+ "name": "rfq_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item": {
+ "name": "pr_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_no": {
+ "name": "pr_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_category": {
+ "name": "material_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "acc": {
+ "name": "acc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "size": {
+ "name": "size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gross_weight": {
+ "name": "gross_weight",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "gw_uom": {
+ "name": "gw_uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_no": {
+ "name": "spec_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_url": {
+ "name": "spec_url",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tracking_no": {
+ "name": "tracking_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_yn": {
+ "name": "major_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "project_def": {
+ "name": "project_def",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_sc": {
+ "name": "project_sc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_kl": {
+ "name": "project_kl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_lc": {
+ "name": "project_lc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_dl": {
+ "name": "project_dl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_items_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "pr_items_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "pr_items",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_attachments": {
+ "name": "procurement_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "procurement_rfq_details_id": {
+ "name": "procurement_rfq_details_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_attachments_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "procurement_attachments_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_attachments_procurement_rfq_details_id_procurement_rfq_details_id_fk": {
+ "name": "procurement_attachments_procurement_rfq_details_id_procurement_rfq_details_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "procurement_rfq_details",
+ "columnsFrom": [
+ "procurement_rfq_details_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_attachments_created_by_users_id_fk": {
+ "name": "procurement_attachments_created_by_users_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "attachment_type_check": {
+ "name": "attachment_type_check",
+ "value": "\"procurement_attachments\".\"procurement_rfqs_id\" IS NOT NULL OR \"procurement_attachments\".\"procurement_rfq_details_id\" IS NOT NULL"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.procurement_quotation_items": {
+ "name": "procurement_quotation_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_price": {
+ "name": "unit_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "vendor_material_code": {
+ "name": "vendor_material_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_material_description": {
+ "name": "vendor_material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "lead_time_in_days": {
+ "name": "lead_time_in_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_rate": {
+ "name": "tax_rate",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_amount": {
+ "name": "tax_amount",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount_rate": {
+ "name": "discount_rate",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount_amount": {
+ "name": "discount_amount",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_alternative": {
+ "name": "is_alternative",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_recommended": {
+ "name": "is_recommended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_quotation_items_quotation_id_procurement_vendor_quotations_id_fk": {
+ "name": "procurement_quotation_items_quotation_id_procurement_vendor_quotations_id_fk",
+ "tableFrom": "procurement_quotation_items",
+ "tableTo": "procurement_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_quotation_items_pr_item_id_pr_items_id_fk": {
+ "name": "procurement_quotation_items_pr_item_id_pr_items_id_fk",
+ "tableFrom": "procurement_quotation_items",
+ "tableTo": "pr_items",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_attachments": {
+ "name": "procurement_rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_attachments_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_attachments_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_comment_id_procurement_rfq_comments_id_fk": {
+ "name": "procurement_rfq_attachments_comment_id_procurement_rfq_comments_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_quotation_id_procurement_vendor_quotations_id_fk": {
+ "name": "procurement_rfq_attachments_quotation_id_procurement_vendor_quotations_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_uploaded_by_users_id_fk": {
+ "name": "procurement_rfq_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_vendor_id_vendors_id_fk": {
+ "name": "procurement_rfq_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_comments": {
+ "name": "procurement_rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_comment": {
+ "name": "is_vendor_comment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_comments_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_comments_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_vendor_id_vendors_id_fk": {
+ "name": "procurement_rfq_comments_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_user_id_users_id_fk": {
+ "name": "procurement_rfq_comments_user_id_users_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_parent_comment_id_procurement_rfq_comments_id_fk": {
+ "name": "procurement_rfq_comments_parent_comment_id_procurement_rfq_comments_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "procurement_rfq_comments",
+ "columnsFrom": [
+ "parent_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_details": {
+ "name": "procurement_rfq_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendors_id": {
+ "name": "vendors_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_detail": {
+ "name": "incoterms_detail",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'VV'"
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_details_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_details_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_vendors_id_vendors_id_fk": {
+ "name": "procurement_rfq_details_vendors_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendors_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_payment_terms_code_payment_terms_code_fk": {
+ "name": "procurement_rfq_details_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_incoterms_code_incoterms_code_fk": {
+ "name": "procurement_rfq_details_incoterms_code_incoterms_code_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_updated_by_users_id_fk": {
+ "name": "procurement_rfq_details_updated_by_users_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfqs": {
+ "name": "procurement_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "series": {
+ "name": "series",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_send_date": {
+ "name": "rfq_send_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'RFQ Created'"
+ },
+ "rfq_sealed_yn": {
+ "name": "rfq_sealed_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sent_by": {
+ "name": "sent_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfqs_sent_by_users_id_fk": {
+ "name": "procurement_rfqs_sent_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "sent_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfqs_created_by_users_id_fk": {
+ "name": "procurement_rfqs_created_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfqs_updated_by_users_id_fk": {
+ "name": "procurement_rfqs_updated_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "procurement_rfqs_rfq_code_unique": {
+ "name": "procurement_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_vendor_quotations": {
+ "name": "procurement_vendor_quotations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quotation_code": {
+ "name": "quotation_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_version": {
+ "name": "quotation_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "total_items_count": {
+ "name": "total_items_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sub_total": {
+ "name": "sub_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "tax_total": {
+ "name": "tax_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "discount_total": {
+ "name": "discount_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "valid_until": {
+ "name": "valid_until",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "estimated_delivery_date": {
+ "name": "estimated_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_detail": {
+ "name": "incoterms_detail",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Draft'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejection_reason": {
+ "name": "rejection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accepted_at": {
+ "name": "accepted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_vendor_quotations_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_vendor_quotations_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_vendor_id_vendors_id_fk": {
+ "name": "procurement_vendor_quotations_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_payment_terms_code_payment_terms_code_fk": {
+ "name": "procurement_vendor_quotations_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_incoterms_code_incoterms_code_fk": {
+ "name": "procurement_vendor_quotations_incoterms_code_incoterms_code_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preset_shares": {
+ "name": "preset_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "preset_id": {
+ "name": "preset_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "shared_with_user_id": {
+ "name": "shared_with_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission": {
+ "name": "permission",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preset_shares_preset_id_table_presets_id_fk": {
+ "name": "preset_shares_preset_id_table_presets_id_fk",
+ "tableFrom": "preset_shares",
+ "tableTo": "table_presets",
+ "columnsFrom": [
+ "preset_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.table_presets": {
+ "name": "table_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "table_id": {
+ "name": "table_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "settings": {
+ "name": "settings",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_shared": {
+ "name": "is_shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_attachments": {
+ "name": "tech_sales_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tech_sales_rfq_id": {
+ "name": "tech_sales_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_attachments_tech_sales_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_attachments_tech_sales_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_attachments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "tech_sales_rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_attachments_created_by_users_id_fk": {
+ "name": "tech_sales_attachments_created_by_users_id_fk",
+ "tableFrom": "tech_sales_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_contact_possible_items": {
+ "name": "tech_sales_contact_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "contact_id": {
+ "name": "contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_possible_item_id": {
+ "name": "vendor_possible_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_contact_possible_items_contact_id_tech_vendor_contacts_id_fk": {
+ "name": "tech_sales_contact_possible_items_contact_id_tech_vendor_contacts_id_fk",
+ "tableFrom": "tech_sales_contact_possible_items",
+ "tableTo": "tech_vendor_contacts",
+ "columnsFrom": [
+ "contact_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_contact_possible_items_vendor_possible_item_id_tech_vendor_possible_items_id_fk": {
+ "name": "tech_sales_contact_possible_items_vendor_possible_item_id_tech_vendor_possible_items_id_fk",
+ "tableFrom": "tech_sales_contact_possible_items",
+ "tableTo": "tech_vendor_possible_items",
+ "columnsFrom": [
+ "vendor_possible_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_comment_attachments": {
+ "name": "tech_sales_rfq_comment_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_comment_attachments_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_comment_id_tech_sales_rfq_comments_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_comment_id_tech_sales_rfq_comments_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_uploaded_by_users_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_comments": {
+ "name": "tech_sales_rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_comment": {
+ "name": "is_vendor_comment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_comments_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_comments_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_rfq_comments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_user_id_users_id_fk": {
+ "name": "tech_sales_rfq_comments_user_id_users_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_parent_comment_id_tech_sales_rfq_comments_id_fk": {
+ "name": "tech_sales_rfq_comments_parent_comment_id_tech_sales_rfq_comments_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_sales_rfq_comments",
+ "columnsFrom": [
+ "parent_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_items": {
+ "name": "tech_sales_rfq_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_shipbuilding_id": {
+ "name": "item_shipbuilding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_offshore_top_id": {
+ "name": "item_offshore_top_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_offshore_hull_id": {
+ "name": "item_offshore_hull_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_type": {
+ "name": "item_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_items_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_items_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_shipbuilding_id_item_shipbuilding_id_fk": {
+ "name": "tech_sales_rfq_items_item_shipbuilding_id_item_shipbuilding_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_shipbuilding",
+ "columnsFrom": [
+ "item_shipbuilding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_offshore_top_id_item_offshore_top_id_fk": {
+ "name": "tech_sales_rfq_items_item_offshore_top_id_item_offshore_top_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_offshore_top",
+ "columnsFrom": [
+ "item_offshore_top_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_offshore_hull_id_item_offshore_hull_id_fk": {
+ "name": "tech_sales_rfq_items_item_offshore_hull_id_item_offshore_hull_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_offshore_hull",
+ "columnsFrom": [
+ "item_offshore_hull_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfqs": {
+ "name": "tech_sales_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_project_id": {
+ "name": "bidding_project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_send_date": {
+ "name": "rfq_send_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'RFQ Created'"
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sent_by": {
+ "name": "sent_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'SHIP'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfqs_bidding_project_id_bidding_projects_id_fk": {
+ "name": "tech_sales_rfqs_bidding_project_id_bidding_projects_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "bidding_project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_sent_by_users_id_fk": {
+ "name": "tech_sales_rfqs_sent_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "sent_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_created_by_users_id_fk": {
+ "name": "tech_sales_rfqs_created_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_updated_by_users_id_fk": {
+ "name": "tech_sales_rfqs_updated_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "tech_sales_rfqs_rfq_code_unique": {
+ "name": "tech_sales_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_attachments": {
+ "name": "tech_sales_vendor_quotation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_vendor_quotation_attachments_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotation_attachments_uploaded_by_users_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotation_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_contacts": {
+ "name": "tech_sales_vendor_quotation_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_id": {
+ "name": "contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_revisions": {
+ "name": "tech_sales_vendor_quotation_revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "snapshot": {
+ "name": "snapshot",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_note": {
+ "name": "revision_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revised_by": {
+ "name": "revised_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revised_at": {
+ "name": "revised_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "tech_sales_quotation_revisions_quotation_version_idx": {
+ "name": "tech_sales_quotation_revisions_quotation_version_idx",
+ "columns": [
+ {
+ "expression": "quotation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "tech_sales_vendor_quotation_revisions_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_vendor_quotation_revisions_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_revisions",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotations": {
+ "name": "tech_sales_vendor_quotations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quotation_code": {
+ "name": "quotation_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_version": {
+ "name": "quotation_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_until": {
+ "name": "valid_until",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_flags": {
+ "name": "vendor_flags",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Assigned'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejection_reason": {
+ "name": "rejection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accepted_at": {
+ "name": "accepted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_vendor_quotations_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_vendor_quotations_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_vendor_quotations",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotations_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_vendor_quotations_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_vendor_quotations",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_rotation_attempts": {
+ "name": "ocr_rotation_attempts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rotation": {
+ "name": "rotation",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "confidence": {
+ "name": "confidence",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tables_found": {
+ "name": "tables_found",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "text_quality": {
+ "name": "text_quality",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "keyword_count": {
+ "name": "keyword_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "extracted_rows_count": {
+ "name": "extracted_rows_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ocr_rotation_attempts_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_rotation_attempts_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_rotation_attempts",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_rows": {
+ "name": "ocr_rows",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "table_id": {
+ "name": "table_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "row_index": {
+ "name": "row_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "report_no": {
+ "name": "report_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "inspection_date": {
+ "name": "inspection_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "no": {
+ "name": "no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identification_no": {
+ "name": "identification_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_no": {
+ "name": "tag_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joint_no": {
+ "name": "joint_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joint_type": {
+ "name": "joint_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "welding_date": {
+ "name": "welding_date",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confidence": {
+ "name": "confidence",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source_table": {
+ "name": "source_table",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source_row": {
+ "name": "source_row",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_ocr_report_no_unique": {
+ "name": "idx_ocr_report_no_unique",
+ "columns": [
+ {
+ "expression": "report_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "tag_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "joint_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "joint_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ocr_rows_table_id_ocr_tables_id_fk": {
+ "name": "ocr_rows_table_id_ocr_tables_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "ocr_tables",
+ "columnsFrom": [
+ "table_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ocr_rows_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_rows_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ocr_rows_user_id_users_id_fk": {
+ "name": "ocr_rows_user_id_users_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_sessions": {
+ "name": "ocr_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "processing_time": {
+ "name": "processing_time",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "best_rotation": {
+ "name": "best_rotation",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_tables": {
+ "name": "total_tables",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_rows": {
+ "name": "total_rows",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "image_enhanced": {
+ "name": "image_enhanced",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "pdf_converted": {
+ "name": "pdf_converted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "warnings": {
+ "name": "warnings",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_tables": {
+ "name": "ocr_tables",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "table_index": {
+ "name": "table_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "row_count": {
+ "name": "row_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ocr_tables_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_tables_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_tables",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfq_attachment_revisions": {
+ "name": "b_rfq_attachment_revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_no": {
+ "name": "revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_comment": {
+ "name": "revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest": {
+ "name": "is_latest",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "latest_revision_idx": {
+ "name": "latest_revision_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_latest",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"b_rfq_attachment_revisions\".\"is_latest\" = $1",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "attachment_revision_idx": {
+ "name": "attachment_revision_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "b_rfq_attachment_revisions_attachment_id_b_rfq_attachments_id_fk": {
+ "name": "b_rfq_attachment_revisions_attachment_id_b_rfq_attachments_id_fk",
+ "tableFrom": "b_rfq_attachment_revisions",
+ "tableTo": "b_rfq_attachments",
+ "columnsFrom": [
+ "attachment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "b_rfq_attachment_revisions_created_by_users_id_fk": {
+ "name": "b_rfq_attachment_revisions_created_by_users_id_fk",
+ "tableFrom": "b_rfq_attachment_revisions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfqs": {
+ "name": "b_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "b_rfqs_project_id_projects_id_fk": {
+ "name": "b_rfqs_project_id_projects_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "b_rfqs_created_by_users_id_fk": {
+ "name": "b_rfqs_created_by_users_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "b_rfqs_updated_by_users_id_fk": {
+ "name": "b_rfqs_updated_by_users_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "b_rfqs_rfq_code_unique": {
+ "name": "b_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfq_attachments": {
+ "name": "b_rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Rev.0'"
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "b_rfq_attachments_rfq_id_b_rfqs_id_fk": {
+ "name": "b_rfq_attachments_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "b_rfq_attachments",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "b_rfq_attachments_created_by_users_id_fk": {
+ "name": "b_rfq_attachments_created_by_users_id_fk",
+ "tableFrom": "b_rfq_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.final_rfq": {
+ "name": "final_rfq",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "final_rfq_status": {
+ "name": "final_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'VV'"
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "firsttime_yn": {
+ "name": "firsttime_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_remark": {
+ "name": "vendor_remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "final_rfq_rfq_id_b_rfqs_id_fk": {
+ "name": "final_rfq_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "final_rfq_vendor_id_vendors_id_fk": {
+ "name": "final_rfq_vendor_id_vendors_id_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "final_rfq_incoterms_code_incoterms_code_fk": {
+ "name": "final_rfq_incoterms_code_incoterms_code_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "final_rfq_payment_terms_code_payment_terms_code_fk": {
+ "name": "final_rfq_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.initial_rfq": {
+ "name": "initial_rfq",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "initial_rfq_status": {
+ "name": "initial_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "rfq_revision": {
+ "name": "rfq_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "initial_rfq_rfq_id_b_rfqs_id_fk": {
+ "name": "initial_rfq_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "initial_rfq_vendor_id_vendors_id_fk": {
+ "name": "initial_rfq_vendor_id_vendors_id_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "initial_rfq_incoterms_code_incoterms_code_fk": {
+ "name": "initial_rfq_incoterms_code_incoterms_code_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_attachment_responses": {
+ "name": "vendor_attachment_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'NOT_RESPONDED'"
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'Rev.0'"
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "vendor_response_idx": {
+ "name": "vendor_response_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "rfq_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_attachment_responses_attachment_id_b_rfq_attachments_id_fk": {
+ "name": "vendor_attachment_responses_attachment_id_b_rfq_attachments_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "b_rfq_attachments",
+ "columnsFrom": [
+ "attachment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_vendor_id_vendors_id_fk": {
+ "name": "vendor_attachment_responses_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_created_by_users_id_fk": {
+ "name": "vendor_attachment_responses_created_by_users_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_updated_by_users_id_fk": {
+ "name": "vendor_attachment_responses_updated_by_users_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_attachments_b": {
+ "name": "vendor_response_attachments_b",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_attachments_b_vendor_response_id_vendor_attachment_responses_id_fk": {
+ "name": "vendor_response_attachments_b_vendor_response_id_vendor_attachment_responses_id_fk",
+ "tableFrom": "vendor_response_attachments_b",
+ "tableTo": "vendor_attachment_responses",
+ "columnsFrom": [
+ "vendor_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_b_uploaded_by_users_id_fk": {
+ "name": "vendor_response_attachments_b_uploaded_by_users_id_fk",
+ "tableFrom": "vendor_response_attachments_b",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_history": {
+ "name": "vendor_response_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_status": {
+ "name": "previous_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_by": {
+ "name": "action_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_at": {
+ "name": "action_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_history_vendor_response_id_vendor_attachment_responses_id_fk": {
+ "name": "vendor_response_history_vendor_response_id_vendor_attachment_responses_id_fk",
+ "tableFrom": "vendor_response_history",
+ "tableTo": "vendor_attachment_responses",
+ "columnsFrom": [
+ "vendor_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_history_action_by_users_id_fk": {
+ "name": "vendor_response_history_action_by_users_id_fk",
+ "tableFrom": "vendor_response_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "action_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_attachments": {
+ "name": "tech_vendor_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'GENERAL'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_contacts": {
+ "name": "tech_vendor_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_position": {
+ "name": "contact_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_title": {
+ "name": "contact_title",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_country": {
+ "name": "contact_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_primary": {
+ "name": "is_primary",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_contacts_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_contacts_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_contacts",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_possible_items": {
+ "name": "tech_vendor_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "shipbuilding_item_id": {
+ "name": "shipbuilding_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "offshore_top_item_id": {
+ "name": "offshore_top_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "offshore_hull_item_id": {
+ "name": "offshore_hull_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_possible_items_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_possible_items_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_shipbuilding_item_id_item_shipbuilding_id_fk": {
+ "name": "tech_vendor_possible_items_shipbuilding_item_id_item_shipbuilding_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_shipbuilding",
+ "columnsFrom": [
+ "shipbuilding_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_offshore_top_item_id_item_offshore_top_id_fk": {
+ "name": "tech_vendor_possible_items_offshore_top_item_id_item_offshore_top_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_offshore_top",
+ "columnsFrom": [
+ "offshore_top_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_offshore_hull_item_id_item_offshore_hull_id_fk": {
+ "name": "tech_vendor_possible_items_offshore_hull_item_id_item_offshore_hull_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_offshore_hull",
+ "columnsFrom": [
+ "offshore_hull_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendors": {
+ "name": "tech_vendors",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_eng": {
+ "name": "country_eng",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_fab": {
+ "name": "country_fab",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_name": {
+ "name": "agent_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_phone": {
+ "name": "agent_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_email": {
+ "name": "agent_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tech_vendor_type": {
+ "name": "tech_vendor_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "is_quote_comparison": {
+ "name": "is_quote_comparison",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_answer_options": {
+ "name": "esg_answer_options",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "esg_evaluation_item_id": {
+ "name": "esg_evaluation_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_text": {
+ "name": "answer_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_answer_options_esg_evaluation_item_id_esg_evaluation_items_id_fk": {
+ "name": "esg_answer_options_esg_evaluation_item_id_esg_evaluation_items_id_fk",
+ "tableFrom": "esg_answer_options",
+ "tableTo": "esg_evaluation_items",
+ "columnsFrom": [
+ "esg_evaluation_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluation_items": {
+ "name": "esg_evaluation_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "esg_evaluation_id": {
+ "name": "esg_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_item": {
+ "name": "evaluation_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_item_description": {
+ "name": "evaluation_item_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_evaluation_items_esg_evaluation_id_esg_evaluations_id_fk": {
+ "name": "esg_evaluation_items_esg_evaluation_id_esg_evaluations_id_fk",
+ "tableFrom": "esg_evaluation_items",
+ "tableTo": "esg_evaluations",
+ "columnsFrom": [
+ "esg_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluation_responses": {
+ "name": "esg_evaluation_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "esg_evaluation_item_id": {
+ "name": "esg_evaluation_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "esg_answer_option_id": {
+ "name": "esg_answer_option_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selected_score": {
+ "name": "selected_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "additional_comments": {
+ "name": "additional_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_evaluation_responses_submission_id_evaluation_submissions_id_fk": {
+ "name": "esg_evaluation_responses_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "esg_evaluation_responses_esg_evaluation_item_id_esg_evaluation_items_id_fk": {
+ "name": "esg_evaluation_responses_esg_evaluation_item_id_esg_evaluation_items_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "esg_evaluation_items",
+ "columnsFrom": [
+ "esg_evaluation_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "esg_evaluation_responses_esg_answer_option_id_esg_answer_options_id_fk": {
+ "name": "esg_evaluation_responses_esg_answer_option_id_esg_answer_options_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "esg_answer_options",
+ "columnsFrom": [
+ "esg_answer_option_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluations": {
+ "name": "esg_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "esg_evaluations_serial_number_unique": {
+ "name": "esg_evaluations_serial_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "serial_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_submissions": {
+ "name": "evaluation_submissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_round": {
+ "name": "evaluation_round",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_status": {
+ "name": "submission_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_by": {
+ "name": "reviewed_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "average_esg_score": {
+ "name": "average_esg_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_general_items": {
+ "name": "total_general_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "completed_general_items": {
+ "name": "completed_general_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "total_esg_items": {
+ "name": "total_esg_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "completed_esg_items": {
+ "name": "completed_esg_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_submissions_periodic_evaluation_id_periodic_evaluations_id_fk": {
+ "name": "evaluation_submissions_periodic_evaluation_id_periodic_evaluations_id_fk",
+ "tableFrom": "evaluation_submissions",
+ "tableTo": "periodic_evaluations",
+ "columnsFrom": [
+ "periodic_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_submissions_company_id_vendors_id_fk": {
+ "name": "evaluation_submissions_company_id_vendors_id_fk",
+ "tableFrom": "evaluation_submissions",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "evaluation_submissions_submission_id_unique": {
+ "name": "evaluation_submissions_submission_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "submission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.general_evaluation_responses": {
+ "name": "general_evaluation_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "general_evaluation_id": {
+ "name": "general_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_text": {
+ "name": "response_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_attachments": {
+ "name": "has_attachments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "general_evaluation_responses_submission_id_evaluation_submissions_id_fk": {
+ "name": "general_evaluation_responses_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "general_evaluation_responses",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "general_evaluation_responses_general_evaluation_id_general_evaluations_id_fk": {
+ "name": "general_evaluation_responses_general_evaluation_id_general_evaluations_id_fk",
+ "tableFrom": "general_evaluation_responses",
+ "tableTo": "general_evaluations",
+ "columnsFrom": [
+ "general_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.general_evaluations": {
+ "name": "general_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "general_evaluations_serial_number_unique": {
+ "name": "general_evaluations_serial_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "serial_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_evaluation_attachments": {
+ "name": "vendor_evaluation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "general_evaluation_response_id": {
+ "name": "general_evaluation_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stored_file_name": {
+ "name": "stored_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_evaluation_attachments_submission_id_evaluation_submissions_id_fk": {
+ "name": "vendor_evaluation_attachments_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "vendor_evaluation_attachments",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_evaluation_attachments_general_evaluation_response_id_general_evaluation_responses_id_fk": {
+ "name": "vendor_evaluation_attachments_general_evaluation_response_id_general_evaluation_responses_id_fk",
+ "tableFrom": "vendor_evaluation_attachments",
+ "tableTo": "general_evaluation_responses",
+ "columnsFrom": [
+ "general_evaluation_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_evaluation_attachments_file_id_unique": {
+ "name": "vendor_evaluation_attachments_file_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "file_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_target_reviewers": {
+ "name": "evaluation_target_reviewers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name_from": {
+ "name": "department_name_from",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "assigned_by": {
+ "name": "assigned_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_target_reviewers_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "evaluation_target_reviewers_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviewers_reviewer_user_id_users_id_fk": {
+ "name": "evaluation_target_reviewers_reviewer_user_id_users_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "reviewer_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviewers_assigned_by_users_id_fk": {
+ "name": "evaluation_target_reviewers_assigned_by_users_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "assigned_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_target_department": {
+ "name": "unique_target_department",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_target_reviews": {
+ "name": "evaluation_target_reviews",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_approved": {
+ "name": "is_approved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comment": {
+ "name": "review_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_target_reviews_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "evaluation_target_reviews_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "evaluation_target_reviews",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviews_reviewer_user_id_users_id_fk": {
+ "name": "evaluation_target_reviews_reviewer_user_id_users_id_fk",
+ "tableFrom": "evaluation_target_reviews",
+ "tableTo": "users",
+ "columnsFrom": [
+ "reviewer_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_target_reviewer": {
+ "name": "unique_target_reviewer",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "reviewer_user_id",
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_targets": {
+ "name": "evaluation_targets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_user_id": {
+ "name": "admin_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_targets_vendor_id_vendors_id_fk": {
+ "name": "evaluation_targets_vendor_id_vendors_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_targets_admin_user_id_users_id_fk": {
+ "name": "evaluation_targets_admin_user_id_users_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "admin_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_targets_confirmed_by_users_id_fk": {
+ "name": "evaluation_targets_confirmed_by_users_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "confirmed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.periodic_evaluations": {
+ "name": "periodic_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_grade": {
+ "name": "evaluation_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "periodic_evaluations_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "periodic_evaluations_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "periodic_evaluations",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "periodic_evaluations_finalized_by_users_id_fk": {
+ "name": "periodic_evaluations_finalized_by_users_id_fk",
+ "tableFrom": "periodic_evaluations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "finalized_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_evaluation_target": {
+ "name": "unique_evaluation_target",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "evaluation_period"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluation_attachments": {
+ "name": "reviewer_evaluation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reviewer_evaluation_detail_id": {
+ "name": "reviewer_evaluation_detail_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stored_file_name": {
+ "name": "stored_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_path": {
+ "name": "public_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_extension": {
+ "name": "file_extension",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "reviewer_evaluation_detail_id_idx": {
+ "name": "reviewer_evaluation_detail_id_idx",
+ "columns": [
+ {
+ "expression": "reviewer_evaluation_detail_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "reviewer_evaluation_attachments_reviewer_evaluation_detail_id_reviewer_evaluation_details_id_fk": {
+ "name": "reviewer_evaluation_attachments_reviewer_evaluation_detail_id_reviewer_evaluation_details_id_fk",
+ "tableFrom": "reviewer_evaluation_attachments",
+ "tableTo": "reviewer_evaluation_details",
+ "columnsFrom": [
+ "reviewer_evaluation_detail_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluation_attachments_uploaded_by_users_id_fk": {
+ "name": "reviewer_evaluation_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "reviewer_evaluation_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluation_details": {
+ "name": "reviewer_evaluation_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reviewer_evaluation_id": {
+ "name": "reviewer_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reg_eval_criteria_details_id": {
+ "name": "reg_eval_criteria_details_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reviewer_evaluation_details_reviewer_evaluation_id_reviewer_evaluations_id_fk": {
+ "name": "reviewer_evaluation_details_reviewer_evaluation_id_reviewer_evaluations_id_fk",
+ "tableFrom": "reviewer_evaluation_details",
+ "tableTo": "reviewer_evaluations",
+ "columnsFrom": [
+ "reviewer_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluation_details_reg_eval_criteria_details_id_reg_eval_criteria_details_id_fk": {
+ "name": "reviewer_evaluation_details_reg_eval_criteria_details_id_reg_eval_criteria_details_id_fk",
+ "tableFrom": "reviewer_evaluation_details",
+ "tableTo": "reg_eval_criteria_details",
+ "columnsFrom": [
+ "reg_eval_criteria_details_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_reviewer_criteria": {
+ "name": "unique_reviewer_criteria",
+ "nullsNotDistinct": false,
+ "columns": [
+ "reviewer_evaluation_id",
+ "reg_eval_criteria_details_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluations": {
+ "name": "reviewer_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_target_reviewer_id": {
+ "name": "evaluation_target_reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_completed": {
+ "name": "is_completed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reviewer_evaluations_periodic_evaluation_id_periodic_evaluations_id_fk": {
+ "name": "reviewer_evaluations_periodic_evaluation_id_periodic_evaluations_id_fk",
+ "tableFrom": "reviewer_evaluations",
+ "tableTo": "periodic_evaluations",
+ "columnsFrom": [
+ "periodic_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluations_evaluation_target_reviewer_id_evaluation_target_reviewers_id_fk": {
+ "name": "reviewer_evaluations_evaluation_target_reviewer_id_evaluation_target_reviewers_id_fk",
+ "tableFrom": "reviewer_evaluations",
+ "tableTo": "evaluation_target_reviewers",
+ "columnsFrom": [
+ "evaluation_target_reviewer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_reviewer_evaluation": {
+ "name": "unique_reviewer_evaluation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "periodic_evaluation_id",
+ "evaluation_target_reviewer_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reg_eval_criteria": {
+ "name": "reg_eval_criteria",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "category2": {
+ "name": "category2",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'processScore'"
+ },
+ "item": {
+ "name": "item",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "range": {
+ "name": "range",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_score_min ": {
+ "name": "variable_score_min ",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_score_max ": {
+ "name": "variable_score_max ",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_score_unit ": {
+ "name": "variable_score_unit ",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_type": {
+ "name": "score_type",
+ "type": "score_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'fixed'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reg_eval_criteria_created_by_users_id_fk": {
+ "name": "reg_eval_criteria_created_by_users_id_fk",
+ "tableFrom": "reg_eval_criteria",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "reg_eval_criteria_updated_by_users_id_fk": {
+ "name": "reg_eval_criteria_updated_by_users_id_fk",
+ "tableFrom": "reg_eval_criteria",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reg_eval_criteria_details": {
+ "name": "reg_eval_criteria_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score_equip_ship": {
+ "name": "score_equip_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_equip_marine": {
+ "name": "score_equip_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_ship": {
+ "name": "score_bulk_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_marine": {
+ "name": "score_bulk_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reg_eval_criteria_details_criteria_id_reg_eval_criteria_id_fk": {
+ "name": "reg_eval_criteria_details_criteria_id_reg_eval_criteria_id_fk",
+ "tableFrom": "reg_eval_criteria_details",
+ "tableTo": "reg_eval_criteria",
+ "columnsFrom": [
+ "criteria_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_gtc_files": {
+ "name": "project_gtc_files",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_gtc_files_project_id_projects_id_fk": {
+ "name": "project_gtc_files_project_id_projects_id_fk",
+ "tableFrom": "project_gtc_files",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.menu_assignments": {
+ "name": "menu_assignments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "menu_assignments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "menu_path": {
+ "name": "menu_path",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "menu_title": {
+ "name": "menu_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "menu_description": {
+ "name": "menu_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "menu_group": {
+ "name": "menu_group",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "section_title": {
+ "name": "section_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'evcp'"
+ },
+ "manager1_id": {
+ "name": "manager1_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager2_id": {
+ "name": "manager2_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "menu_assignments_path_idx": {
+ "name": "menu_assignments_path_idx",
+ "columns": [
+ {
+ "expression": "menu_path",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_manager1_idx": {
+ "name": "menu_assignments_manager1_idx",
+ "columns": [
+ {
+ "expression": "manager1_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_manager2_idx": {
+ "name": "menu_assignments_manager2_idx",
+ "columns": [
+ {
+ "expression": "manager2_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_domain_idx": {
+ "name": "menu_assignments_domain_idx",
+ "columns": [
+ {
+ "expression": "domain",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "menu_assignments_manager1_id_users_id_fk": {
+ "name": "menu_assignments_manager1_id_users_id_fk",
+ "tableFrom": "menu_assignments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "manager1_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "menu_assignments_manager2_id_users_id_fk": {
+ "name": "menu_assignments_manager2_id_users_id_fk",
+ "tableFrom": "menu_assignments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "manager2_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "menu_assignments_menu_path_unique": {
+ "name": "menu_assignments_menu_path_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "menu_path"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.page_information": {
+ "name": "page_information",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "page_path": {
+ "name": "page_path",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "page_name": {
+ "name": "page_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "information_content": {
+ "name": "information_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_file_name": {
+ "name": "attachment_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_file_path": {
+ "name": "attachment_file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_file_size": {
+ "name": "attachment_file_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "page_information_page_path_unique": {
+ "name": "page_information_page_path_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "page_path"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna": {
+ "name": "qna",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "qna_category",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_qna_author": {
+ "name": "idx_qna_author",
+ "columns": [
+ {
+ "expression": "author",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_author_users_id_fk": {
+ "name": "qna_author_users_id_fk",
+ "tableFrom": "qna",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna_answer": {
+ "name": "qna_answer",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "qna_id": {
+ "name": "qna_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_answer_qna": {
+ "name": "idx_answer_qna",
+ "columns": [
+ {
+ "expression": "qna_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_answer_author": {
+ "name": "idx_answer_author",
+ "columns": [
+ {
+ "expression": "author",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_answer_qna_id_qna_id_fk": {
+ "name": "qna_answer_qna_id_qna_id_fk",
+ "tableFrom": "qna_answer",
+ "tableTo": "qna",
+ "columnsFrom": [
+ "qna_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "qna_answer_author_users_id_fk": {
+ "name": "qna_answer_author_users_id_fk",
+ "tableFrom": "qna_answer",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna_comments": {
+ "name": "qna_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_id": {
+ "name": "answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_comment_answer": {
+ "name": "idx_comment_answer",
+ "columns": [
+ {
+ "expression": "answer_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_comment_parent": {
+ "name": "idx_comment_parent",
+ "columns": [
+ {
+ "expression": "parent_comment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_comments_author_users_id_fk": {
+ "name": "qna_comments_author_users_id_fk",
+ "tableFrom": "qna_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "qna_comments_answer_id_qna_answer_id_fk": {
+ "name": "qna_comments_answer_id_qna_answer_id_fk",
+ "tableFrom": "qna_comments",
+ "tableTo": "qna_answer",
+ "columnsFrom": [
+ "answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notice": {
+ "name": "notice",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "page_path": {
+ "name": "page_path",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author_id": {
+ "name": "author_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notice_author_id_users_id_fk": {
+ "name": "notice_author_id_users_id_fk",
+ "tableFrom": "notice",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.daily_access_stats": {
+ "name": "daily_access_stats",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "date": {
+ "name": "date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_visits": {
+ "name": "total_visits",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "unique_users": {
+ "name": "unique_users",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_sessions": {
+ "name": "total_sessions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "avg_session_duration": {
+ "name": "avg_session_duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_download_logs": {
+ "name": "file_download_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_email": {
+ "name": "user_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_name": {
+ "name": "user_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_role": {
+ "name": "user_role",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_ip": {
+ "name": "user_ip",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "downloaded_at": {
+ "name": "downloaded_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_id": {
+ "name": "request_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "referer": {
+ "name": "referer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "download_duration_ms": {
+ "name": "download_duration_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.login_sessions": {
+ "name": "login_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "login_at": {
+ "name": "login_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "logout_at": {
+ "name": "logout_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_token": {
+ "name": "session_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "nextauth_session_id": {
+ "name": "nextauth_session_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_method": {
+ "name": "auth_method",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "last_activity_at": {
+ "name": "last_activity_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "session_expired_at": {
+ "name": "session_expired_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "login_sessions_user_id_users_id_fk": {
+ "name": "login_sessions_user_id_users_id_fk",
+ "tableFrom": "login_sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "login_sessions_session_token_unique": {
+ "name": "login_sessions_session_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "session_token"
+ ]
+ },
+ "login_sessions_nextauth_session_id_unique": {
+ "name": "login_sessions_nextauth_session_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "nextauth_session_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.page_visits": {
+ "name": "page_visits",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "route": {
+ "name": "route",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "page_title": {
+ "name": "page_title",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "referrer": {
+ "name": "referrer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "visited_at": {
+ "name": "visited_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "query_params": {
+ "name": "query_params",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "browser_name": {
+ "name": "browser_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "os_name": {
+ "name": "os_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "page_visits_user_id_users_id_fk": {
+ "name": "page_visits_user_id_users_id_fk",
+ "tableFrom": "page_visits",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "page_visits_session_id_login_sessions_id_fk": {
+ "name": "page_visits_session_id_login_sessions_id_fk",
+ "tableFrom": "page_visits",
+ "tableTo": "login_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.temp_auth_sessions": {
+ "name": "temp_auth_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "temp_auth_key": {
+ "name": "temp_auth_key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_method": {
+ "name": "auth_method",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_used": {
+ "name": "is_used",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "temp_auth_sessions_user_id_users_id_fk": {
+ "name": "temp_auth_sessions_user_id_users_id_fk",
+ "tableFrom": "temp_auth_sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "temp_auth_sessions_temp_auth_key_unique": {
+ "name": "temp_auth_sessions_temp_auth_key_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "temp_auth_key"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_download_stats": {
+ "name": "user_download_stats",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "date": {
+ "name": "date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_downloads": {
+ "name": "total_downloads",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_bytes": {
+ "name": "total_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "unique_files": {
+ "name": "unique_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_download_at": {
+ "name": "last_download_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notifications": {
+ "name": "notifications",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "related_record_id": {
+ "name": "related_record_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "related_record_type": {
+ "name": "related_record_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "read_at": {
+ "name": "read_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_notifications_user_id": {
+ "name": "idx_notifications_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_created_at": {
+ "name": "idx_notifications_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_is_read": {
+ "name": "idx_notifications_is_read",
+ "columns": [
+ {
+ "expression": "is_read",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_user_read": {
+ "name": "idx_notifications_user_read",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_read",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_history": {
+ "name": "template_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_description": {
+ "name": "change_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_by": {
+ "name": "changed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_history_template_id_templates_id_fk": {
+ "name": "template_history_template_id_templates_id_fk",
+ "tableFrom": "template_history",
+ "tableTo": "templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "template_history_changed_by_users_id_fk": {
+ "name": "template_history_changed_by_users_id_fk",
+ "tableFrom": "template_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "changed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_variables": {
+ "name": "template_variables",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_name": {
+ "name": "variable_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_type": {
+ "name": "variable_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "default_value": {
+ "name": "default_value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validation_rule": {
+ "name": "validation_rule",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_variables_template_id_templates_id_fk": {
+ "name": "template_variables_template_id_templates_id_fk",
+ "tableFrom": "template_variables",
+ "tableTo": "templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.templates": {
+ "name": "templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sample_data": {
+ "name": "sample_data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{}'::jsonb"
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "templates_created_by_users_id_fk": {
+ "name": "templates_created_by_users_id_fk",
+ "tableFrom": "templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "templates_slug_unique": {
+ "name": "templates_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_clauses": {
+ "name": "gtc_clauses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_clauses_document_item_number_idx": {
+ "name": "gtc_clauses_document_item_number_idx",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "item_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_document_idx": {
+ "name": "gtc_clauses_document_idx",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_parent_idx": {
+ "name": "gtc_clauses_parent_idx",
+ "columns": [
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_full_path_idx": {
+ "name": "gtc_clauses_full_path_idx",
+ "columns": [
+ {
+ "expression": "full_path",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_clauses_document_id_gtc_documents_id_fk": {
+ "name": "gtc_clauses_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_clauses_created_by_id_users_id_fk": {
+ "name": "gtc_clauses_created_by_id_users_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_clauses_updated_by_id_users_id_fk": {
+ "name": "gtc_clauses_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_documents": {
+ "name": "gtc_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {
+ "gtc_project_revision_idx": {
+ "name": "gtc_project_revision_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_type_idx": {
+ "name": "gtc_type_idx",
+ "columns": [
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_project_idx": {
+ "name": "gtc_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_created_at_idx": {
+ "name": "gtc_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_updated_at_idx": {
+ "name": "gtc_updated_at_idx",
+ "columns": [
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_documents_project_id_projects_id_fk": {
+ "name": "gtc_documents_project_id_projects_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_documents_created_by_id_users_id_fk": {
+ "name": "gtc_documents_created_by_id_users_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_documents_updated_by_id_users_id_fk": {
+ "name": "gtc_documents_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_negotiation_history": {
+ "name": "gtc_negotiation_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_clause_id": {
+ "name": "vendor_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_status": {
+ "name": "previous_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_fields": {
+ "name": "changed_fields",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachments": {
+ "name": "attachments",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_type": {
+ "name": "actor_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "actor_id": {
+ "name": "actor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_name": {
+ "name": "actor_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_email": {
+ "name": "actor_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "gtc_negotiation_history_vendor_clause_idx": {
+ "name": "gtc_negotiation_history_vendor_clause_idx",
+ "columns": [
+ {
+ "expression": "vendor_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_negotiation_history_action_idx": {
+ "name": "gtc_negotiation_history_action_idx",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_negotiation_history_created_at_idx": {
+ "name": "gtc_negotiation_history_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_negotiation_history_vendor_clause_id_gtc_vendor_clauses_id_fk": {
+ "name": "gtc_negotiation_history_vendor_clause_id_gtc_vendor_clauses_id_fk",
+ "tableFrom": "gtc_negotiation_history",
+ "tableTo": "gtc_vendor_clauses",
+ "columnsFrom": [
+ "vendor_clause_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_negotiation_history_actor_id_users_id_fk": {
+ "name": "gtc_negotiation_history_actor_id_users_id_fk",
+ "tableFrom": "gtc_negotiation_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "actor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_templates": {
+ "name": "gtc_templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'1.0'"
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_metadata": {
+ "name": "variable_metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_templates_name_idx": {
+ "name": "gtc_templates_name_idx",
+ "columns": [
+ {
+ "expression": "name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_templates_is_default_idx": {
+ "name": "gtc_templates_is_default_idx",
+ "columns": [
+ {
+ "expression": "is_default",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_templates_document_id_gtc_documents_id_fk": {
+ "name": "gtc_templates_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_templates_created_by_id_users_id_fk": {
+ "name": "gtc_templates_created_by_id_users_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_templates_updated_by_id_users_id_fk": {
+ "name": "gtc_templates_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_vendor_clauses": {
+ "name": "gtc_vendor_clauses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_document_id": {
+ "name": "vendor_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_clause_id": {
+ "name": "base_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_item_number": {
+ "name": "modified_item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_category": {
+ "name": "modified_category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_subtitle": {
+ "name": "modified_subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_content": {
+ "name": "modified_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_number_modified": {
+ "name": "is_number_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_category_modified": {
+ "name": "is_category_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_subtitle_modified": {
+ "name": "is_subtitle_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_content_modified": {
+ "name": "is_content_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_note": {
+ "name": "negotiation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_excluded": {
+ "name": "is_excluded",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_vendor_clauses_vendor_base_idx": {
+ "name": "gtc_vendor_clauses_vendor_base_idx",
+ "columns": [
+ {
+ "expression": "vendor_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "base_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_vendor_document_idx": {
+ "name": "gtc_vendor_clauses_vendor_document_idx",
+ "columns": [
+ {
+ "expression": "vendor_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_base_clause_idx": {
+ "name": "gtc_vendor_clauses_base_clause_idx",
+ "columns": [
+ {
+ "expression": "base_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_parent_idx": {
+ "name": "gtc_vendor_clauses_parent_idx",
+ "columns": [
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_review_status_idx": {
+ "name": "gtc_vendor_clauses_review_status_idx",
+ "columns": [
+ {
+ "expression": "review_status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_vendor_clauses_vendor_document_id_gtc_vendor_documents_id_fk": {
+ "name": "gtc_vendor_clauses_vendor_document_id_gtc_vendor_documents_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "gtc_vendor_documents",
+ "columnsFrom": [
+ "vendor_document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_base_clause_id_gtc_clauses_id_fk": {
+ "name": "gtc_vendor_clauses_base_clause_id_gtc_clauses_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "gtc_clauses",
+ "columnsFrom": [
+ "base_clause_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_created_by_id_users_id_fk": {
+ "name": "gtc_vendor_clauses_created_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_updated_by_id_users_id_fk": {
+ "name": "gtc_vendor_clauses_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_vendor_documents": {
+ "name": "gtc_vendor_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "base_document_id": {
+ "name": "base_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'1.0'"
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_start_date": {
+ "name": "negotiation_start_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "negotiation_end_date": {
+ "name": "negotiation_end_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_date": {
+ "name": "approval_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_name": {
+ "name": "final_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_path": {
+ "name": "final_file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_size": {
+ "name": "final_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_vendor_documents_base_vendor_idx": {
+ "name": "gtc_vendor_documents_base_vendor_idx",
+ "columns": [
+ {
+ "expression": "base_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_vendor_idx": {
+ "name": "gtc_vendor_documents_vendor_idx",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_base_document_idx": {
+ "name": "gtc_vendor_documents_base_document_idx",
+ "columns": [
+ {
+ "expression": "base_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_review_status_idx": {
+ "name": "gtc_vendor_documents_review_status_idx",
+ "columns": [
+ {
+ "expression": "review_status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_vendor_documents_base_document_id_gtc_documents_id_fk": {
+ "name": "gtc_vendor_documents_base_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "base_document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_vendor_id_vendors_id_fk": {
+ "name": "gtc_vendor_documents_vendor_id_vendors_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_created_by_id_users_id_fk": {
+ "name": "gtc_vendor_documents_created_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_updated_by_id_users_id_fk": {
+ "name": "gtc_vendor_documents_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.code_groups": {
+ "name": "code_groups",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_format": {
+ "name": "code_format",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expressions": {
+ "name": "expressions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "control_type": {
+ "name": "control_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "code_groups_project_id_projects_id_fk": {
+ "name": "code_groups_project_id_projects_id_fk",
+ "tableFrom": "code_groups",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_group_id": {
+ "name": "unique_project_group_id",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.combo_box_settings": {
+ "name": "combo_box_settings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "combo_box_settings_code_group_id_code_groups_id_fk": {
+ "name": "combo_box_settings_code_group_id_code_groups_id_fk",
+ "tableFrom": "combo_box_settings",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_code_group_code": {
+ "name": "unique_code_group_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code_group_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_class_options_new": {
+ "name": "document_class_options_new",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_class_id": {
+ "name": "document_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "option_code": {
+ "name": "option_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_class_options_new_document_class_id_document_classes_id_fk": {
+ "name": "document_class_options_new_document_class_id_document_classes_id_fk",
+ "tableFrom": "document_class_options_new",
+ "tableTo": "document_classes",
+ "columnsFrom": [
+ "document_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_document_class_option": {
+ "name": "unique_document_class_option",
+ "nullsNotDistinct": false,
+ "columns": [
+ "document_class_id",
+ "option_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_classes": {
+ "name": "document_classes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_classes_project_id_projects_id_fk": {
+ "name": "document_classes_project_id_projects_id_fk",
+ "tableFrom": "document_classes",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "document_classes_code_group_id_code_groups_id_fk": {
+ "name": "document_classes_code_group_id_code_groups_id_fk",
+ "tableFrom": "document_classes",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_code": {
+ "name": "unique_project_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "code"
+ ]
+ },
+ "unique_project_value": {
+ "name": "unique_project_value",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "value"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_number_type_configs": {
+ "name": "document_number_type_configs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_number_type_id": {
+ "name": "document_number_type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sdq": {
+ "name": "sdq",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_number_type_configs_document_number_type_id_document_number_types_id_fk": {
+ "name": "document_number_type_configs_document_number_type_id_document_number_types_id_fk",
+ "tableFrom": "document_number_type_configs",
+ "tableTo": "document_number_types",
+ "columnsFrom": [
+ "document_number_type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "document_number_type_configs_code_group_id_code_groups_id_fk": {
+ "name": "document_number_type_configs_code_group_id_code_groups_id_fk",
+ "tableFrom": "document_number_type_configs",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_document_number_type_sdq": {
+ "name": "unique_document_number_type_sdq",
+ "nullsNotDistinct": false,
+ "columns": [
+ "document_number_type_id",
+ "sdq"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_number_types": {
+ "name": "document_number_types",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_number_types_project_id_projects_id_fk": {
+ "name": "document_number_types_project_id_projects_id_fk",
+ "tableFrom": "document_number_types",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_name": {
+ "name": "unique_project_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_attachments": {
+ "name": "legal_work_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_auto_generated": {
+ "name": "is_auto_generated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'request'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_attachments_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_attachments_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_attachments",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_requests": {
+ "name": "legal_work_requests",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_department": {
+ "name": "review_department",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inquiry_type": {
+ "name": "inquiry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "request_content": {
+ "name": "request_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "contract_project_name": {
+ "name": "contract_project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_amount": {
+ "name": "contract_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_counterparty": {
+ "name": "contract_counterparty",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "counterparty_type": {
+ "name": "counterparty_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "factual_relation": {
+ "name": "factual_relation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_number": {
+ "name": "project_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipowner_orderer": {
+ "name": "shipowner_orderer",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "governing_law": {
+ "name": "governing_law",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_type": {
+ "name": "project_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_requests_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_requests_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_requests",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_responses": {
+ "name": "legal_work_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_content": {
+ "name": "response_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_reviewer": {
+ "name": "response_reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_confirmer": {
+ "name": "response_confirmer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_approver": {
+ "name": "response_approver",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_re_revision": {
+ "name": "is_re_revision",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "parent_response_id": {
+ "name": "parent_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_responses_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_responses_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_responses",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_works": {
+ "name": "legal_works",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_urgent": {
+ "name": "is_urgent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "request_date": {
+ "name": "request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consultation_date": {
+ "name": "consultation_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expected_answer_date": {
+ "name": "expected_answer_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_completion_date": {
+ "name": "legal_completion_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer": {
+ "name": "reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_responder": {
+ "name": "legal_responder",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachment": {
+ "name": "has_attachment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_works_company_id_vendors_id_fk": {
+ "name": "legal_works_company_id_vendors_id_fk",
+ "tableFrom": "legal_works",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.consent_logs": {
+ "name": "consent_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "consent_logs_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_type": {
+ "name": "consent_type",
+ "type": "consent_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "consent_action",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "policy_version": {
+ "name": "policy_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_timestamp": {
+ "name": "action_timestamp",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "additional_data": {
+ "name": "additional_data",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "consent_logs_user_action_timestamp_idx": {
+ "name": "consent_logs_user_action_timestamp_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "action_timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "consent_logs_consent_type_idx": {
+ "name": "consent_logs_consent_type_idx",
+ "columns": [
+ {
+ "expression": "consent_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "consent_logs_action_idx": {
+ "name": "consent_logs_action_idx",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "consent_logs_user_id_users_id_fk": {
+ "name": "consent_logs_user_id_users_id_fk",
+ "tableFrom": "consent_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.policy_versions": {
+ "name": "policy_versions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "policy_versions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "policy_type": {
+ "name": "policy_type",
+ "type": "policy_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "effective_date": {
+ "name": "effective_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_current": {
+ "name": "is_current",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "policy_versions_type_version_idx": {
+ "name": "policy_versions_type_version_idx",
+ "columns": [
+ {
+ "expression": "policy_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "policy_versions_current_idx": {
+ "name": "policy_versions_current_idx",
+ "columns": [
+ {
+ "expression": "is_current",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "policy_versions_effective_date_idx": {
+ "name": "policy_versions_effective_date_idx",
+ "columns": [
+ {
+ "expression": "effective_date",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_consents": {
+ "name": "user_consents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_consents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_type": {
+ "name": "consent_type",
+ "type": "consent_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_status": {
+ "name": "consent_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "policy_version": {
+ "name": "policy_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consented_at": {
+ "name": "consented_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revoke_reason": {
+ "name": "revoke_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "user_consents_user_type_idx": {
+ "name": "user_consents_user_type_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "consent_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_consents_consented_at_idx": {
+ "name": "user_consents_consented_at_idx",
+ "columns": [
+ {
+ "expression": "consented_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_consents_policy_version_idx": {
+ "name": "user_consents_policy_version_idx",
+ "columns": [
+ {
+ "expression": "policy_version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_consents_user_id_users_id_fk": {
+ "name": "user_consents_user_id_users_id_fk",
+ "tableFrom": "user_consents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_companies": {
+ "name": "bidding_companies",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "invitation_status": {
+ "name": "invitation_status",
+ "type": "invitation_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "invited_at": {
+ "name": "invited_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_amount": {
+ "name": "pre_quote_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_submitted_at": {
+ "name": "pre_quote_submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote_selected": {
+ "name": "is_pre_quote_selected",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "final_quote_amount": {
+ "name": "final_quote_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_quote_submitted_at": {
+ "name": "final_quote_submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_winner": {
+ "name": "is_winner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_companies_bidding_id_biddings_id_fk": {
+ "name": "bidding_companies_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_companies",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_companies_company_id_vendors_id_fk": {
+ "name": "bidding_companies_company_id_vendors_id_fk",
+ "tableFrom": "bidding_companies",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_conditions": {
+ "name": "bidding_conditions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_conditions": {
+ "name": "tax_conditions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_delivery_date": {
+ "name": "contract_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_price_adjustment_applicable": {
+ "name": "is_price_adjustment_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_port": {
+ "name": "shipping_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destination_port": {
+ "name": "destination_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spare_part_options": {
+ "name": "spare_part_options",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_conditions_bidding_id_biddings_id_fk": {
+ "name": "bidding_conditions_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_conditions",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_documents": {
+ "name": "bidding_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "specification_meeting_id": {
+ "name": "specification_meeting_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "document_type": {
+ "name": "document_type",
+ "type": "document_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_documents_bidding_id_biddings_id_fk": {
+ "name": "bidding_documents_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_company_id_vendors_id_fk": {
+ "name": "bidding_documents_company_id_vendors_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_pr_item_id_pr_items_for_bidding_id_fk": {
+ "name": "bidding_documents_pr_item_id_pr_items_for_bidding_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "pr_items_for_bidding",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_specification_meeting_id_specification_meetings_id_fk": {
+ "name": "bidding_documents_specification_meeting_id_specification_meetings_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "specification_meetings",
+ "columnsFrom": [
+ "specification_meeting_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_notice_template": {
+ "name": "bidding_notice_template",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'standard'"
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'표준 입찰공고문'"
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.biddings": {
+ "name": "biddings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_number": {
+ "name": "bidding_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "contract_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bidding_type": {
+ "name": "bidding_type",
+ "type": "bidding_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "award_count": {
+ "name": "award_count",
+ "type": "award_count",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'single'"
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_date": {
+ "name": "pre_quote_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_registration_date": {
+ "name": "bidding_registration_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_start_date": {
+ "name": "submission_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_end_date": {
+ "name": "submission_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_date": {
+ "name": "evaluation_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_specification_meeting": {
+ "name": "has_specification_meeting",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "budget": {
+ "name": "budget",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_price": {
+ "name": "target_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_bid_price": {
+ "name": "final_bid_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_pr_document": {
+ "name": "has_pr_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "status": {
+ "name": "status",
+ "type": "bidding_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bidding_generated'"
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_email": {
+ "name": "manager_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_phone": {
+ "name": "manager_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "biddings_project_id_projects_id_fk": {
+ "name": "biddings_project_id_projects_id_fk",
+ "tableFrom": "biddings",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "biddings_bidding_number_unique": {
+ "name": "biddings_bidding_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "bidding_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_condition_responses": {
+ "name": "company_condition_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_company_id": {
+ "name": "bidding_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms_response": {
+ "name": "payment_terms_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_conditions_response": {
+ "name": "tax_conditions_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_contract_delivery_date": {
+ "name": "proposed_contract_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "price_adjustment_response": {
+ "name": "price_adjustment_response",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_response": {
+ "name": "incoterms_response",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_shipping_port": {
+ "name": "proposed_shipping_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_destination_port": {
+ "name": "proposed_destination_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spare_part_response": {
+ "name": "spare_part_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "additional_proposals": {
+ "name": "additional_proposals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote": {
+ "name": "is_pre_quote",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "company_condition_responses_bidding_company_id_bidding_companies_id_fk": {
+ "name": "company_condition_responses_bidding_company_id_bidding_companies_id_fk",
+ "tableFrom": "company_condition_responses",
+ "tableTo": "bidding_companies",
+ "columnsFrom": [
+ "bidding_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_pr_item_bids": {
+ "name": "company_pr_item_bids",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_company_id": {
+ "name": "bidding_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "proposed_delivery_date": {
+ "name": "proposed_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_unit_price": {
+ "name": "bid_unit_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_amount": {
+ "name": "bid_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "technical_specification": {
+ "name": "technical_specification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote": {
+ "name": "is_pre_quote",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "company_pr_item_bids_bidding_company_id_bidding_companies_id_fk": {
+ "name": "company_pr_item_bids_bidding_company_id_bidding_companies_id_fk",
+ "tableFrom": "company_pr_item_bids",
+ "tableTo": "bidding_companies",
+ "columnsFrom": [
+ "bidding_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "company_pr_item_bids_pr_item_id_pr_items_for_bidding_id_fk": {
+ "name": "company_pr_item_bids_pr_item_id_pr_items_for_bidding_id_fk",
+ "tableFrom": "company_pr_item_bids",
+ "tableTo": "pr_items_for_bidding",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_documents": {
+ "name": "pr_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "document_name": {
+ "name": "document_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "registered_by": {
+ "name": "registered_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_documents_bidding_id_biddings_id_fk": {
+ "name": "pr_documents_bidding_id_biddings_id_fk",
+ "tableFrom": "pr_documents",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_items_for_bidding": {
+ "name": "pr_items_for_bidding",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_info": {
+ "name": "project_info",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_info": {
+ "name": "item_info",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi": {
+ "name": "shi",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_delivery_date": {
+ "name": "requested_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "annual_unit_price": {
+ "name": "annual_unit_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity_unit": {
+ "name": "quantity_unit",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_weight": {
+ "name": "total_weight",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "weight_unit": {
+ "name": "weight_unit",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_spec_document": {
+ "name": "has_spec_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_items_for_bidding_bidding_id_biddings_id_fk": {
+ "name": "pr_items_for_bidding_bidding_id_biddings_id_fk",
+ "tableFrom": "pr_items_for_bidding",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.specification_meetings": {
+ "name": "specification_meetings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "meeting_date": {
+ "name": "meeting_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "meeting_time": {
+ "name": "meeting_time",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "location": {
+ "name": "location",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agenda": {
+ "name": "agenda",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "materials": {
+ "name": "materials",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "specification_meetings_bidding_id_biddings_id_fk": {
+ "name": "specification_meetings_bidding_id_biddings_id_fk",
+ "tableFrom": "specification_meetings",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_selection_results": {
+ "name": "vendor_selection_results",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selected_company_id": {
+ "name": "selected_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selection_reason": {
+ "name": "selection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_summary": {
+ "name": "evaluation_summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_result_documents": {
+ "name": "has_result_documents",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "selected_at": {
+ "name": "selected_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "selected_by": {
+ "name": "selected_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_selection_results_bidding_id_biddings_id_fk": {
+ "name": "vendor_selection_results_bidding_id_biddings_id_fk",
+ "tableFrom": "vendor_selection_results",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_selection_results_selected_company_id_vendors_id_fk": {
+ "name": "vendor_selection_results_selected_company_id_vendors_id_fk",
+ "tableFrom": "vendor_selection_results",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "selected_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_additional_info": {
+ "name": "vendor_additional_info",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "business_type": {
+ "name": "business_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "industry_type": {
+ "name": "industry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_size": {
+ "name": "company_size",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revenue": {
+ "name": "revenue",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "factory_established_date": {
+ "name": "factory_established_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_contract_terms": {
+ "name": "preferred_contract_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_additional_info_vendor_id_vendors_id_fk": {
+ "name": "vendor_additional_info_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_additional_info",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_business_contacts": {
+ "name": "vendor_business_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_type": {
+ "name": "contact_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "position": {
+ "name": "position",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department": {
+ "name": "department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "responsibility": {
+ "name": "responsibility",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_business_contacts_vendor_id_vendors_id_fk": {
+ "name": "vendor_business_contacts_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_business_contacts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_regular_registrations": {
+ "name": "vendor_regular_registrations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'audit_pass'"
+ },
+ "potential_code": {
+ "name": "potential_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_items": {
+ "name": "major_items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registration_request_date": {
+ "name": "registration_request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_department": {
+ "name": "assigned_department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_department_code": {
+ "name": "assigned_department_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_user": {
+ "name": "assigned_user",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_user_code": {
+ "name": "assigned_user_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "safety_qualification_content": {
+ "name": "safety_qualification_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_skipped": {
+ "name": "gtc_skipped",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_regular_registrations_vendor_id_vendors_id_fk": {
+ "name": "vendor_regular_registrations_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_regular_registrations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_assignment_history": {
+ "name": "department_domain_assignment_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_assignment_history_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "assignment_id": {
+ "name": "assignment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_values": {
+ "name": "previous_values",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_values": {
+ "name": "new_values",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_by": {
+ "name": "changed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_assignments": {
+ "name": "department_domain_assignments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_assignments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_domain": {
+ "name": "assigned_domain",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_mappings": {
+ "name": "department_domain_mappings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_mappings_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "assignment_id": {
+ "name": "assignment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_company_code": {
+ "name": "old_company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_department_code": {
+ "name": "old_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_department_name": {
+ "name": "old_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_company_code": {
+ "name": "new_company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_department_code": {
+ "name": "new_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_department_name": {
+ "name": "new_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mapping_status": {
+ "name": "mapping_status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "mapped_by": {
+ "name": "mapped_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mapped_at": {
+ "name": "mapped_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER": {
+ "name": "CUSTOMER_MASTER_BP_HEADER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_HEADER_unique": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_HEADER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "BP_HEADER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRNO": {
+ "name": "ADDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SMTP_ADDR": {
+ "name": "SMTP_ADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "FAX_EXTENS": {
+ "name": "FAX_EXTENS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_NUMBER": {
+ "name": "FAX_NUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CITY1": {
+ "name": "CITY1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY2": {
+ "name": "CITY2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOUSE_NUM1": {
+ "name": "HOUSE_NUM1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANGU": {
+ "name": "LANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME1": {
+ "name": "NAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME2": {
+ "name": "NAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME3": {
+ "name": "NAME3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME4": {
+ "name": "NAME4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NATION": {
+ "name": "NATION",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POST_CODE1": {
+ "name": "POST_CODE1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POST_CODE2": {
+ "name": "POST_CODE2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PO_BOX": {
+ "name": "PO_BOX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGION": {
+ "name": "REGION",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SORT1": {
+ "name": "SORT1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SORT2": {
+ "name": "SORT2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STREET": {
+ "name": "STREET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAXJURCODE": {
+ "name": "TAXJURCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TIME_ZONE": {
+ "name": "TIME_ZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TITLE": {
+ "name": "TITLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANSPZONE": {
+ "name": "TRANSPZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "R3_USER": {
+ "name": "R3_USER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_EXTENS": {
+ "name": "TEL_EXTENS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_NUMBER": {
+ "name": "TEL_NUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URI_ADDR": {
+ "name": "URI_ADDR",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANRED": {
+ "name": "ANRED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUFSD": {
+ "name": "AUFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAKSD": {
+ "name": "FAKSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GFORM": {
+ "name": "GFORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JMJAH": {
+ "name": "JMJAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JMZAH": {
+ "name": "JMZAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFREPRE": {
+ "name": "J_1KFREPRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFTBUS": {
+ "name": "J_1KFTBUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFTIND": {
+ "name": "J_1KFTIND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KATR1": {
+ "name": "KATR1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KDKG1": {
+ "name": "KDKG1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTOKD": {
+ "name": "KTOKD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KUNNR": {
+ "name": "KUNNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LIFNR": {
+ "name": "LIFNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LIFSD": {
+ "name": "LIFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NIELS": {
+ "name": "NIELS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NODEL": {
+ "name": "NODEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUGRP": {
+ "name": "PUGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPERR": {
+ "name": "SPERR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD1": {
+ "name": "STCD1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD2": {
+ "name": "STCD2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD3": {
+ "name": "STCD3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD4": {
+ "name": "STCD4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCEG": {
+ "name": "STCEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMJAH": {
+ "name": "UMJAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UWAER": {
+ "name": "UWAER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VBUND": {
+ "name": "VBUND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT_C": {
+ "name": "ZZAPPDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM_C": {
+ "name": "ZZAPPTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS_C": {
+ "name": "ZZAPPUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBA": {
+ "name": "ZZBA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBRSCH_C": {
+ "name": "ZZBRSCH_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCRMCD": {
+ "name": "ZZCRMCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKAR_C": {
+ "name": "ZZDOKAR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKNR_C": {
+ "name": "ZZDOKNR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKTL_C": {
+ "name": "ZZDOKTL_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKVR_C": {
+ "name": "ZZDOKVR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDUNS": {
+ "name": "ZZDUNS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTBU": {
+ "name": "ZZFTBU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTBUNM": {
+ "name": "ZZFTBUNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTDT": {
+ "name": "ZZFTDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTDTNM": {
+ "name": "ZZFTDTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTGT": {
+ "name": "ZZFTGT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTGTNM": {
+ "name": "ZZFTGTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZINBFLGC": {
+ "name": "ZZINBFLGC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT_C": {
+ "name": "ZZLAMDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM_C": {
+ "name": "ZZLAMTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS_C": {
+ "name": "ZZLAMUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZORT01_C": {
+ "name": "ZZORT01_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZORT02_C": {
+ "name": "ZZORT02_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREASON": {
+ "name": "ZZREASON",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT_C": {
+ "name": "ZZREGDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM_C": {
+ "name": "ZZREGTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS_C": {
+ "name": "ZZREGUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTCDT_C": {
+ "name": "ZZSTCDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTRAS_C": {
+ "name": "ZZSTRAS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSUBSEQ_C": {
+ "name": "ZZSUBSEQ_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AKONT": {
+ "name": "AKONT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BUKRS": {
+ "name": "BUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "FDGRV": {
+ "name": "FDGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPERR": {
+ "name": "SPERR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZAHLS": {
+ "name": "ZAHLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZTERM": {
+ "name": "ZTERM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZUAWA": {
+ "name": "ZUAWA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZWELS": {
+ "name": "ZWELS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AUFSD": {
+ "name": "AUFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AWAHR": {
+ "name": "AWAHR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BZIRK": {
+ "name": "BZIRK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAKSD": {
+ "name": "FAKSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO1": {
+ "name": "INCO1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO2": {
+ "name": "INCO2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KALKS": {
+ "name": "KALKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KDGRP": {
+ "name": "KDGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KONDA": {
+ "name": "KONDA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTGRD": {
+ "name": "KTGRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KURST": {
+ "name": "KURST",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KZAZU": {
+ "name": "KZAZU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LIFSD": {
+ "name": "LIFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LPRIO": {
+ "name": "LPRIO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLTYP": {
+ "name": "PLTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VERSG": {
+ "name": "VERSG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKBUR": {
+ "name": "VKBUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKGRP": {
+ "name": "VKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKORG": {
+ "name": "VKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VSBED": {
+ "name": "VSBED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VTWEG": {
+ "name": "VTWEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VWERK": {
+ "name": "VWERK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS": {
+ "name": "WAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZTERM": {
+ "name": "ZTERM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEFPA": {
+ "name": "DEFPA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KUNN2": {
+ "name": "KUNN2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PARVW": {
+ "name": "PARVW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PARZA": {
+ "name": "PARZA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ALAND": {
+ "name": "ALAND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TATYP": {
+ "name": "TATYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TAXKD": {
+ "name": "TAXKD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LAND1": {
+ "name": "LAND1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "STCEG": {
+ "name": "STCEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "TAXNUM": {
+ "name": "TAXNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAXTYPE": {
+ "name": "TAXTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BICD": {
+ "name": "BICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZAREA": {
+ "name": "BIZAREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CCCD": {
+ "name": "CCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COMPCD": {
+ "name": "COMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DEPTLVL": {
+ "name": "DEPTLVL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPTPOSNO": {
+ "name": "DEPTPOSNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHEMPID": {
+ "name": "DHEMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GNCD": {
+ "name": "GNCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PCCD": {
+ "name": "PCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDEPTCD": {
+ "name": "PDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDFROMDT": {
+ "name": "VALIDFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDTODT": {
+ "name": "VALIDTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_unique": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "DEPTCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRCNTRY": {
+ "name": "ADDRCNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AEDAT": {
+ "name": "AEDAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AENAM": {
+ "name": "AENAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AEZET": {
+ "name": "AEZET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BICD": {
+ "name": "BICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZAREA": {
+ "name": "BIZAREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSCADDR": {
+ "name": "BSCADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COMPCD": {
+ "name": "COMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COUNTRYCD": {
+ "name": "COUNTRYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSFROMDT": {
+ "name": "CSFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTODT": {
+ "name": "CSTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTIROLE": {
+ "name": "CTIROLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL": {
+ "name": "DEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPENDDT": {
+ "name": "DEPENDDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHJOBGRDCD": {
+ "name": "DHJOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHNAME": {
+ "name": "DHNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHSINGLID": {
+ "name": "DHSINGLID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISPATCH": {
+ "name": "DISPATCH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DPSTARTDT": {
+ "name": "DPSTARTDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTLADDR": {
+ "name": "DTLADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTLADDR2": {
+ "name": "DTLADDR2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMAIL": {
+ "name": "EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMPADR": {
+ "name": "EMPADR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMPTYPE": {
+ "name": "EMPTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ENGNAME": {
+ "name": "ENGNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EPID": {
+ "name": "EPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERDAT": {
+ "name": "ERDAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERNAM": {
+ "name": "ERNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERZET": {
+ "name": "ERZET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FORIGNFLG": {
+ "name": "FORIGNFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBCD": {
+ "name": "GJOBCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBDUTYCD": {
+ "name": "GJOBDUTYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBGRDCD": {
+ "name": "GJOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GNCD": {
+ "name": "GNCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HRMANAGE": {
+ "name": "HRMANAGE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IDNO": {
+ "name": "IDNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBCD": {
+ "name": "JOBCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBCLASS": {
+ "name": "JOBCLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBDUTYCD": {
+ "name": "JOBDUTYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDCD": {
+ "name": "JOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTL_EMP": {
+ "name": "KTL_EMP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVABSENCE": {
+ "name": "LVABSENCE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MBPHONE": {
+ "name": "MBPHONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME": {
+ "name": "NAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OKTL_EMPL": {
+ "name": "OKTL_EMPL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGBICD": {
+ "name": "ORGBICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGCOMPCD": {
+ "name": "ORGCOMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGCORPCD": {
+ "name": "ORGCORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGDEPTCD": {
+ "name": "ORGDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGPDEPCD": {
+ "name": "ORGPDEPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PAYPLC": {
+ "name": "PAYPLC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDEPTCD": {
+ "name": "PDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTLCODE": {
+ "name": "PSTLCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RETIRE": {
+ "name": "RETIRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SEX": {
+ "name": "SEX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SINGLEID": {
+ "name": "SINGLEID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SINGLRQ": {
+ "name": "SINGLRQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOCIALID": {
+ "name": "SOCIALID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOCIALID_DECR": {
+ "name": "SOCIALID_DECR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOJRNEMP": {
+ "name": "SOJRNEMP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNUM": {
+ "name": "TELNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TMPJDIV": {
+ "name": "TMPJDIV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USEDSYS": {
+ "name": "USEDSYS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALFROMDT": {
+ "name": "VALFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALTODT": {
+ "name": "VALTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WFREQUIRE": {
+ "name": "WFREQUIRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WORKPLC": {
+ "name": "WORKPLC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZPRFLG": {
+ "name": "ZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBUKRS": {
+ "name": "ZZBUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_unique": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "EMPID"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GTEXT": {
+ "name": "GTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BINM": {
+ "name": "BINM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COUNTRYNM": {
+ "name": "COUNTRYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "PCCD": {
+ "name": "PCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "KTEXT": {
+ "name": "KTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBGRDNM": {
+ "name": "JOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBDUTYNM": {
+ "name": "GJOBDUTYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBGRDNM": {
+ "name": "GJOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ISEXECUT": {
+ "name": "ISEXECUT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDTYPE": {
+ "name": "JOBGRDTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBNM": {
+ "name": "GJOBNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GNNM": {
+ "name": "GNNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBDUTYNM": {
+ "name": "JOBDUTYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ISEXECUT": {
+ "name": "ISEXECUT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDNM": {
+ "name": "JOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDTYPE": {
+ "name": "JOBGRDTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBNM": {
+ "name": "JOBNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BINM": {
+ "name": "BINM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADTL_01": {
+ "name": "ADTL_01",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADTL_02": {
+ "name": "ADTL_02",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "GRPCD": {
+ "name": "GRPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAINCD": {
+ "name": "MAINCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VALIDFROMDT": {
+ "name": "VALIDFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDTODT": {
+ "name": "VALIDTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_unique": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "GRPCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME",
+ "schema": "mdg",
+ "columns": {
+ "GRPCD": {
+ "name": "GRPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "NAME": {
+ "name": "NAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_GRPCD_EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_fk": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_GRPCD_EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_fk",
+ "tableFrom": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME",
+ "tableTo": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "GRPCD"
+ ],
+ "columnsTo": [
+ "GRPCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL": {
+ "name": "EQUP_MASTER_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EQUP_MASTER_MATL_MATNR_unique": {
+ "name": "EQUP_MASTER_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_CHARASGN": {
+ "name": "EQUP_MASTER_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_CHARASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_CHARASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_CHARASGN",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_CLASSASGN": {
+ "name": "EQUP_MASTER_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_CLASSASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_CLASSASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_CLASSASGN",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_DESC": {
+ "name": "EQUP_MASTER_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_DESC_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_DESC_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_DESC",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_PLNT": {
+ "name": "EQUP_MASTER_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_PLNT_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_PLNT_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_PLNT",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_UNIT": {
+ "name": "EQUP_MASTER_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_UNIT_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_UNIT_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_UNIT",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL": {
+ "name": "MATERIAL_MASTER_PART_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZACT": {
+ "name": "ZZACT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCERT": {
+ "name": "ZZCERT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZINSP": {
+ "name": "ZZINSP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMMTYP": {
+ "name": "ZZMMTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMRC": {
+ "name": "ZZMRC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPJT": {
+ "name": "ZZPJT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPLMID": {
+ "name": "ZZPLMID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRCD_SCV_CTLP": {
+ "name": "ZZPRCD_SCV_CTLP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREPMAT": {
+ "name": "ZZREPMAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_DIA": {
+ "name": "ZZREP_DIA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_DIA_UOM": {
+ "name": "ZZREP_DIA_UOM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_ITM_MATL": {
+ "name": "ZZREP_ITM_MATL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSMID": {
+ "name": "ZZSMID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTL": {
+ "name": "ZZSTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MATERIAL_MASTER_PART_MATL_MATNR_unique": {
+ "name": "MATERIAL_MASTER_PART_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_CHARASGN": {
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_CHARASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_CHARASGN",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_CLASSASGN": {
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_CLASSASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_CLASSASGN",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_DESC": {
+ "name": "MATERIAL_MASTER_PART_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_DESC_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_DESC_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_DESC",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_PLNT": {
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_PLNT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_PLNT",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_UNIT": {
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BREIT": {
+ "name": "BREIT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOEHE": {
+ "name": "HOEHE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAENG": {
+ "name": "LAENG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLUM": {
+ "name": "VOLUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_UNIT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_UNIT",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE": {
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_CD": {
+ "name": "MAT_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAT_ID": {
+ "name": "MAT_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_MAT_CD_unique": {
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_MAT_CD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MAT_CD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL": {
+ "name": "MODEL_MASTER_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKAR": {
+ "name": "ZZDOKAR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKNR": {
+ "name": "ZZDOKNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKTL": {
+ "name": "ZZDOKTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKVR": {
+ "name": "ZZDOKVR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMMTYP": {
+ "name": "ZZMMTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MODEL_MASTER_MATL_MATNR_unique": {
+ "name": "MODEL_MASTER_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_CHARASGN": {
+ "name": "MODEL_MASTER_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_CHARASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_CHARASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_CHARASGN",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_CLASSASGN": {
+ "name": "MODEL_MASTER_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_CLASSASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_CLASSASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_CLASSASGN",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_DESC": {
+ "name": "MODEL_MASTER_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_DESC_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_DESC_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_DESC",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_PLNT": {
+ "name": "MODEL_MASTER_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_PLNT_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_PLNT_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_PLNT",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_UNIT": {
+ "name": "MODEL_MASTER_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BREIT": {
+ "name": "BREIT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOEHE": {
+ "name": "HOEHE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAENG": {
+ "name": "LAENG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLUM": {
+ "name": "VOLUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_UNIT_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_UNIT_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_UNIT",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_CCTR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ABTEI": {
+ "name": "ABTEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ANRED": {
+ "name": "ANRED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZER": {
+ "name": "BKZER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZKP": {
+ "name": "BKZKP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZKS": {
+ "name": "BKZKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZOB": {
+ "name": "BKZOB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BUKRS": {
+ "name": "BUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CCTR": {
+ "name": "CCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATAB": {
+ "name": "DATAB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATBI": {
+ "name": "DATBI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATLT": {
+ "name": "DATLT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DRNAM": {
+ "name": "DRNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FUNC_AREA": {
+ "name": "FUNC_AREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GSBER": {
+ "name": "GSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KHINR": {
+ "name": "KHINR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOKRS": {
+ "name": "KOKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KOSAR": {
+ "name": "KOSAR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAND1": {
+ "name": "LAND1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MGEFL": {
+ "name": "MGEFL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME1": {
+ "name": "NAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME2": {
+ "name": "NAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME3": {
+ "name": "NAME3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME4": {
+ "name": "NAME4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORT01": {
+ "name": "ORT01",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORT02": {
+ "name": "ORT02",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PFACH": {
+ "name": "PFACH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZER": {
+ "name": "PKZER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZKP": {
+ "name": "PKZKP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZKS": {
+ "name": "PKZKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTL2": {
+ "name": "PSTL2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTLZ": {
+ "name": "PSTLZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGIO": {
+ "name": "REGIO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STRAS": {
+ "name": "STRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELBX": {
+ "name": "TELBX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELF1": {
+ "name": "TELF1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELF2": {
+ "name": "TELF2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELFX": {
+ "name": "TELFX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELTX": {
+ "name": "TELTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELX1": {
+ "name": "TELX1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXJCD": {
+ "name": "TXJCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK": {
+ "name": "VERAK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK_USE": {
+ "name": "VERAK_USE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VMETH": {
+ "name": "VMETH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS": {
+ "name": "WAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBRANCH": {
+ "name": "ZZBRANCH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFCTRI": {
+ "name": "ZZFCTRI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSECCODE": {
+ "name": "ZZSECCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSEGMENT": {
+ "name": "ZZSEGMENT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "CCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT",
+ "schema": "mdg",
+ "columns": {
+ "CCTR": {
+ "name": "CCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "KTEXT": {
+ "name": "KTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_fk": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_fk",
+ "tableFrom": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT",
+ "tableTo": "ORGANIZATION_MASTER_HRHMTB_CCTR",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "CCTR"
+ ],
+ "columnsTo": [
+ "CCTR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "CCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_PCTR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ABTEI": {
+ "name": "ABTEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATAB": {
+ "name": "DATAB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATBI": {
+ "name": "DATBI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KHINR": {
+ "name": "KHINR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOKRS": {
+ "name": "KOKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LOCK_IND": {
+ "name": "LOCK_IND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PCTR": {
+ "name": "PCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SEGMENT": {
+ "name": "SEGMENT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXJCD": {
+ "name": "TXJCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK": {
+ "name": "VERAK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK_USE": {
+ "name": "VERAK_USE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_PCTR_PCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR_PCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "PCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZBUKRS": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CURR_BUKR": {
+ "name": "CURR_BUKR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBUKRS": {
+ "name": "ZBUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZBUTXT": {
+ "name": "ZZBUTXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCITY": {
+ "name": "ZZCITY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCOUNTRY": {
+ "name": "ZZCOUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLANGU": {
+ "name": "ZZLANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_ZBUKRS_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_ZBUKRS_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZBUKRS"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZEKGRP": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZEKGRP": {
+ "name": "ZEKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKNAM": {
+ "name": "ZZEKNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKTEL": {
+ "name": "ZZEKTEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEMPNUM": {
+ "name": "ZZEMPNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSINGLE": {
+ "name": "ZZSINGLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZTELFX": {
+ "name": "ZZTELFX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZTEL_NUM": {
+ "name": "ZZTEL_NUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_ZEKGRP_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_ZEKGRP_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZEKGRP"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZEKORG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZEKORG": {
+ "name": "ZEKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKOTX": {
+ "name": "ZZEKOTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZEKORG_ZEKORG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG_ZEKORG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZEKORG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZGSBER": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZGSBER": {
+ "name": "ZGSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZGSBER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT",
+ "schema": "mdg",
+ "columns": {
+ "ZGSBER": {
+ "name": "ZGSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LANGU": {
+ "name": "LANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TXTMI": {
+ "name": "TXTMI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_fk": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_fk",
+ "tableFrom": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT",
+ "tableTo": "ORGANIZATION_MASTER_HRHMTB_ZGSBER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "ZGSBER"
+ ],
+ "columnsTo": [
+ "ZGSBER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZGSBER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZLGORT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZLGORT": {
+ "name": "ZLGORT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZWERKS": {
+ "name": "ZWERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLGOBE": {
+ "name": "ZZLGOBE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZLGORT_ZLGORT_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT_ZLGORT_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZLGORT"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZSPART": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZSPART": {
+ "name": "ZSPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZSPART_ZSPART_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART_ZSPART_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZSPART"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKBUR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CTRY_SOFF": {
+ "name": "CTRY_SOFF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_SOFF": {
+ "name": "LANG_SOFF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZVKBUR": {
+ "name": "ZVKBUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_ZVKBUR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_ZVKBUR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKBUR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKGRP": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVKGRP": {
+ "name": "ZVKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_ZVKGRP_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_ZVKGRP_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKGRP"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKORG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVKORG": {
+ "name": "ZVKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZBOAVO": {
+ "name": "ZZBOAVO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZKUNNR": {
+ "name": "ZZKUNNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZVKOKL": {
+ "name": "ZZVKOKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZWAERS": {
+ "name": "ZZWAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKORG_ZVKORG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG_ZVKORG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKORG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVSTEL": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ALAN_VSTE": {
+ "name": "ALAN_VSTE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AZON_VSTE": {
+ "name": "AZON_VSTE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTRY_SHPT": {
+ "name": "CTRY_SHPT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_SHPT": {
+ "name": "LANG_SHPT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZVSTEL": {
+ "name": "ZVSTEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFABKL": {
+ "name": "ZZFABKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAZBS": {
+ "name": "ZZLAZBS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZRIZBS": {
+ "name": "ZZRIZBS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_ZVSTEL_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_ZVSTEL_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVSTEL"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVTWEG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVTWEG": {
+ "name": "ZVTWEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_ZVTWEG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_ZVTWEG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVTWEG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZWERKS": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CTRY_PLNT": {
+ "name": "CTRY_PLNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_PLNT": {
+ "name": "LANG_PLNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZWERKS": {
+ "name": "ZWERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFABKL": {
+ "name": "ZZFABKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME1": {
+ "name": "ZZNAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME2": {
+ "name": "ZZNAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZWERKS_ZWERKS_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS_ZWERKS_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZWERKS"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.PROJECT_MASTER_CMCTB_PROJ_MAST": {
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AS_GRNT_PRD": {
+ "name": "AS_GRNT_PRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZLOC_CD": {
+ "name": "BIZLOC_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_DMN": {
+ "name": "BIZ_DMN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BP_DL_DT": {
+ "name": "BP_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHN_PROJ_TP": {
+ "name": "CHN_PROJ_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_CNTN_YN": {
+ "name": "CNRT_CNTN_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DL_DT": {
+ "name": "CNRT_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DT": {
+ "name": "CNRT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_RESV_YN": {
+ "name": "CNRT_RESV_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_PO_NO": {
+ "name": "CSTM_PO_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIGT_PDT_GRP": {
+ "name": "DIGT_PDT_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_BF_PROJ_NM": {
+ "name": "DL_BF_PROJ_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_CSTM_CD": {
+ "name": "DL_CSTM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_CD": {
+ "name": "DOCK_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_CHRGR": {
+ "name": "DSN_CHRGR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_GRNT_FN_DT": {
+ "name": "FIN_GRNT_FN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GENT_CNT": {
+ "name": "GENT_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOV": {
+ "name": "GOV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRNT_STDT": {
+ "name": "GRNT_STDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IMO_NO": {
+ "name": "IMO_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_NO": {
+ "name": "INQY_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_SEQ": {
+ "name": "INQY_SEQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IO_GB": {
+ "name": "IO_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNG_ACOT_DMN": {
+ "name": "MNG_ACOT_DMN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_ENGN_TP_CD": {
+ "name": "MN_ENGN_TP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSHIP_NO": {
+ "name": "MSHIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTTP": {
+ "name": "NTTP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_FN_DT": {
+ "name": "ORDR_GRNT_FN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_PRD": {
+ "name": "ORDR_GRNT_PRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_1": {
+ "name": "OWN_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_AB": {
+ "name": "OWN_AB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_NM": {
+ "name": "OWN_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_LVL_4": {
+ "name": "PDT_LVL_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRGS_STAT": {
+ "name": "PRGS_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_DT": {
+ "name": "PROJ_CRTE_REQ_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_EMPNO": {
+ "name": "PROJ_CRTE_REQ_EMPNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_PLN_DT": {
+ "name": "PROJ_DL_PLN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_RT_DT": {
+ "name": "PROJ_DL_RT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DSC": {
+ "name": "PROJ_DSC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DTL_TP": {
+ "name": "PROJ_DTL_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_ETC_TP": {
+ "name": "PROJ_ETC_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_GB": {
+ "name": "PROJ_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PROJ_PRGS_YN": {
+ "name": "PROJ_PRGS_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PROF": {
+ "name": "PROJ_PROF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_SCP": {
+ "name": "PROJ_SCP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_WBS_TP": {
+ "name": "PROJ_WBS_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRO_PROJ_NO": {
+ "name": "PRO_PROJ_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REF_NO": {
+ "name": "REF_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RLTD_PROJ": {
+ "name": "RLTD_PROJ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RL_DL_DT": {
+ "name": "RL_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SA_DT": {
+ "name": "SA_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_NO": {
+ "name": "SERS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_YN": {
+ "name": "SERS_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE": {
+ "name": "SHTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_GRP": {
+ "name": "SHTYPE_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND": {
+ "name": "SKND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRC_SYS_ID": {
+ "name": "SRC_SYS_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STDT": {
+ "name": "STDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_ACOT_CLSD_DT": {
+ "name": "SYS_ACOT_CLSD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_CNRT_CNT": {
+ "name": "TOT_CNRT_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WP_PROJ_TP": {
+ "name": "WP_PROJ_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "PROJECT_MASTER_CMCTB_PROJ_MAST_PROJ_NO_unique": {
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST_PROJ_NO_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "PROJ_NO"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER": {
+ "name": "VENDOR_MASTER_BP_HEADER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "VENDOR_MASTER_BP_HEADER_VNDRCD_unique": {
+ "name": "VENDOR_MASTER_BP_HEADER_VNDRCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "VNDRCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRNO": {
+ "name": "ADDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_TMZ": {
+ "name": "ADR_TMZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAX_JRDT_ZONE_CD": {
+ "name": "TAX_JRDT_ZONE_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_TAXNUM": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP_TP": {
+ "name": "ACNT_GRP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZR_NO": {
+ "name": "BIZR_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_CD": {
+ "name": "BIZ_UOM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_NM": {
+ "name": "BIZ_UOM_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_REG_NO": {
+ "name": "CO_REG_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_VLM": {
+ "name": "CO_VLM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_HOLD_ORDR": {
+ "name": "DEL_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_CD": {
+ "name": "DMST_TOP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_NM": {
+ "name": "DMST_TOP_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DNS_NO": {
+ "name": "DNS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_TP": {
+ "name": "DOC_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_VER": {
+ "name": "DOC_VER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIR_NM": {
+ "name": "FIR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_CD": {
+ "name": "GBL_TOP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_NM": {
+ "name": "GBL_TOP_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GIRO_VNDR_ORDR": {
+ "name": "GIRO_VNDR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INB_FLAG": {
+ "name": "INB_FLAG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_LCTN_CHK_NUM": {
+ "name": "INTL_LCTN_CHK_NUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS_CD": {
+ "name": "OVLAP_CAUS_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNT_VNDRCD": {
+ "name": "PTNT_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTN_DOC": {
+ "name": "PTN_DOC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_EMAIL": {
+ "name": "QLT_CHRGR_EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_NM": {
+ "name": "QLT_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_TELNO": {
+ "name": "QLT_CHRGR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_TM": {
+ "name": "REG_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_RESNO": {
+ "name": "REPR_RESNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TEL_NO": {
+ "name": "REP_TEL_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SB_WKA_SEQ": {
+ "name": "SB_WKA_SEQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCETX_RP_SEX_KEY": {
+ "name": "SRCETX_RP_SEX_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_CD_4": {
+ "name": "TX_CD_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VAT_REG_NO": {
+ "name": "VAT_REG_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNO": {
+ "name": "VNDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ACOT_CHRGR_FAXNO": {
+ "name": "ACOT_CHRGR_FAXNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_TELNO": {
+ "name": "ACOT_CHRGR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUTH_GRP": {
+ "name": "AUTH_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BF_VNDRCD": {
+ "name": "BF_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CSTM_VNDR_CLR_ORDR": {
+ "name": "CSTM_VNDR_CLR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTL_ACNT": {
+ "name": "CTL_ACNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_ACT_DT": {
+ "name": "FIN_IR_ACT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_CALC_DT": {
+ "name": "FIN_IR_CALC_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IATA_BIC_GB": {
+ "name": "IATA_BIC_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOGST_VNDR_TP": {
+ "name": "LOGST_VNDR_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEMO": {
+ "name": "MEMO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MIN_ORDR": {
+ "name": "MIN_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_CHRGR_EMAIL": {
+ "name": "MK_CHRGR_EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MOFFC_ACNT_NO": {
+ "name": "MOFFC_ACNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_INVC_ORDR": {
+ "name": "OVLAP_INVC_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLN_GRP": {
+ "name": "PLN_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TP": {
+ "name": "REP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_HOLD_ORDR": {
+ "name": "SPLY_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_MTHD": {
+ "name": "SPLY_MTHD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRT_SPLY_ORDR": {
+ "name": "SPRT_SPLY_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_CD": {
+ "name": "SRCE_TX_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NTN_CD": {
+ "name": "SRCE_TX_NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_BANK_SHRT_KEY": {
+ "name": "TRD_BANK_SHRT_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_ACNT_NO": {
+ "name": "VNDR_ACNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CHRGR_NM": {
+ "name": "VNDR_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DCHAG_CAUS": {
+ "name": "DCHAG_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CERT_NO": {
+ "name": "DCHAG_CERT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ED_DT": {
+ "name": "DCHAG_ED_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ST_DT": {
+ "name": "DCHAG_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RECIP_TP": {
+ "name": "RECIP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_IDENT_NO": {
+ "name": "SRCE_TX_IDENT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NO": {
+ "name": "SRCE_TX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_REL_ORDR": {
+ "name": "SRCE_TX_REL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_TP": {
+ "name": "SRCE_TX_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AT_PUR_ORD_ORDR": {
+ "name": "AT_PUR_ORD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CALC_SHM_GRP": {
+ "name": "CALC_SHM_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNFM_CTL_KEY": {
+ "name": "CNFM_CTL_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GR_BSE_INVC_VR": {
+ "name": "GR_BSE_INVC_VR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORD_CNFM_REQ_ORDR": {
+ "name": "ORD_CNFM_REQ_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_CAUS": {
+ "name": "PUR_HOLD_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_ORD_CUR": {
+ "name": "PUR_ORD_CUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_CHRGR_NM": {
+ "name": "SALE_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TELNO": {
+ "name": "VNDR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_REF_VNDRCD": {
+ "name": "ETC_REF_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_NO": {
+ "name": "PLNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDR_SUB_NO": {
+ "name": "VNDR_SUB_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "soap.soap_logs": {
+ "name": "soap_logs",
+ "schema": "soap",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "direction": {
+ "name": "direction",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "system": {
+ "name": "system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interface": {
+ "name": "interface",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endedAt": {
+ "name": "endedAt",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isSuccess": {
+ "name": "isSuccess",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "requestData": {
+ "name": "requestData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responseData": {
+ "name": "responseData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd": {
+ "name": "cmctb_cd",
+ "schema": "nonsap",
+ "columns": {
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD": {
+ "name": "CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD2": {
+ "name": "CD2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD3": {
+ "name": "CD3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "USR_DF_CHAR_1": {
+ "name": "USR_DF_CHAR_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_2": {
+ "name": "USR_DF_CHAR_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_3": {
+ "name": "USR_DF_CHAR_3",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_4": {
+ "name": "USR_DF_CHAR_4",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_5": {
+ "name": "USR_DF_CHAR_5",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_6": {
+ "name": "USR_DF_CHAR_6",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_7": {
+ "name": "USR_DF_CHAR_7",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_8": {
+ "name": "USR_DF_CHAR_8",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_9": {
+ "name": "USR_DF_CHAR_9",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_10": {
+ "name": "USR_DF_CHAR_10",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_11": {
+ "name": "USR_DF_CHAR_11",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_12": {
+ "name": "USR_DF_CHAR_12",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_13": {
+ "name": "USR_DF_CHAR_13",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_14": {
+ "name": "USR_DF_CHAR_14",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_15": {
+ "name": "USR_DF_CHAR_15",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_16": {
+ "name": "USR_DF_CHAR_16",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_17": {
+ "name": "USR_DF_CHAR_17",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_18": {
+ "name": "USR_DF_CHAR_18",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_19": {
+ "name": "USR_DF_CHAR_19",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_20": {
+ "name": "USR_DF_CHAR_20",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_1": {
+ "name": "USR_DF_CHK_1",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_2": {
+ "name": "USR_DF_CHK_2",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_3": {
+ "name": "USR_DF_CHK_3",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_4": {
+ "name": "USR_DF_CHK_4",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_5": {
+ "name": "USR_DF_CHK_5",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_6": {
+ "name": "USR_DF_CHK_6",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_7": {
+ "name": "USR_DF_CHK_7",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_8": {
+ "name": "USR_DF_CHK_8",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_1": {
+ "name": "USR_DF_DT_1",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_2": {
+ "name": "USR_DF_DT_2",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_3": {
+ "name": "USR_DF_DT_3",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_4": {
+ "name": "USR_DF_DT_4",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_1": {
+ "name": "USR_DF_TM_1",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_2": {
+ "name": "USR_DF_TM_2",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_3": {
+ "name": "USR_DF_TM_3",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_4": {
+ "name": "USR_DF_TM_4",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd_clf": {
+ "name": "cmctb_cd_clf",
+ "schema": "nonsap",
+ "columns": {
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd_clf_nm": {
+ "name": "cmctb_cd_clf_nm",
+ "schema": "nonsap",
+ "columns": {
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF_NM": {
+ "name": "CD_CLF_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRP_DSC": {
+ "name": "GRP_DSC",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cdnm": {
+ "name": "cmctb_cdnm",
+ "schema": "nonsap",
+ "columns": {
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD": {
+ "name": "CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD2": {
+ "name": "CD2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD3": {
+ "name": "CD3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CDNM": {
+ "name": "CDNM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRP_DSC": {
+ "name": "GRP_DSC",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_addr": {
+ "name": "cmctb_customer_addr",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOUSE_NR1": {
+ "name": "HOUSE_NR1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_cfpn": {
+ "name": "cmctb_customer_cfpn",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_compny": {
+ "name": "cmctb_customer_compny",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AR_ACNT_HDL_GB": {
+ "name": "AR_ACNT_HDL_GB",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AMT_RNE_GB": {
+ "name": "AMT_RNE_GB",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_PAY_FRM": {
+ "name": "VNDR_PAY_FRM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BILL_PAY_COND_CD": {
+ "name": "BILL_PAY_COND_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BILL_PAY_BLOC_CD": {
+ "name": "BILL_PAY_BLOC_CD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_general": {
+ "name": "cmctb_customer_general",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS": {
+ "name": "OVLAP_CAUS",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_TP": {
+ "name": "CSTM_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_BLOCK": {
+ "name": "DEL_BLOCK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COND_GRP_1": {
+ "name": "COND_GRP_1",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_GRP_NM": {
+ "name": "CSTM_GRP_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_2": {
+ "name": "TX_NO_2",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_3": {
+ "name": "TX_NO_3",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_4": {
+ "name": "TX_NO_4",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_REG_NO": {
+ "name": "TX_REG_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BA_CD": {
+ "name": "BA_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCH_COND_1": {
+ "name": "SRCH_COND_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCH_COND_2": {
+ "name": "SRCH_COND_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_DISP_NM": {
+ "name": "CITY_DISP_NM",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRM_CD": {
+ "name": "CRM_CD",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IN_FLAG": {
+ "name": "IN_FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDST_CD": {
+ "name": "INDST_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_TP": {
+ "name": "TX_NO_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DTM": {
+ "name": "REG_DTM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTGT_CD": {
+ "name": "FTGT_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTGT_NM": {
+ "name": "FTGT_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTDT_CD": {
+ "name": "FTDT_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTDT_NM": {
+ "name": "FTDT_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTBU_CD": {
+ "name": "FTBU_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTBU_NM": {
+ "name": "FTBU_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_repremail": {
+ "name": "cmctb_customer_repremail",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprfax": {
+ "name": "cmctb_customer_reprfax",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprtel": {
+ "name": "cmctb_customer_reprtel",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprurl": {
+ "name": "cmctb_customer_reprurl",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_sorg": {
+ "name": "cmctb_customer_sorg",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_REGN": {
+ "name": "SALE_REGN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_OFC": {
+ "name": "SALE_OFC",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_GRP": {
+ "name": "CSTM_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSBL": {
+ "name": "PSBL",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_CUR": {
+ "name": "TRD_CUR",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXRAT_TP": {
+ "name": "EXRAT_TP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRC_PRCS_DSC_CD": {
+ "name": "PRC_PRCS_DSC_CD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_STAT_GRP": {
+ "name": "CSTM_STAT_GRP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHIPMT_COND": {
+ "name": "SHIPMT_COND",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAX_TRD_QTY": {
+ "name": "MAX_TRD_QTY",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(84)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_ASGN_GRP": {
+ "name": "ACNT_ASGN_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_taxcd": {
+ "name": "cmctb_customer_taxcd",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DPRT_NTN": {
+ "name": "DPRT_NTN",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_CTG": {
+ "name": "TX_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CSTM_TX_CLF": {
+ "name": "CSTM_TX_CLF",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_taxnum": {
+ "name": "cmctb_customer_taxnum",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_bse": {
+ "name": "cmctb_mat_bse",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SM_CD": {
+ "name": "SM_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_ID": {
+ "name": "MAT_ID",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_TP": {
+ "name": "MAT_TP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_GB": {
+ "name": "MAT_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_DTL": {
+ "name": "MAT_DTL",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_DTL_SPEC": {
+ "name": "MAT_DTL_SPEC",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATL": {
+ "name": "MATL",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OLD_MAT_NO": {
+ "name": "OLD_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SBST_MAT_NO": {
+ "name": "SBST_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UOM": {
+ "name": "UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MRC": {
+ "name": "MRC",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STOR_MAT_ORDR": {
+ "name": "STOR_MAT_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STYPE": {
+ "name": "STYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS": {
+ "name": "CLS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGT": {
+ "name": "WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NET_WGT": {
+ "name": "NET_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGT_UOM": {
+ "name": "WGT_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH": {
+ "name": "LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH_2": {
+ "name": "LTH_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH": {
+ "name": "WTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH_2": {
+ "name": "WTH_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "THK": {
+ "name": "THK",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STD": {
+ "name": "STD",
+ "type": "varchar(70)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROF_STD": {
+ "name": "PROF_STD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CBL_OUT_DIA": {
+ "name": "CBL_OUT_DIA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTRM_MAT_YN": {
+ "name": "LTRM_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNT_AREA": {
+ "name": "PNT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTIN_AREA": {
+ "name": "PNTIN_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTIN_SPEC": {
+ "name": "PNTIN_SPEC",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_AREA": {
+ "name": "PNTOUT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_1": {
+ "name": "PNTOUT_SPEC_1",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_2": {
+ "name": "PNTOUT_SPEC_2",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_3": {
+ "name": "PNTOUT_SPEC_3",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RT_INSPEC": {
+ "name": "RT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UT_INSPEC": {
+ "name": "UT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MT_INSPEC": {
+ "name": "MT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PT_INSPEC": {
+ "name": "PT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_DWG_NO": {
+ "name": "MK_DWG_NO",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CUT_DWG_NO": {
+ "name": "CUT_DWG_NO",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_SPL_NO": {
+ "name": "PIPE_SPL_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_LINE_NO": {
+ "name": "PIPE_LINE_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_CLAS": {
+ "name": "PIPE_CLAS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FLUID_KND": {
+ "name": "FLUID_KND",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_ITM_MATL": {
+ "name": "REP_ITM_MATL",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA": {
+ "name": "REP_DIA",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA_UOM": {
+ "name": "REP_DIA_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_SCH": {
+ "name": "REP_SCH",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA_LTH": {
+ "name": "REP_DIA_LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DBLN_GB": {
+ "name": "DBLN_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_GRD": {
+ "name": "PIPE_GRD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HTRET_YN": {
+ "name": "HTRET_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BA_GALV_SPEC": {
+ "name": "BA_GALV_SPEC",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SSIDE_YN": {
+ "name": "SSIDE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTR_PIPE_YN": {
+ "name": "PNTR_PIPE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UBOLT_YN": {
+ "name": "UBOLT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTLP_PRCD_PNT": {
+ "name": "CTLP_PRCD_PNT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCD_SCV_CTLP": {
+ "name": "PRCD_SCV_CTLP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PMI_INSPEC": {
+ "name": "PMI_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTRPRS": {
+ "name": "WTRPRS",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLV_FIT_NO": {
+ "name": "VLV_FIT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_NO": {
+ "name": "TAG_NO",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_SB_NO": {
+ "name": "TAG_SB_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NM_PLATE_TP": {
+ "name": "NM_PLATE_TP",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NM_PLATE_SVC_NM": {
+ "name": "NM_PLATE_SVC_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VRCS_MAT_NO": {
+ "name": "VRCS_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRSM_FIT_NO": {
+ "name": "TRSM_FIT_NO",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLV_OPT_CD_LIST": {
+ "name": "VLV_OPT_CD_LIST",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_REQ_NO": {
+ "name": "PUR_REQ_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ITM_NO": {
+ "name": "ITM_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MDL_NO": {
+ "name": "MDL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BL_NO": {
+ "name": "BL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_EQP_NO": {
+ "name": "VNDR_EQP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BOX_NO": {
+ "name": "BOX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMT_NO": {
+ "name": "MMT_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INSTL_LOC": {
+ "name": "INSTL_LOC",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_EQP_YN": {
+ "name": "MN_EQP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIXED_MAT_YN": {
+ "name": "FIXED_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRE_YN": {
+ "name": "SPRE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOOL_YN": {
+ "name": "TOOL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CBL_YN": {
+ "name": "CBL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_INSTL_MAT_YN": {
+ "name": "OWN_INSTL_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NONINSTL_MAT_YN": {
+ "name": "NONINSTL_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BLK_NO": {
+ "name": "BLK_NO",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GYEL": {
+ "name": "GYEL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LNK_PTLST_NO": {
+ "name": "LNK_PTLST_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AREA": {
+ "name": "AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STOR_LOC": {
+ "name": "STOR_LOC",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SGUB_WGT": {
+ "name": "SGUB_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DGUB_WGT": {
+ "name": "DGUB_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_SKL": {
+ "name": "DSN_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RMK": {
+ "name": "RMK",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_DT": {
+ "name": "DEL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_STAT": {
+ "name": "MAT_STAT",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_SYS_NO": {
+ "name": "IF_SYS_NO",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_1": {
+ "name": "GLAND_SPEC_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_2": {
+ "name": "GLAND_SPEC_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_3": {
+ "name": "GLAND_SPEC_3",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MCT_MDLE_STD_1": {
+ "name": "MCT_MDLE_STD_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MCT_MDLE_STD_2": {
+ "name": "MCT_MDLE_STD_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BEELE_RISE": {
+ "name": "BEELE_RISE",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAX_DRUM_LTH": {
+ "name": "MAX_DRUM_LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DTM": {
+ "name": "AGR_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISPLN": {
+ "name": "DISPLN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LRG_KWK": {
+ "name": "LRG_KWK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTL_KWK": {
+ "name": "DTL_KWK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SP_INSP_GB": {
+ "name": "SP_INSP_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_4": {
+ "name": "PNTOUT_SPEC_4",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFE_MAT_NO": {
+ "name": "OFE_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFE_CAB_YN": {
+ "name": "OFE_CAB_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INSTL_PSB_CNT": {
+ "name": "INSTL_PSB_CNT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CUTL_ML_GB": {
+ "name": "CUTL_ML_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FCM_INSP": {
+ "name": "FCM_INSP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_DT": {
+ "name": "HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_LIFT_DT": {
+ "name": "HOLD_LIFT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_KND_GB": {
+ "name": "MAT_KND_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BATCH_MNG_ORDR": {
+ "name": "BATCH_MNG_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INPR_ID": {
+ "name": "FS_INPR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INP_DTM": {
+ "name": "FS_INP_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHGR_ID": {
+ "name": "FIN_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHG_DTM": {
+ "name": "FIN_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DWG_FILE_NM": {
+ "name": "DWG_FILE_NM",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_NO_CHG_DT": {
+ "name": "TAG_NO_CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SUB_EQP_YN": {
+ "name": "SUB_EQP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATT_MAT_YN": {
+ "name": "ATT_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_REV_NO": {
+ "name": "DSN_REV_NO",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR1": {
+ "name": "USR_DF_CHAR1",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR2": {
+ "name": "USR_DF_CHAR2",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR3": {
+ "name": "USR_DF_CHAR3",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR4": {
+ "name": "USR_DF_CHAR4",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR5": {
+ "name": "USR_DF_CHAR5",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_clas": {
+ "name": "cmctb_mat_clas",
+ "schema": "nonsap",
+ "columns": {
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CLAS_NM": {
+ "name": "CLAS_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_DTL": {
+ "name": "CLAS_DTL",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRNT_CLAS_CD": {
+ "name": "PRNT_CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_LVL": {
+ "name": "CLAS_LVL",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UOM": {
+ "name": "UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STYPE": {
+ "name": "STYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRD_MATL": {
+ "name": "GRD_MATL",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSE_UOM": {
+ "name": "BSE_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_clas_spchar": {
+ "name": "cmctb_mat_clas_spchar",
+ "schema": "nonsap",
+ "columns": {
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_SEQ": {
+ "name": "SPCHAR_SEQ",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNDT_YN": {
+ "name": "MNDT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_clas_spchar_CLAS_CD_SPCHAR_CD_pk": {
+ "name": "cmctb_mat_clas_spchar_CLAS_CD_SPCHAR_CD_pk",
+ "columns": [
+ "CLAS_CD",
+ "SPCHAR_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_dsc": {
+ "name": "cmctb_mat_dsc",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAT_DTL": {
+ "name": "MAT_DTL",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_plnt": {
+ "name": "cmctb_mat_plnt",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PLNT": {
+ "name": "PLNT",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DELV_UOM": {
+ "name": "DELV_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EA_BTCH_ND_GB": {
+ "name": "EA_BTCH_ND_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_CLF": {
+ "name": "PRCR_CLF",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_CHRGR_CD": {
+ "name": "PUR_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_CHRGR_CD": {
+ "name": "PRCR_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOODS_CHRGR_CD": {
+ "name": "GOODS_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_LT": {
+ "name": "PUR_LT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MRP_TP": {
+ "name": "MRP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_STAT": {
+ "name": "MAT_STAT",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BULK_MAT_ORDR": {
+ "name": "BULK_MAT_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_TP": {
+ "name": "PRCR_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SFTY_STCK_QTY": {
+ "name": "SFTY_STCK_QTY",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SER_PROF": {
+ "name": "SER_PROF",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BATCH_MNG_ORDR": {
+ "name": "BATCH_MNG_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SP_PRCR_TP": {
+ "name": "SP_PRCR_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar": {
+ "name": "cmctb_mat_spchar",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_DTL": {
+ "name": "SPCHAR_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_CD": {
+ "name": "SPCHAR_VAL_CD",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_DTL": {
+ "name": "SPCHAR_VAL_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_NUM": {
+ "name": "SPCHAR_VAL_NUM",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_UOM": {
+ "name": "SPCHAR_VAL_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar_mast": {
+ "name": "cmctb_mat_spchar_mast",
+ "schema": "nonsap",
+ "columns": {
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_DTL": {
+ "name": "SPCHAR_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_TP": {
+ "name": "SPCHAR_TP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_UOM": {
+ "name": "SPCHAR_VAL_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_YN": {
+ "name": "SPCHAR_VAL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_GRP": {
+ "name": "SPCHAR_GRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_spchar_mast_SPCHAR_CD_pk": {
+ "name": "cmctb_mat_spchar_mast_SPCHAR_CD_pk",
+ "columns": [
+ "SPCHAR_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar_val": {
+ "name": "cmctb_mat_spchar_val",
+ "schema": "nonsap",
+ "columns": {
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_VAL_CD": {
+ "name": "SPCHAR_VAL_CD",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_VAL_DTL": {
+ "name": "SPCHAR_VAL_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_spchar_val_SPCHAR_CD_SPCHAR_VAL_CD_pk": {
+ "name": "cmctb_mat_spchar_val_SPCHAR_CD_SPCHAR_VAL_CD_pk",
+ "columns": [
+ "SPCHAR_CD",
+ "SPCHAR_VAL_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_uom": {
+ "name": "cmctb_mat_uom",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SBST_UOM": {
+ "name": "SBST_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CNVRT_FCTR_1": {
+ "name": "CNVRT_FCTR_1",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNVRT_FCTR_2": {
+ "name": "CNVRT_FCTR_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH": {
+ "name": "LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH": {
+ "name": "WTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HGT": {
+ "name": "HGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SZ_UOM": {
+ "name": "SZ_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_bizcls": {
+ "name": "cmctb_proj_bizcls",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_mast": {
+ "name": "cmctb_proj_mast",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MSHIP_NO": {
+ "name": "MSHIP_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_NO": {
+ "name": "SERS_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REF_NO": {
+ "name": "REF_NO",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND": {
+ "name": "SKND",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE": {
+ "name": "SHTYPE",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_CD": {
+ "name": "DOCK_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_1": {
+ "name": "OWN_1",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DT": {
+ "name": "CNRT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DL_DT": {
+ "name": "CNRT_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DSC": {
+ "name": "PROJ_DSC",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_GB": {
+ "name": "PROJ_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_NM": {
+ "name": "OWN_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_SKND2": {
+ "name": "NEW_SKND2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_AB": {
+ "name": "OWN_AB",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHINA_YN": {
+ "name": "CHINA_YN",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DTL_TP": {
+ "name": "PROJ_DTL_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PROF": {
+ "name": "PROJ_PROF",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_NO": {
+ "name": "INQY_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_SEQ": {
+ "name": "INQY_SEQ",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTTP": {
+ "name": "NTTP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RLTD_PROJ": {
+ "name": "RLTD_PROJ",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIGT_PDT_GRP": {
+ "name": "DIGT_PDT_GRP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WP_PROJ_TP": {
+ "name": "WP_PROJ_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_CNRT_CNT": {
+ "name": "TOT_CNRT_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_ETC_TP": {
+ "name": "PROJ_ETC_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRC_SYS_ID": {
+ "name": "SRC_SYS_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRGS_STAT": {
+ "name": "PRGS_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_CSTM_CD": {
+ "name": "DL_CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_LVL_4": {
+ "name": "PDT_LVL_4",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AS_GRNT_PRD": {
+ "name": "AS_GRNT_PRD",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RL_DL_DT": {
+ "name": "RL_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SA_DT": {
+ "name": "SA_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOV": {
+ "name": "GOV",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_BF_PROJ_NM": {
+ "name": "DL_BF_PROJ_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IMO_NO": {
+ "name": "IMO_NO",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZLOC_CD": {
+ "name": "BIZLOC_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNG_ACOT_DMN": {
+ "name": "MNG_ACOT_DMN",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_DMN": {
+ "name": "BIZ_DMN",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_CNTN_YN": {
+ "name": "CNRT_CNTN_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_RESV_YN": {
+ "name": "CNRT_RESV_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PRGS_YN": {
+ "name": "PROJ_PRGS_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_ACOT_CLSD_DT": {
+ "name": "SYS_ACOT_CLSD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_SCP": {
+ "name": "PROJ_SCP",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOA": {
+ "name": "LOA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_ENGN_TP_CD": {
+ "name": "MN_ENGN_TP_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPD": {
+ "name": "SPD",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GT": {
+ "name": "GT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BP_DL_DT": {
+ "name": "BP_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_GRP": {
+ "name": "SHTYPE_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_EMPNO": {
+ "name": "PROJ_CRTE_REQ_EMPNO",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_DT": {
+ "name": "PROJ_CRTE_REQ_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IO_GB": {
+ "name": "IO_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_PO_NO": {
+ "name": "CSTM_PO_NO",
+ "type": "varchar(35)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GENT_CNT": {
+ "name": "GENT_CNT",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_PRD": {
+ "name": "ORDR_GRNT_PRD",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_FN_DT": {
+ "name": "ORDR_GRNT_FN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_CHRGR": {
+ "name": "DSN_CHRGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_PROJ_NM": {
+ "name": "DL_AF_PROJ_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_RL_CLNT": {
+ "name": "DL_AF_RL_CLNT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_SHPSRV_SCP": {
+ "name": "DL_AF_SHPSRV_SCP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_NTTP": {
+ "name": "DL_AF_NTTP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_CLS": {
+ "name": "DL_AF_CLS",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_CALL_SIGN": {
+ "name": "DL_AF_CALL_SIGN",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_TEL_NO": {
+ "name": "DL_AF_TEL_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_FAX_NO": {
+ "name": "DL_AF_FAX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_EMAIL_ADR": {
+ "name": "DL_AF_EMAIL_ADR",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_WBS_TP": {
+ "name": "PROJ_WBS_TP",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHN_PROJ_TP": {
+ "name": "CHN_PROJ_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_GRNT_FN_DT": {
+ "name": "FIN_GRNT_FN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STDT": {
+ "name": "STDT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_YN": {
+ "name": "SERS_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRO_PROJ_NO": {
+ "name": "PRO_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PBSD_PROJ_NO": {
+ "name": "PBSD_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PBSD_SHIP_NM": {
+ "name": "PBSD_SHIP_NM",
+ "type": "varchar(150)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_PLN_DT": {
+ "name": "PROJ_DL_PLN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_RT_DT": {
+ "name": "PROJ_DL_RT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_AREA": {
+ "name": "TOT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXMPT_AREA": {
+ "name": "EXMPT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXMPT_RAT": {
+ "name": "EXMPT_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNCT_PROJ_NO": {
+ "name": "CNCT_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EQP_DTL_YN": {
+ "name": "EQP_DTL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXP_YN": {
+ "name": "EXP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACT_MH_YN": {
+ "name": "ACT_MH_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPEC": {
+ "name": "SPEC",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSGN_LIFE": {
+ "name": "DSGN_LIFE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WK_ENV_WT_VAL_YN": {
+ "name": "WK_ENV_WT_VAL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRNT_STDT": {
+ "name": "GRNT_STDT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TMH_ADPT_YN": {
+ "name": "TMH_ADPT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZV_YN": {
+ "name": "ZV_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SEC_YN": {
+ "name": "SEC_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_wbs": {
+ "name": "cmctb_proj_wbs",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "WBS_ELMT": {
+ "name": "WBS_ELMT",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "WBS_ELMT_NM": {
+ "name": "WBS_ELMT_NM",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_LVL": {
+ "name": "WBS_LVL",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FLAG": {
+ "name": "FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_INSD_ELMT": {
+ "name": "WBS_INSD_ELMT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HGRK_WBS_ELMT": {
+ "name": "HGRK_WBS_ELMT",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_STAT": {
+ "name": "SYS_STAT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_1": {
+ "name": "WBS_ELMT_1",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_2": {
+ "name": "WBS_ELMT_2",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_3": {
+ "name": "WBS_ELMT_3",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_4": {
+ "name": "WBS_ELMT_4",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_5": {
+ "name": "WBS_ELMT_5",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_6": {
+ "name": "WBS_ELMT_6",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_7": {
+ "name": "WBS_ELMT_7",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_8": {
+ "name": "WBS_ELMT_8",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_9": {
+ "name": "WBS_ELMT_9",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_10": {
+ "name": "WBS_ELMT_10",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_addr": {
+ "name": "cmctb_vendor_addr",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAX_JRDT_ZONE_CD": {
+ "name": "TAX_JRDT_ZONE_CD",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_TMZ": {
+ "name": "ADR_TMZ",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_compny": {
+ "name": "cmctb_vendor_compny",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CTL_ACNT": {
+ "name": "CTL_ACNT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLN_GRP": {
+ "name": "PLN_GRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BF_VNDRCD": {
+ "name": "BF_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_INVC_ORDR": {
+ "name": "OVLAP_INVC_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_MTHD": {
+ "name": "SPLY_MTHD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_HOLD_ORDR": {
+ "name": "SPLY_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_BANK_SHRT_KEY": {
+ "name": "TRD_BANK_SHRT_KEY",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NTN_CD": {
+ "name": "SRCE_TX_NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MIN_ORDR": {
+ "name": "MIN_ORDR",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRT_SPLY_ORDR": {
+ "name": "SPRT_SPLY_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_VNDR_CLR_ORDR": {
+ "name": "CSTM_VNDR_CLR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_CD": {
+ "name": "SRCE_TX_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IATA_BIC_GB": {
+ "name": "IATA_BIC_GB",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TP": {
+ "name": "REP_TP",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOGST_VNDR_TP": {
+ "name": "LOGST_VNDR_TP",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_ACNT_NO": {
+ "name": "VNDR_ACNT_NO",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CHRGR_NM": {
+ "name": "VNDR_CHRGR_NM",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_TELNO": {
+ "name": "ACOT_CHRGR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUTH_GRP": {
+ "name": "AUTH_GRP",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_CALC_DT": {
+ "name": "FIN_IR_CALC_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_ACT_DT": {
+ "name": "FIN_IR_ACT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_FAXNO": {
+ "name": "ACOT_CHRGR_FAXNO",
+ "type": "varchar(31)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_CHRGR_EMAIL": {
+ "name": "MK_CHRGR_EMAIL",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEMO": {
+ "name": "MEMO",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MOFFC_ACNT_NO": {
+ "name": "MOFFC_ACNT_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_vendor_compny_VNDRCD_CO_CD_pk": {
+ "name": "cmctb_vendor_compny_VNDRCD_CO_CD_pk",
+ "columns": [
+ "VNDRCD",
+ "CO_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_general": {
+ "name": "cmctb_vendor_general",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP_TP": {
+ "name": "ACNT_GRP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DTM": {
+ "name": "REG_DTM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TEL_NO": {
+ "name": "REP_TEL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_FAX_NO": {
+ "name": "REP_FAX_NO",
+ "type": "varchar(31)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZR_NO": {
+ "name": "BIZR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_REG_NO": {
+ "name": "CO_REG_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_CD_4": {
+ "name": "TX_CD_4",
+ "type": "varchar(54)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_INST_DT": {
+ "name": "CO_INST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TP": {
+ "name": "VNDR_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_CD": {
+ "name": "GBL_TOP_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_NM": {
+ "name": "GBL_TOP_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_CD": {
+ "name": "DMST_TOP_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_NM": {
+ "name": "DMST_TOP_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_CD": {
+ "name": "BIZ_UOM_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_NM": {
+ "name": "BIZ_UOM_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DNS_NO": {
+ "name": "DNS_NO",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VAT_REG_NO": {
+ "name": "VAT_REG_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GIRO_VNDR_ORDR": {
+ "name": "GIRO_VNDR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNT_VNDRCD": {
+ "name": "PTNT_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_NM": {
+ "name": "QLT_CHRGR_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_TELNO": {
+ "name": "QLT_CHRGR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_EMAIL": {
+ "name": "QLT_CHRGR_EMAIL",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SB_WKA_SEQ": {
+ "name": "SB_WKA_SEQ",
+ "type": "varchar(16)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS_CD": {
+ "name": "OVLAP_CAUS_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_TP": {
+ "name": "DOC_TP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTN_DOC": {
+ "name": "PTN_DOC",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_VER": {
+ "name": "DOC_VER",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INB_FLAG": {
+ "name": "INB_FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_HOLD_ORDR": {
+ "name": "DEL_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_LCTN_CHK_NUM": {
+ "name": "INTL_LCTN_CHK_NUM",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCETX_RP_SEX_KEY": {
+ "name": "SRCETX_RP_SEX_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CNRT_CHRGR_1": {
+ "name": "VNDR_CNRT_CHRGR_1",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CNRT_CHRGR_2": {
+ "name": "VNDR_CNRT_CHRGR_2",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_RESNO": {
+ "name": "REPR_RESNO",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_VLM": {
+ "name": "CO_VLM",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_grp": {
+ "name": "cmctb_vendor_grp",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_GRP_CD": {
+ "name": "BIZ_GRP_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER_ID": {
+ "name": "CRTER_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_inco": {
+ "name": "cmctb_vendor_inco",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDRNM": {
+ "name": "VNDRNM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRTNR_GB": {
+ "name": "PRTNR_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_CD": {
+ "name": "INCO_PRTNR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_1": {
+ "name": "INCO_PRTNR_WKA_1",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_2": {
+ "name": "INCO_PRTNR_WKA_2",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_3": {
+ "name": "INCO_PRTNR_WKA_3",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JBTYPE_CD": {
+ "name": "JBTYPE_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JBTYPE_CD_2": {
+ "name": "JBTYPE_CD_2",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDV_CO_GB": {
+ "name": "INDV_CO_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_FOND_YN": {
+ "name": "INCO_FOND_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_NO": {
+ "name": "DOCK_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OCMP_INP_DT": {
+ "name": "OCMP_INP_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_DUSE_DT": {
+ "name": "INCO_DUSE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDST_INS_PMRAT": {
+ "name": "INDST_INS_PMRAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_PFRM_GRAMT": {
+ "name": "CNRT_PFRM_GRAMT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGE_RAT": {
+ "name": "WGE_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_DEPTCD_1": {
+ "name": "CRSPD_DEPTCD_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_DEPTCD_2": {
+ "name": "CRSPD_DEPTCD_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_TEAM_BLNG": {
+ "name": "CRSPD_TEAM_BLNG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_ITM_1": {
+ "name": "INCO_PRTNR_ITM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_ITM_2": {
+ "name": "INCO_PRTNR_ITM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFC_LOC": {
+ "name": "OFC_LOC",
+ "type": "varchar(240)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_OCMP_CARR": {
+ "name": "REP_OCMP_CARR",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_DUSE_CAUS": {
+ "name": "INCO_DUSE_CAUS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_NO": {
+ "name": "TEL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR1": {
+ "name": "ADR1",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR2": {
+ "name": "ADR2",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OLD_VNDRCD": {
+ "name": "OLD_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TREE_NUM": {
+ "name": "TREE_NUM",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_USR_ID": {
+ "name": "CRTE_USR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_USR_ID": {
+ "name": "CHG_USR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UPR_JBTYPE": {
+ "name": "UPR_JBTYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBYBP": {
+ "name": "ZBYBP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RMK": {
+ "name": "RMK",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WDL_PLN_YN": {
+ "name": "WDL_PLN_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGE_DELY_DVL": {
+ "name": "WGE_DELY_DVL",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESCROW_YN": {
+ "name": "ESCROW_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_porg": {
+ "name": "cmctb_vendor_porg",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORD_CUR": {
+ "name": "PUR_ORD_CUR",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CALC_SHM_GRP": {
+ "name": "CALC_SHM_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GR_BSE_INVC_VR": {
+ "name": "GR_BSE_INVC_VR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AT_PUR_ORD_ORDR": {
+ "name": "AT_PUR_ORD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORD_CNFM_REQ_ORDR": {
+ "name": "ORD_CNFM_REQ_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_CHRGR_NM": {
+ "name": "SALE_CHRGR_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TELNO": {
+ "name": "VNDR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNFM_CTL_KEY": {
+ "name": "CNFM_CTL_KEY",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_CAUS": {
+ "name": "PUR_HOLD_CAUS",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_repremail": {
+ "name": "cmctb_vendor_repremail",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprfax": {
+ "name": "cmctb_vendor_reprfax",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprtel": {
+ "name": "cmctb_vendor_reprtel",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprurl": {
+ "name": "cmctb_vendor_reprurl",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_taxnum": {
+ "name": "cmctb_vendor_taxnum",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_vfpn": {
+ "name": "cmctb_vendor_vfpn",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDR_SUB_NO": {
+ "name": "VNDR_SUB_NO",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ETC_REF_VNDRCD": {
+ "name": "ETC_REF_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_whthx": {
+ "name": "cmctb_vendor_whthx",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SRCE_TX_TP": {
+ "name": "SRCE_TX_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SRCE_TX_REL_ORDR": {
+ "name": "SRCE_TX_REL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RECIP_TP": {
+ "name": "RECIP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_IDENT_NO": {
+ "name": "SRCE_TX_IDENT_NO",
+ "type": "varchar(16)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NO": {
+ "name": "SRCE_TX_NO",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CERT_NO": {
+ "name": "DCHAG_CERT_NO",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_RAT": {
+ "name": "DCHAG_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ST_DT": {
+ "name": "DCHAG_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ED_DT": {
+ "name": "DCHAG_ED_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CAUS": {
+ "name": "DCHAG_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.plftb_estm_proj_mast": {
+ "name": "plftb_estm_proj_mast",
+ "schema": "nonsap",
+ "columns": {
+ "ESTM_PROJ_NO": {
+ "name": "ESTM_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AGND_NO": {
+ "name": "AGND_NO",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_PROJ_NM": {
+ "name": "ESTM_PROJ_NM",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_CLS": {
+ "name": "BIZ_CLS",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REV_NO": {
+ "name": "REV_NO",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_TYPE": {
+ "name": "ESTM_TYPE",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWNER_CD": {
+ "name": "OWNER_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_CNT": {
+ "name": "SERS_CNT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND_CD": {
+ "name": "SKND_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_SIZE": {
+ "name": "SHTYPE_SIZE",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHRTR_CD": {
+ "name": "CHRTR_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NATN_CD": {
+ "name": "NATN_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_3": {
+ "name": "CLS_3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATA_CRTE_GB": {
+ "name": "DATA_CRTE_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INPR_ID": {
+ "name": "FS_INPR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INP_DTM": {
+ "name": "FS_INP_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHGR_ID": {
+ "name": "FIN_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHG_DTM": {
+ "name": "FIN_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_1": {
+ "name": "VSL_VAG_1",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_2": {
+ "name": "VSL_VAG_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_3": {
+ "name": "VSL_VAG_3",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_4": {
+ "name": "VSL_VAG_4",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_APP_ID": {
+ "name": "ESTM_AOM_APP_ID",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT": {
+ "name": "ESTM_AOM_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT_CHGR_ID": {
+ "name": "ESTM_AOM_STAT_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT_CHG_DTM": {
+ "name": "ESTM_AOM_STAT_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TRGT_YN": {
+ "name": "IF_TRGT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "plftb_estm_proj_mast_ESTM_PROJ_NO_pk": {
+ "name": "plftb_estm_proj_mast_ESTM_PROJ_NO_pk",
+ "columns": [
+ "ESTM_PROJ_NO"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "ecc.PR_INFORMATION_T_BID_HEADER": {
+ "name": "PR_INFORMATION_T_BID_HEADER",
+ "schema": "ecc",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PR_INFORMATION_T_BID_HEADER_id_seq",
+ "schema": "ecc",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANFNR": {
+ "name": "ANFNR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EKGRP": {
+ "name": "EKGRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EKORG": {
+ "name": "EKORG",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBSART": {
+ "name": "ZBSART",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZRFQ_TRS_DT": {
+ "name": "ZRFQ_TRS_DT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZRFQ_TRS_TM": {
+ "name": "ZRFQ_TRS_TM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "PR_INFORMATION_T_BID_HEADER_ANFNR_unique": {
+ "name": "PR_INFORMATION_T_BID_HEADER_ANFNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ANFNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "ecc.PR_INFORMATION_T_BID_ITEM": {
+ "name": "PR_INFORMATION_T_BID_ITEM",
+ "schema": "ecc",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PR_INFORMATION_T_BID_ITEM_id_seq",
+ "schema": "ecc",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANFNR": {
+ "name": "ANFNR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ANFPS": {
+ "name": "ANFPS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AUFNR": {
+ "name": "AUFNR",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BANFN": {
+ "name": "BANFN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BANPO": {
+ "name": "BANPO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BPRME": {
+ "name": "BPRME",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "numeric(15, 3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISMM": {
+ "name": "DISMM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EBELP": {
+ "name": "EBELP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KNTTP": {
+ "name": "KNTTP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOSTL": {
+ "name": "KOSTL",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LFDAT": {
+ "name": "LFDAT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MENGE": {
+ "name": "MENGE",
+ "type": "numeric(15, 3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PEINH": {
+ "name": "PEINH",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PERNR": {
+ "name": "PERNR",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POSID": {
+ "name": "POSID",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PREIS": {
+ "name": "PREIS",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSPID": {
+ "name": "PSPID",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SAKTO": {
+ "name": "SAKTO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXZ01": {
+ "name": "TXZ01",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS1": {
+ "name": "WAERS1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS2": {
+ "name": "WAERS2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZCON_NO_PO": {
+ "name": "ZCON_NO_PO",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZREQ_FN": {
+ "name": "ZREQ_FN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZREQ_PO": {
+ "name": "ZREQ_PO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZRSLT_AMT": {
+ "name": "ZRSLT_AMT",
+ "type": "numeric(17, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.employee": {
+ "name": "employee",
+ "schema": "knox",
+ "columns": {
+ "ep_id": {
+ "name": "ep_id",
+ "type": "varchar(25)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "employee_number": {
+ "name": "employee_number",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "given_name": {
+ "name": "given_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sir_name": {
+ "name": "sir_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_code": {
+ "name": "title_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_name": {
+ "name": "title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email_address": {
+ "name": "email_address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "employee_status": {
+ "name": "employee_status",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "employee_type": {
+ "name": "employee_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "account_status": {
+ "name": "account_status",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security_level": {
+ "name": "security_level",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_language": {
+ "name": "preferred_language",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "en_company_name": {
+ "name": "en_company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_department_name": {
+ "name": "en_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_discription": {
+ "name": "en_discription",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_full_name": {
+ "name": "en_full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_given_name": {
+ "name": "en_given_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_grade_name": {
+ "name": "en_grade_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_sir_name": {
+ "name": "en_sir_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_title_name": {
+ "name": "en_title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_name": {
+ "name": "grade_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_title_indi_code": {
+ "name": "grade_title_indi_code",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "job_name": {
+ "name": "job_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "real_name_yn": {
+ "name": "real_name_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "server_location": {
+ "name": "server_location",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_sort_order": {
+ "name": "title_sort_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "knox_employee_company_department_idx": {
+ "name": "knox_employee_company_department_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "department_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_number_idx": {
+ "name": "knox_employee_number_idx",
+ "columns": [
+ {
+ "expression": "employee_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_user_id_idx": {
+ "name": "knox_employee_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_email_idx": {
+ "name": "knox_employee_email_idx",
+ "columns": [
+ {
+ "expression": "email_address",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.organization": {
+ "name": "organization",
+ "schema": "knox",
+ "columns": {
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_level": {
+ "name": "department_level",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_order": {
+ "name": "department_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_company_name": {
+ "name": "en_company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_department_name": {
+ "name": "en_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_manager_title": {
+ "name": "en_manager_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_sub_org_code": {
+ "name": "en_sub_org_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "in_department_code": {
+ "name": "in_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "low_department_yn": {
+ "name": "low_department_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_id": {
+ "name": "manager_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_title": {
+ "name": "manager_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_language": {
+ "name": "preferred_language",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_org_code": {
+ "name": "sub_org_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_org_name": {
+ "name": "sub_org_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upr_department_code": {
+ "name": "upr_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_upr_department_name": {
+ "name": "en_upr_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upr_department_name": {
+ "name": "upr_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_department_yn": {
+ "name": "hidden_department_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corp_code": {
+ "name": "corp_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corp_name": {
+ "name": "corp_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_corp_name": {
+ "name": "en_corp_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "knox_org_company_idx": {
+ "name": "knox_org_company_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "organization_company_code_department_code_pk": {
+ "name": "organization_company_code_department_code_pk",
+ "columns": [
+ "company_code",
+ "department_code"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.title": {
+ "name": "title",
+ "schema": "knox",
+ "columns": {
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title_code": {
+ "name": "title_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title_name": {
+ "name": "title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_title_name": {
+ "name": "en_title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "knox_title_company_idx": {
+ "name": "knox_title_company_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "title_company_code_title_code_pk": {
+ "name": "title_company_code_title_code_pk",
+ "columns": [
+ "company_code",
+ "title_code"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_lines": {
+ "name": "approval_lines",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "aplns": {
+ "name": "aplns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_lines_createdBy_users_id_fk": {
+ "name": "approval_lines_createdBy_users_id_fk",
+ "tableFrom": "approval_lines",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_logs": {
+ "name": "approval_logs",
+ "schema": "knox",
+ "columns": {
+ "ap_inf_id": {
+ "name": "ap_inf_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ep_id": {
+ "name": "ep_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_address": {
+ "name": "email_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "aplns": {
+ "name": "aplns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_template_history": {
+ "name": "approval_template_history",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "templateId": {
+ "name": "templateId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "changeDescription": {
+ "name": "changeDescription",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changedBy": {
+ "name": "changedBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_template_history_templateId_approval_templates_id_fk": {
+ "name": "approval_template_history_templateId_approval_templates_id_fk",
+ "tableFrom": "approval_template_history",
+ "tableTo": "approval_templates",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "templateId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "approval_template_history_changedBy_users_id_fk": {
+ "name": "approval_template_history_changedBy_users_id_fk",
+ "tableFrom": "approval_template_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "changedBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_template_variables": {
+ "name": "approval_template_variables",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "approvalTemplateId": {
+ "name": "approvalTemplateId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variableName": {
+ "name": "variableName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variableType": {
+ "name": "variableType",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "defaultValue": {
+ "name": "defaultValue",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_template_variables_approvalTemplateId_approval_templates_id_fk": {
+ "name": "approval_template_variables_approvalTemplateId_approval_templates_id_fk",
+ "tableFrom": "approval_template_variables",
+ "tableTo": "approval_templates",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "approvalTemplateId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "approval_template_variables_createdBy_users_id_fk": {
+ "name": "approval_template_variables_createdBy_users_id_fk",
+ "tableFrom": "approval_template_variables",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_templates": {
+ "name": "approval_templates",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approvalLineId": {
+ "name": "approvalLineId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_templates_approvalLineId_approval_lines_id_fk": {
+ "name": "approval_templates_approvalLineId_approval_lines_id_fk",
+ "tableFrom": "approval_templates",
+ "tableTo": "approval_lines",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "approvalLineId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "approval_templates_createdBy_users_id_fk": {
+ "name": "approval_templates_createdBy_users_id_fk",
+ "tableFrom": "approval_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "risks.risk_events": {
+ "name": "risk_events",
+ "schema": "risks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "event_type": {
+ "name": "event_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "event_status": {
+ "name": "event_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "manager_id": {
+ "name": "manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occurred_at": {
+ "name": "occurred_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "risk_events_vendor_id_vendors_id_fk": {
+ "name": "risk_events_vendor_id_vendors_id_fk",
+ "tableFrom": "risk_events",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "risk_events_manager_id_users_id_fk": {
+ "name": "risk_events_manager_id_users_id_fk",
+ "tableFrom": "risk_events",
+ "tableTo": "users",
+ "columnsFrom": [
+ "manager_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "risk_events_created_by_users_id_fk": {
+ "name": "risk_events_created_by_users_id_fk",
+ "tableFrom": "risk_events",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "risk_events_updated_by_users_id_fk": {
+ "name": "risk_events_updated_by_users_id_fk",
+ "tableFrom": "risk_events",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.user_domain": {
+ "name": "user_domain",
+ "schema": "public",
+ "values": [
+ "pending",
+ "evcp",
+ "procurement",
+ "sales",
+ "engineering",
+ "partners"
+ ]
+ },
+ "public.score_type": {
+ "name": "score_type",
+ "schema": "public",
+ "values": [
+ "fixed",
+ "variable"
+ ]
+ },
+ "public.qna_category": {
+ "name": "qna_category",
+ "schema": "public",
+ "values": [
+ "engineering",
+ "procurement",
+ "technical_sales"
+ ]
+ },
+ "public.gtc_type": {
+ "name": "gtc_type",
+ "schema": "public",
+ "values": [
+ "standard",
+ "project"
+ ]
+ },
+ "public.review_status": {
+ "name": "review_status",
+ "schema": "public",
+ "values": [
+ "draft",
+ "pending",
+ "reviewing",
+ "approved",
+ "rejected",
+ "revised"
+ ]
+ },
+ "public.consent_action": {
+ "name": "consent_action",
+ "schema": "public",
+ "values": [
+ "consent",
+ "revoke",
+ "update"
+ ]
+ },
+ "public.consent_type": {
+ "name": "consent_type",
+ "schema": "public",
+ "values": [
+ "privacy_policy",
+ "terms_of_service",
+ "marketing",
+ "optional"
+ ]
+ },
+ "public.policy_type": {
+ "name": "policy_type",
+ "schema": "public",
+ "values": [
+ "privacy_policy",
+ "terms_of_service"
+ ]
+ },
+ "public.award_count": {
+ "name": "award_count",
+ "schema": "public",
+ "values": [
+ "single",
+ "multiple"
+ ]
+ },
+ "public.bidding_status": {
+ "name": "bidding_status",
+ "schema": "public",
+ "values": [
+ "bidding_generated",
+ "request_for_quotation",
+ "received_quotation",
+ "set_target_price",
+ "bidding_opened",
+ "bidding_closed",
+ "evaluation_of_bidding",
+ "bidding_disposal",
+ "vendor_selected"
+ ]
+ },
+ "public.bidding_type": {
+ "name": "bidding_type",
+ "schema": "public",
+ "values": [
+ "equipment",
+ "construction",
+ "service",
+ "lease",
+ "steel_stock",
+ "piping",
+ "transport",
+ "waste",
+ "sale"
+ ]
+ },
+ "public.contract_type": {
+ "name": "contract_type",
+ "schema": "public",
+ "values": [
+ "unit_price",
+ "general",
+ "sale"
+ ]
+ },
+ "public.document_type": {
+ "name": "document_type",
+ "schema": "public",
+ "values": [
+ "notice",
+ "specification",
+ "specification_meeting",
+ "contract_draft",
+ "company_proposal",
+ "financial_doc",
+ "technical_doc",
+ "certificate",
+ "pr_document",
+ "spec_document",
+ "evaluation_doc",
+ "bid_attachment",
+ "other"
+ ]
+ },
+ "public.invitation_status": {
+ "name": "invitation_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "sent",
+ "accepted",
+ "declined",
+ "submitted"
+ ]
+ },
+ "public.quantity_unit": {
+ "name": "quantity_unit",
+ "schema": "public",
+ "values": [
+ "ea",
+ "set",
+ "kg",
+ "ton",
+ "m",
+ "m2",
+ "m3",
+ "lot",
+ "other"
+ ]
+ },
+ "public.weight_unit": {
+ "name": "weight_unit",
+ "schema": "public",
+ "values": [
+ "kg",
+ "ton",
+ "lb",
+ "g"
+ ]
+ }
+ },
+ "schemas": {
+ "mdg": "mdg",
+ "soap": "soap",
+ "nonsap": "nonsap",
+ "ecc": "ecc",
+ "knox": "knox",
+ "risks": "risks"
+ },
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {
+ "public.contracts_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contracts_detail_view_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_name": {
+ "name": "contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "end_date": {
+ "name": "end_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "partial_shipping_allowed": {
+ "name": "partial_shipping_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "partial_payment_allowed": {
+ "name": "partial_payment_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"contracts\".\"id\", \"contracts\".\"contract_no\", \"contracts\".\"contract_name\", \"contracts\".\"status\", \"contracts\".\"start_date\", \"contracts\".\"end_date\", \"contracts\".\"project_id\", \"projects\".\"code\", \"projects\".\"name\", \"contracts\".\"vendor_id\", \"vendors\".\"vendor_name\", \"contracts\".\"payment_terms\", \"contracts\".\"delivery_terms\", \"contracts\".\"delivery_date\", \"contracts\".\"delivery_location\", \"contracts\".\"currency\", \"contracts\".\"total_amount\", \"contracts\".\"discount\", \"contracts\".\"tax\", \"contracts\".\"shipping_fee\", \"contracts\".\"net_total\", \"contracts\".\"partial_shipping_allowed\", \"contracts\".\"partial_payment_allowed\", \"contracts\".\"remarks\", \"contracts\".\"version\", \"contracts\".\"created_at\", \"contracts\".\"updated_at\", EXISTS (\n SELECT 1 \n FROM \"contract_envelopes\" \n WHERE \"contract_envelopes\".\"contract_id\" = \"contracts\".\"id\"\n ) as \"has_signature\", COALESCE((\n SELECT json_agg(\n json_build_object(\n 'id', ci.id,\n 'itemId', ci.item_id,\n 'description', ci.description,\n 'quantity', ci.quantity,\n 'unitPrice', ci.unit_price,\n 'taxRate', ci.tax_rate,\n 'taxAmount', ci.tax_amount,\n 'totalLineAmount', ci.total_line_amount,\n 'remark', ci.remark,\n 'createdAt', ci.created_at,\n 'updatedAt', ci.updated_at\n )\n )\n FROM \"contract_items\" AS ci\n WHERE ci.contract_id = \"contracts\".\"id\"\n ), '[]') as \"items\", COALESCE((\n SELECT json_agg(\n json_build_object(\n 'id', ce.id,\n 'envelopeId', ce.envelope_id,\n 'documentId', ce.document_id,\n 'envelopeStatus', ce.envelope_status,\n 'fileName', ce.file_name,\n 'filePath', ce.file_path,\n 'createdAt', ce.created_at,\n 'updatedAt', ce.updated_at,\n 'signers', (\n SELECT json_agg(\n json_build_object(\n 'id', cs.id,\n 'vendorContactId', cs.vendor_contact_id,\n 'signerType', cs.signer_type,\n 'signerEmail', cs.signer_email,\n 'signerName', cs.signer_name,\n 'signerPosition', cs.signer_position,\n 'signerStatus', cs.signer_status,\n 'signedAt', cs.signed_at\n )\n )\n FROM \"contract_signers\" AS cs\n WHERE cs.envelope_id = ce.id\n )\n )\n )\n FROM \"contract_envelopes\" AS ce\n WHERE ce.contract_id = \"contracts\".\"id\"\n ), '[]') as \"envelopes\" from \"contracts\" left join \"projects\" on \"contracts\".\"project_id\" = \"projects\".\"id\" left join \"vendors\" on \"contracts\".\"vendor_id\" = \"vendors\".\"id\"",
+ "name": "contracts_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.poa_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "poa_detail_view_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_status": {
+ "name": "approval_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"poa\".\"id\", \"poa\".\"contract_no\", \"contracts\".\"project_id\", \"contracts\".\"vendor_id\", \"poa\".\"change_reason\", \"poa\".\"approval_status\", \"contracts\".\"contract_name\" as \"original_contract_name\", \"contracts\".\"status\" as \"original_status\", \"contracts\".\"start_date\" as \"original_start_date\", \"contracts\".\"end_date\" as \"original_end_date\", \"poa\".\"delivery_terms\", \"poa\".\"delivery_date\", \"poa\".\"delivery_location\", \"poa\".\"currency\", \"poa\".\"total_amount\", \"poa\".\"discount\", \"poa\".\"tax\", \"poa\".\"shipping_fee\", \"poa\".\"net_total\", \"poa\".\"created_at\", \"poa\".\"updated_at\", EXISTS (\n SELECT 1 \n FROM \"contract_envelopes\" \n WHERE \"contract_envelopes\".\"contract_id\" = \"poa\".\"id\"\n ) as \"has_signature\" from \"poa\" left join \"contracts\" on \"poa\".\"contract_no\" = \"contracts\".\"contract_no\"",
+ "name": "poa_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.project_approved_vendors": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "name_ko": {
+ "name": "name_ko",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_en": {
+ "name": "name_en",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ship'"
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendors\".\"id\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendors\".\"tax_id\", \"vendors\".\"email\", \"vendors\".\"phone\", \"vendors\".\"status\", \"vendor_types\".\"name_ko\", \"vendor_types\".\"name_en\", \"projects\".\"code\", \"projects\".\"name\", \"projects\".\"type\", \"vendor_pq_submissions\".\"submitted_at\", \"vendor_pq_submissions\".\"approved_at\" from \"vendors\" inner join \"vendor_pq_submissions\" on \"vendor_pq_submissions\".\"vendor_id\" = \"vendors\".\"id\" inner join \"projects\" on \"vendor_pq_submissions\".\"project_id\" = \"projects\".\"id\" left join \"vendor_types\" on \"vendors\".\"vendor_type_id\" = \"vendor_types\".\"id\" where \"vendor_pq_submissions\".\"status\" = 'APPROVED'",
+ "name": "project_approved_vendors",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_investigations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pq_submission_id": {
+ "name": "pq_submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "qm_manager_id": {
+ "name": "qm_manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_status": {
+ "name": "investigation_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "investigation_address": {
+ "name": "investigation_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_method": {
+ "name": "investigation_method",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_start_at": {
+ "name": "scheduled_start_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_end_at": {
+ "name": "scheduled_end_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "forecasted_at": {
+ "name": "forecasted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_result": {
+ "name": "evaluation_result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_notes": {
+ "name": "investigation_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pq_items": {
+ "name": "pq_items",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendor_investigations\".\"id\", \"vendor_investigations\".\"vendor_id\", \"vendor_investigations\".\"pq_submission_id\", \"vendor_investigations\".\"requester_id\", \"vendor_investigations\".\"qm_manager_id\", \"vendor_investigations\".\"investigation_status\", \"vendor_investigations\".\"investigation_address\", \"vendor_investigations\".\"investigation_method\", \"vendor_investigations\".\"scheduled_start_at\", \"vendor_investigations\".\"scheduled_end_at\", \"vendor_investigations\".\"forecasted_at\", \"vendor_investigations\".\"requested_at\", \"vendor_investigations\".\"confirmed_at\", \"vendor_investigations\".\"completed_at\", \"vendor_investigations\".\"evaluation_score\", \"vendor_investigations\".\"evaluation_result\", \"vendor_investigations\".\"investigation_notes\", \"vendor_investigations\".\"created_at\", \"vendor_investigations\".\"updated_at\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendor_pq_submissions\".\"pq_items\", requester.name as \"requesterName\", requester.email as \"requesterEmail\", qm_manager.name as \"qmManagerName\", qm_manager.email as \"qmManagerEmail\", (\n CASE \n WHEN EXISTS (\n SELECT 1 FROM vendor_investigation_attachments via \n WHERE via.investigation_id = \"vendor_investigations\".\"id\"\n ) \n THEN true \n ELSE false \n END\n ) as \"hasAttachments\" from \"vendor_investigations\" left join \"vendors\" on \"vendor_investigations\".\"vendor_id\" = \"vendors\".\"id\" left join users AS requester on \"vendor_investigations\".\"requester_id\" = requester.id left join users AS qm_manager on \"vendor_investigations\".\"qm_manager_id\" = qm_manager.id left join \"vendor_pq_submissions\" on \"vendor_investigations\".\"pq_submission_id\" = \"vendor_pq_submissions\".\"id\"",
+ "name": "vendor_investigations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.cbe_view": {
+ "columns": {},
+ "definition": "select \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"rfq_id\" as \"rfq_id\", \"cbe_evaluations\".\"vendor_id\" as \"vendor_id\", \"cbe_evaluations\".\"total_cost\" as \"total_cost\", \"cbe_evaluations\".\"currency\" as \"currency\", \"cbe_evaluations\".\"payment_terms\" as \"payment_terms\", \"cbe_evaluations\".\"incoterms\" as \"incoterms\", \"cbe_evaluations\".\"result\" as \"result\", \"cbe_evaluations\".\"notes\" as \"notes\", \"cbe_evaluations\".\"evaluated_by\" as \"evaluated_by\", \"cbe_evaluations\".\"evaluated_at\" as \"evaluated_at\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"users\".\"name\" as \"evaluator_name\", \"users\".\"email\" as \"evaluator_email\" from \"cbe_evaluations\" inner join \"rfqs\" on \"cbe_evaluations\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"cbe_evaluations\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" on \"cbe_evaluations\".\"evaluated_by\" = \"users\".\"id\"",
+ "name": "cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfqs_view": {
+ "columns": {},
+ "definition": "select \"rfqs\".\"id\" as \"rfq_id\", \"rfqs\".\"status\" as \"status\", \"rfqs\".\"created_at\" as \"created_at\", \"rfqs\".\"updated_at\" as \"updated_at\", \"rfqs\".\"created_by\" as \"created_by\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"rfqs\".\"parent_rfq_id\" as \"parent_rfq_id\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"users\".\"email\" as \"user_email\", \"users\".\"name\" as \"user_name\", (\n SELECT COUNT(*) \n FROM \"rfq_items\" \n WHERE \"rfq_items\".\"rfq_id\" = \"rfqs\".\"id\"\n ) as \"item_count\", (\n SELECT COUNT(*) \n FROM \"rfq_attachments\" \n WHERE \"rfq_attachments\".\"rfq_id\" = \"rfqs\".\"id\"\n ) as \"attachment_count\" from \"rfqs\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" on \"rfqs\".\"created_by\" = \"users\".\"id\"",
+ "name": "rfqs_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_cbe_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"id\" as \"vendor_response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"result\" as \"cbe_result\", \"cbe_evaluations\".\"notes\" as \"cbe_note\", \"cbe_evaluations\".\"updated_at\" as \"cbe_updated\", \"cbe_evaluations\".\"total_cost\" as \"total_cost\", \"cbe_evaluations\".\"currency\" as \"currency\", \"cbe_evaluations\".\"payment_terms\" as \"payment_terms\", \"cbe_evaluations\".\"incoterms\" as \"incoterms\", \"cbe_evaluations\".\"delivery_schedule\" as \"delivery_schedule\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"cbe_evaluations\" on (\"cbe_evaluations\".\"vendor_id\" = \"vendors\".\"id\" and \"cbe_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\")",
+ "name": "vendor_cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_cbe_view": {
+ "columns": {},
+ "definition": "select \"vendor_responses\".\"id\" as \"response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"vendor_id\" as \"vendor_id\", \"vendor_responses\".\"response_status\" as \"response_status\", \"vendor_responses\".\"notes\" as \"response_notes\", \"vendor_responses\".\"responded_by\" as \"responded_by\", \"vendor_responses\".\"responded_at\" as \"responded_at\", \"vendor_responses\".\"updated_at\" as \"response_updated_at\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"rfqs\".\"due_date\" as \"rfq_due_date\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"status\" as \"vendor_status\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"vendor_commercial_responses\".\"id\" as \"commercial_response_id\", \"vendor_commercial_responses\".\"response_status\" as \"commercial_response_status\", \"vendor_commercial_responses\".\"total_price\" as \"total_price\", \"vendor_commercial_responses\".\"currency\" as \"currency\", \"vendor_commercial_responses\".\"payment_terms\" as \"payment_terms\", \"vendor_commercial_responses\".\"incoterms\" as \"incoterms\", \"vendor_commercial_responses\".\"delivery_period\" as \"delivery_period\", \"vendor_commercial_responses\".\"warranty_period\" as \"warranty_period\", \"vendor_commercial_responses\".\"validity_period\" as \"validity_period\", \"vendor_commercial_responses\".\"price_breakdown\" as \"price_breakdown\", \"vendor_commercial_responses\".\"commercial_notes\" as \"commercial_notes\", \"vendor_commercial_responses\".\"created_at\" as \"commercial_created_at\", \"vendor_commercial_responses\".\"updated_at\" as \"commercial_updated_at\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"attachment_count\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"commercial_response_id\" = \"vendor_commercial_responses\".\"id\"\n ) as \"commercial_attachment_count\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n AND \"vendor_response_attachments\".\"attachment_type\" = 'TECHNICAL_SPEC'\n ) as \"technical_attachment_count\", (\n SELECT MAX(\"uploaded_at\") \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"latest_attachment_date\" from \"vendor_responses\" inner join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_commercial_responses\" on \"vendor_commercial_responses\".\"response_id\" = \"vendor_responses\".\"id\"",
+ "name": "vendor_response_cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_responses_view": {
+ "columns": {},
+ "definition": "select \"vendor_responses\".\"id\" as \"response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"vendor_id\" as \"vendor_id\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"rfqs\".\"due_date\" as \"rfq_due_date\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"created_at\" as \"rfq_created_at\", \"rfqs\".\"updated_at\" as \"rfq_updated_at\", \"rfqs\".\"created_by\" as \"rfq_created_by\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendor_responses\".\"response_status\" as \"response_status\", \"vendor_responses\".\"responded_at\" as \"responded_at\", CASE WHEN \"vendor_technical_responses\".\"id\" IS NOT NULL THEN TRUE ELSE FALSE END as \"has_technical_response\", \"vendor_technical_responses\".\"id\" as \"technical_response_id\", CASE WHEN \"vendor_commercial_responses\".\"id\" IS NOT NULL THEN TRUE ELSE FALSE END as \"has_commercial_response\", \"vendor_commercial_responses\".\"id\" as \"commercial_response_id\", \"vendor_commercial_responses\".\"total_price\" as \"total_price\", \"vendor_commercial_responses\".\"currency\" as \"currency\", \"rfq_evaluations\".\"id\" as \"tbe_id\", \"rfq_evaluations\".\"result\" as \"tbe_result\", \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"result\" as \"cbe_result\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"attachment_count\" from \"vendor_responses\" inner join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_technical_responses\" on \"vendor_technical_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"vendor_commercial_responses\" on \"vendor_commercial_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"rfq_evaluations\" on (\"rfq_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\" and \"rfq_evaluations\".\"vendor_id\" = \"vendor_responses\".\"vendor_id\" and \"rfq_evaluations\".\"eval_type\" = 'TBE') left join \"cbe_evaluations\" on (\"cbe_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\" and \"cbe_evaluations\".\"vendor_id\" = \"vendor_responses\".\"vendor_id\")",
+ "name": "vendor_responses_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_rfq_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\"",
+ "name": "vendor_rfq_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_tbe_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"id\" as \"vendor_response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"vendor_technical_responses\".\"id\" as \"technical_response_id\", \"vendor_technical_responses\".\"response_status\" as \"technical_response_status\", \"vendor_technical_responses\".\"summary\" as \"technical_summary\", \"vendor_technical_responses\".\"notes\" as \"technical_notes\", \"vendor_technical_responses\".\"updated_at\" as \"technical_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"rfq_evaluations\".\"id\" as \"tbe_id\", \"rfq_evaluations\".\"result\" as \"tbe_result\", \"rfq_evaluations\".\"notes\" as \"tbe_note\", \"rfq_evaluations\".\"updated_at\" as \"tbe_updated\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_technical_responses\" on \"vendor_technical_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"rfq_evaluations\" on (\"rfq_evaluations\".\"vendor_id\" = \"vendors\".\"id\" and \"rfq_evaluations\".\"eval_type\" = 'TBE' and \"rfq_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\")",
+ "name": "vendor_tbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.role_view": {
+ "columns": {},
+ "definition": "select \"roles\".\"id\" as \"id\", \"roles\".\"name\" as \"name\", \"roles\".\"description\" as \"description\", \"roles\".\"domain\" as \"domain\", \"roles\".\"created_at\" as \"created_at\", \"vendors\".\"id\" as \"company_id\", \"vendors\".\"vendor_name\" as \"company_name\", COUNT(\"users\".\"id\") as \"user_count\" from \"roles\" left join \"user_roles\" on \"user_roles\".\"role_id\" = \"roles\".\"id\" left join \"users\" on \"users\".\"id\" = \"user_roles\".\"user_id\" left join \"vendors\" on \"roles\".\"company_id\" = \"vendors\".\"id\" group by \"roles\".\"id\", \"vendors\".\"id\"",
+ "name": "role_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.user_view": {
+ "columns": {},
+ "definition": "select \"users\".\"id\" as \"user_id\", \"users\".\"name\" as \"user_name\", \"users\".\"phone\" as \"user_phone\", \"users\".\"email\" as \"user_email\", \"users\".\"domain\" as \"user_domain\", \"users\".\"image_url\" as \"user_image\", \"vendors\".\"id\" as \"company_id\", \"vendors\".\"vendor_name\" as \"company_name\", \n array_agg(\"roles\".\"name\")\n as \"roles\", \"users\".\"created_at\" as \"created_at\" from \"users\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"user_roles\" on \"users\".\"id\" = \"user_roles\".\"user_id\" left join \"roles\" on \"user_roles\".\"role_id\" = \"roles\".\"id\" group by \"users\".\"id\", \"vendors\".\"id\"",
+ "name": "user_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.form_lists_view": {
+ "columns": {},
+ "definition": "select \"tag_type_class_form_mappings\".\"id\" as \"id\", \"tag_type_class_form_mappings\".\"project_id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"tag_type_class_form_mappings\".\"tag_type_label\" as \"tag_type_label\", \"tag_type_class_form_mappings\".\"class_label\" as \"class_label\", \"tag_type_class_form_mappings\".\"form_code\" as \"form_code\", \"tag_type_class_form_mappings\".\"form_name\" as \"form_name\", \"tag_type_class_form_mappings\".\"ep\" as \"ep\", \"tag_type_class_form_mappings\".\"remark\" as \"remark\", \"tag_type_class_form_mappings\".\"created_at\" as \"created_at\", \"tag_type_class_form_mappings\".\"updated_at\" as \"updated_at\" from \"tag_type_class_form_mappings\" inner join \"projects\" on \"tag_type_class_form_mappings\".\"project_id\" = \"projects\".\"id\"",
+ "name": "form_lists_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.view_tag_subfields": {
+ "columns": {
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_description": {
+ "name": "attributes_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expression": {
+ "name": "expression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delimiter": {
+ "name": "delimiter",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"tag_subfields\".\"id\" as \"id\", \"tag_subfields\".\"tag_type_code\", \"tag_types\".\"description\", \"tag_subfields\".\"attributes_id\", \"tag_subfields\".\"attributes_description\", \"tag_subfields\".\"expression\", \"tag_subfields\".\"delimiter\", \"tag_subfields\".\"sort_order\", \"tag_subfields\".\"created_at\", \"tag_subfields\".\"updated_at\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\", \"projects\".\"name\" from \"tag_subfields\" inner join \"tag_types\" on (\"tag_subfields\".\"tag_type_code\" = \"tag_types\".\"code\" and \"tag_subfields\".\"project_id\" = \"tag_types\".\"project_id\") inner join \"projects\" on \"tag_subfields\".\"project_id\" = \"projects\".\"id\"",
+ "name": "view_tag_subfields",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.document_stages_only_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n d.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM documents d\n LEFT JOIN issue_stages ist ON d.id = ist.document_id\n GROUP BY d.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n -- 문서별 스테이지 집계 (리비전 제외)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'description', ist.description,\n 'notes', ist.notes,\n 'reminderDays', ist.reminder_days\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.doc_number,\n d.drawing_kind,\n d.vendor_doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n -- 프로젝트 및 벤더 정보\n p.code as project_code,\n v.vendor_name as vendor_name,\n v.vendor_code as vendor_code,\n c.vendor_id as vendor_id,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 전체 스테이지 (리비전 제외)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 메타 정보\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- 프로젝트 및 벤더 정보 JOIN\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN projects p ON c.project_id = p.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n -- 스테이지 관련 정보 JOIN\n LEFT JOIN document_stats ds ON d.id = ds.document_id\n LEFT JOIN current_stage_info csi ON d.id = csi.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "document_stages_only_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.document_stages_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_count": {
+ "name": "stage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_list": {
+ "name": "stage_list",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT\n d.id AS document_id,\n d.doc_number,\n d.title,\n d.status,\n d.issued_date,\n d.contract_id,\n (SELECT COUNT(*) FROM issue_stages WHERE document_id = d.id) AS stage_count,\n COALESCE( \n (SELECT json_agg(i.stage_name) FROM issue_stages i WHERE i.document_id = d.id), \n '[]'\n ) AS stage_list,\n d.created_at,\n d.updated_at\n FROM documents d\n",
+ "name": "document_stages_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.enhanced_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision": {
+ "name": "latest_revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_status": {
+ "name": "latest_revision_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_name": {
+ "name": "latest_revision_uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_submitted_date": {
+ "name": "latest_submitted_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n d.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM documents d\n LEFT JOIN issue_stages ist ON d.id = ist.document_id\n GROUP BY d.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n latest_revision_info AS (\n SELECT DISTINCT ON (ist.document_id)\n ist.document_id,\n r.id as latest_revision_id,\n r.revision as latest_revision,\n r.revision_status as latest_revision_status,\n r.uploader_name as latest_revision_uploader_name,\n r.submitted_date as latest_submitted_date\n FROM revisions r\n JOIN issue_stages ist ON r.issue_stage_id = ist.id\n ORDER BY ist.document_id, r.created_at DESC\n ),\n -- 리비전별 첨부파일 집계\n revision_attachments AS (\n SELECT \n r.id as revision_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', da.id,\n 'revisionId', da.revision_id,\n 'fileName', da.file_name,\n 'filePath', da.file_path,\n 'fileSize', da.file_size,\n 'fileType', da.file_type,\n 'createdAt', da.created_at,\n 'updatedAt', da.updated_at\n ) ORDER BY da.created_at\n ) FILTER (WHERE da.id IS NOT NULL),\n '[]'::json\n ) as attachments\n FROM revisions r\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY r.id\n ),\n -- 스테이지별 리비전 집계 (첨부파일 포함)\n stage_revisions AS (\n SELECT \n ist.id as stage_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', r.id,\n 'issueStageId', r.issue_stage_id,\n 'revision', r.revision,\n 'uploaderType', r.uploader_type,\n 'uploaderId', r.uploader_id,\n 'uploaderName', r.uploader_name,\n 'comment', r.comment,\n 'usage', r.usage,\n 'revisionStatus', r.revision_status,\n 'submittedDate', r.submitted_date,\n 'uploadedAt', r.uploaded_at,\n 'approvedDate', r.approved_date,\n 'reviewStartDate', r.review_start_date,\n 'rejectedDate', r.rejected_date,\n 'reviewerId', r.reviewer_id,\n 'reviewerName', r.reviewer_name,\n 'reviewComments', r.review_comments,\n 'createdAt', r.created_at,\n 'updatedAt', r.updated_at,\n 'attachments', ra.attachments\n ) ORDER BY r.created_at\n ) FILTER (WHERE r.id IS NOT NULL),\n '[]'::json\n ) as revisions\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN revision_attachments ra ON r.id = ra.revision_id\n GROUP BY ist.id\n ),\n -- 문서별 스테이지 집계 (리비전 포함)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'revisions', sr.revisions\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n LEFT JOIN stage_revisions sr ON ist.id = sr.stage_id\n GROUP BY ist.document_id\n ),\n attachment_counts AS (\n SELECT \n ist.document_id,\n COUNT(da.id) as attachment_count\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.doc_number,\n d.drawing_kind,\n d.vendor_doc_number, -- ✅ 벤더 문서 번호 추가\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n\n d.c_gbn,\n d.d_gbn,\n d.degree_gbn,\n d.dept_gbn,\n d.s_gbn,\n d.j_gbn,\n\n\n \n -- ✅ 프로젝트 및 벤더 정보 추가\n c.project_id as project_id,\n p.code as project_code,\n v.vendor_name as vendor_name,\n v.vendor_code as vendor_code,\n c.vendor_id as vendor_id,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 최신 리비전 정보\n lri.latest_revision_id,\n lri.latest_revision,\n lri.latest_revision_status,\n lri.latest_revision_uploader_name,\n lri.latest_submitted_date,\n \n -- 전체 스테이지 (리비전 및 첨부파일 포함)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 기타\n COALESCE(ac.attachment_count, 0) as attachment_count,\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- ✅ contracts, projects, vendors 테이블 JOIN 추가\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN projects p ON c.project_id = p.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n LEFT JOIN document_stats ds ON d.id = ds.document_id\n LEFT JOIN current_stage_info csi ON d.id = csi.document_id\n LEFT JOIN latest_revision_info lri ON d.id = lri.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n LEFT JOIN attachment_counts ac ON d.id = ac.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "enhanced_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.simplified_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_move_gbn": {
+ "name": "drawing_move_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discipline": {
+ "name": "discipline",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_document_id": {
+ "name": "external_document_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_system_type": {
+ "name": "external_system_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_synced_at": {
+ "name": "external_synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_drawing_no": {
+ "name": "shi_drawing_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager": {
+ "name": "manager",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_enm": {
+ "name": "manager_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_no": {
+ "name": "manager_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group": {
+ "name": "register_group",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group_id": {
+ "name": "register_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_no": {
+ "name": "create_user_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_id": {
+ "name": "create_user_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_enm": {
+ "name": "create_user_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_id": {
+ "name": "first_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_name": {
+ "name": "first_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_plan_date": {
+ "name": "first_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_actual_date": {
+ "name": "first_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_id": {
+ "name": "second_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_name": {
+ "name": "second_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_plan_date": {
+ "name": "second_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_actual_date": {
+ "name": "second_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH \n -- 리비전별 첨부파일 집계\n revision_attachments AS (\n SELECT \n r.id as revision_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', da.id,\n 'revisionId', da.revision_id,\n 'fileName', da.file_name,\n 'filePath', da.file_path,\n 'fileSize', da.file_size,\n 'fileType', da.file_type,\n 'createdAt', da.created_at,\n 'updatedAt', da.updated_at\n ) ORDER BY da.created_at\n ) FILTER (WHERE da.id IS NOT NULL),\n '[]'::json\n ) as attachments\n FROM revisions r\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY r.id\n ),\n \n -- 스테이지별 리비전 집계 (첨부파일 포함)\n stage_revisions AS (\n SELECT \n ist.id as stage_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', r.id,\n 'issueStageId', r.issue_stage_id,\n 'revision', r.revision,\n 'uploaderType', r.uploader_type,\n 'uploaderId', r.uploader_id,\n 'uploaderName', r.uploader_name,\n 'comment', r.comment,\n 'usage', r.usage,\n 'usageType', r.usage_type,\n 'revisionStatus', r.revision_status,\n 'submittedDate', r.submitted_date,\n 'uploadedAt', r.uploaded_at,\n 'approvedDate', r.approved_date,\n 'reviewStartDate', r.review_start_date,\n 'rejectedDate', r.rejected_date,\n 'reviewerId', r.reviewer_id,\n 'reviewerName', r.reviewer_name,\n 'reviewComments', r.review_comments,\n 'createdAt', r.created_at,\n 'updatedAt', r.updated_at,\n 'attachments', COALESCE(ra.attachments, '[]'::json)\n ) ORDER BY r.created_at\n ) FILTER (WHERE r.id IS NOT NULL),\n '[]'::json\n ) as revisions\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN revision_attachments ra ON r.id = ra.revision_id\n GROUP BY ist.id\n ),\n \n -- 문서별 스테이지 집계 (리비전 포함)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'revisions', COALESCE(sr.revisions, '[]'::json)\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n LEFT JOIN stage_revisions sr ON ist.id = sr.stage_id\n GROUP BY ist.document_id\n ),\n \n -- 첫 번째 스테이지 정보 (drawingKind에 따라 다른 조건)\n first_stage_info AS (\n SELECT \n document_id,\n first_stage_id,\n first_stage_name,\n first_stage_plan_date,\n first_stage_actual_date\n FROM (\n SELECT \n ist.document_id,\n ist.id as first_stage_id,\n ist.stage_name as first_stage_name,\n ist.plan_date as first_stage_plan_date,\n ist.actual_date as first_stage_actual_date,\n ROW_NUMBER() OVER (PARTITION BY ist.document_id ORDER BY ist.stage_order ASC) as rn\n FROM issue_stages ist\n JOIN documents d ON ist.document_id = d.id\n WHERE \n (d.drawing_kind = 'B4' AND LOWER(ist.stage_name) LIKE '%pre%') OR\n (d.drawing_kind = 'B3' AND LOWER(ist.stage_name) LIKE '%approval%') OR\n (d.drawing_kind = 'B5' AND LOWER(ist.stage_name) LIKE '%first%')\n ) ranked\n WHERE rn = 1\n ),\n \n -- 두 번째 스테이지 정보 (drawingKind에 따라 다른 조건)\n second_stage_info AS (\n SELECT \n document_id,\n second_stage_id,\n second_stage_name,\n second_stage_plan_date,\n second_stage_actual_date\n FROM (\n SELECT \n ist.document_id,\n ist.id as second_stage_id,\n ist.stage_name as second_stage_name,\n ist.plan_date as second_stage_plan_date,\n ist.actual_date as second_stage_actual_date,\n ROW_NUMBER() OVER (PARTITION BY ist.document_id ORDER BY ist.stage_order ASC) as rn\n FROM issue_stages ist\n JOIN documents d ON ist.document_id = d.id\n WHERE \n (d.drawing_kind = 'B4' AND LOWER(ist.stage_name) LIKE '%work%') OR\n (d.drawing_kind = 'B3' AND LOWER(ist.stage_name) LIKE '%work%') OR\n (d.drawing_kind = 'B5' AND LOWER(ist.stage_name) LIKE '%second%')\n ) ranked\n WHERE rn = 1\n ),\n \n -- 첨부파일 수 집계\n attachment_counts AS (\n SELECT \n ist.document_id,\n COUNT(da.id) as attachment_count\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.project_id,\n d.vendor_id,\n d.doc_number,\n d.drawing_kind,\n d.drawing_move_gbn,\n d.discipline,\n d.vendor_doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n -- 외부 시스템 연동 정보\n d.external_document_id,\n d.external_system_type,\n d.external_synced_at,\n \n -- DOLCE 응답의 추가 정보들\n d.shi_drawing_no,\n d.manager,\n d.manager_enm,\n d.manager_no,\n d.register_group,\n d.register_group_id,\n \n -- 생성자 정보\n d.create_user_no,\n d.create_user_id,\n d.create_user_enm,\n \n -- 프로젝트 및 벤더 정보\n p.code as project_code,\n v.vendor_name,\n v.vendor_code,\n \n -- B4 전용 필드들\n d.c_gbn,\n d.d_gbn,\n d.degree_gbn,\n d.dept_gbn,\n d.s_gbn,\n d.j_gbn,\n \n -- 첫 번째 스테이지 정보\n fsi.first_stage_id,\n fsi.first_stage_name,\n fsi.first_stage_plan_date,\n fsi.first_stage_actual_date,\n \n -- 두 번째 스테이지 정보\n ssi.second_stage_id,\n ssi.second_stage_name,\n ssi.second_stage_plan_date,\n ssi.second_stage_actual_date,\n \n -- 전체 스테이지 (리비전 및 첨부파일 포함)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 기타\n COALESCE(ac.attachment_count, 0) as attachment_count,\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- projects, vendors 테이블 JOIN (projectId가 이제 documents에 직접 있음)\n LEFT JOIN projects p ON d.project_id = p.id AND p.type = 'ship'\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n -- 스테이지 정보 JOIN\n LEFT JOIN first_stage_info fsi ON d.id = fsi.document_id\n LEFT JOIN second_stage_info ssi ON d.id = ssi.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n LEFT JOIN attachment_counts ac ON d.id = ac.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "simplified_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.stage_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n sd.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM stage_documents sd\n LEFT JOIN stage_issue_stages ist ON sd.id = ist.document_id\n GROUP BY sd.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM stage_issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n -- 문서별 스테이지 집계 (리비전 제외)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'description', ist.description,\n 'notes', ist.notes,\n 'reminderDays', ist.reminder_days\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM stage_issue_stages ist\n GROUP BY ist.document_id\n )\n \n SELECT \n sd.id as document_id,\n sd.doc_number,\n sd.vendor_doc_number,\n sd.title,\n sd.status,\n sd.issued_date,\n \n -- 프로젝트 및 벤더 정보 (직접 참조로 간소화)\n sd.project_id,\n sd.contract_id,\n p.code as project_code,\n sd.vendor_id,\n v.vendor_name,\n v.vendor_code,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 전체 스테이지 (리비전 제외)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 메타 정보\n sd.created_at,\n sd.updated_at\n \n FROM stage_documents sd\n -- 간소화된 JOIN (vendors는 vendor_id로 직접 조인)\n LEFT JOIN projects p ON sd.project_id = p.id\n LEFT JOIN vendors v ON sd.vendor_id = v.id\n \n -- 스테이지 관련 정보 JOIN\n LEFT JOIN document_stats ds ON sd.id = ds.document_id\n LEFT JOIN current_stage_info csi ON sd.id = csi.document_id\n LEFT JOIN stage_aggregation sa ON sd.id = sa.document_id\n \n ORDER BY sd.created_at DESC\n",
+ "name": "stage_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.sync_status_view": {
+ "columns": {
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_changes": {
+ "name": "total_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pending_changes": {
+ "name": "pending_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "synced_changes": {
+ "name": "synced_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "failed_changes": {
+ "name": "failed_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_sync_at": {
+ "name": "last_sync_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "next_sync_at": {
+ "name": "next_sync_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_enabled": {
+ "name": "sync_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n WITH change_stats AS (\n SELECT \n cl.vendor_id,\n sc.target_system,\n COUNT(*) as total_changes,\n COUNT(CASE WHEN cl.is_synced = false AND cl.sync_attempts < sc.retry_max_attempts THEN 1 END) as pending_changes,\n COUNT(CASE WHEN cl.is_synced = true THEN 1 END) as synced_changes,\n COUNT(CASE WHEN cl.sync_attempts >= sc.retry_max_attempts AND cl.is_synced = false THEN 1 END) as failed_changes,\n MAX(cl.synced_at) as last_sync_at\n FROM change_logs cl\n CROSS JOIN sync_configs sc \n WHERE cl.vendor_id = sc.vendor_id\n AND (cl.target_systems IS NULL OR cl.target_systems @> to_jsonb(ARRAY[sc.target_system]))\n GROUP BY cl.vendor_id, sc.target_system\n )\n SELECT \n cs.vendor_id,\n cs.target_system,\n COALESCE(cs.total_changes, 0) as total_changes,\n COALESCE(cs.pending_changes, 0) as pending_changes,\n COALESCE(cs.synced_changes, 0) as synced_changes,\n COALESCE(cs.failed_changes, 0) as failed_changes,\n cs.last_sync_at,\n CASE \n WHEN sc.sync_enabled = true AND sc.last_successful_sync IS NOT NULL \n THEN sc.last_successful_sync + (sc.sync_interval_minutes || ' minutes')::interval\n ELSE NULL\n END as next_sync_at,\n sc.sync_enabled\n FROM sync_configs sc\n LEFT JOIN change_stats cs ON sc.vendor_id = cs.vendor_id AND sc.target_system = cs.target_system\n",
+ "name": "sync_status_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_documents_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latest_stage_id": {
+ "name": "latest_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_name": {
+ "name": "latest_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_plan_date": {
+ "name": "latest_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_actual_date": {
+ "name": "latest_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision": {
+ "name": "latest_revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_type": {
+ "name": "latest_revision_uploader_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_name": {
+ "name": "latest_revision_uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT \n d.id, \n d.doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n (SELECT id FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_id,\n (SELECT stage_name FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_name,\n (SELECT plan_date FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_plan_date,\n (SELECT actual_date FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_actual_date,\n \n (SELECT r.id FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_id,\n (SELECT r.revision FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision,\n (SELECT r.uploader_type FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_uploader_type,\n (SELECT r.uploader_name FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_uploader_name,\n \n (SELECT COUNT(*) FROM document_attachments a JOIN revisions r ON a.revision_id = r.id JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id) AS attachment_count,\n \n d.created_at,\n d.updated_at\n FROM documents d\n JOIN contracts c ON d.contract_id = c.id\n ",
+ "name": "vendor_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_candidates_with_vendor_info": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'COLLECTED'"
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendor_candidates\".\"id\", \"vendor_candidates\".\"company_name\", \"vendor_candidates\".\"contact_email\", \"vendor_candidates\".\"contact_phone\", \"vendor_candidates\".\"tax_id\", \"vendor_candidates\".\"address\", \"vendor_candidates\".\"country\", \"vendor_candidates\".\"source\", \"vendor_candidates\".\"status\", \"vendor_candidates\".\"items\", \"vendor_candidates\".\"remark\", \"vendor_candidates\".\"created_at\", \"vendor_candidates\".\"updated_at\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendors\".\"created_at\" as \"vendor_created_at\", (\n SELECT l2.\"created_at\"\n FROM \"vendor_candidate_logs\" l2\n WHERE l2.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l2.\"action\" = 'status_change'\n ORDER BY l2.\"created_at\" DESC\n LIMIT 1\n ) as \"last_status_change_at\", (\n SELECT u.\"name\"\n FROM \"users\" u\n JOIN \"vendor_candidate_logs\" l3\n ON l3.\"user_id\" = u.\"id\"\n WHERE l3.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l3.\"action\" = 'status_change'\n ORDER BY l3.\"created_at\" DESC\n LIMIT 1\n ) as \"last_status_change_by\", (\n SELECT l4.\"created_at\"\n FROM \"vendor_candidate_logs\" l4\n WHERE l4.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l4.\"action\" = 'invite_sent'\n ORDER BY l4.\"created_at\" DESC\n LIMIT 1\n ) as \"last_invitation_at\", (\n SELECT u2.\"name\"\n FROM \"users\" u2\n JOIN \"vendor_candidate_logs\" l5\n ON l5.\"user_id\" = u2.\"id\"\n WHERE l5.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l5.\"action\" = 'invite_sent'\n ORDER BY l5.\"created_at\" DESC\n LIMIT 1\n ) as \"last_invitation_by\" from \"vendor_candidates\" left join \"vendors\" on \"vendor_candidates\".\"vendor_id\" = \"vendors\".\"id\"",
+ "name": "vendor_candidates_with_vendor_info",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "business_size": {
+ "name": "business_size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corporate_registration_number": {
+ "name": "corporate_registration_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_agency": {
+ "name": "credit_agency",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_rating": {
+ "name": "credit_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cash_flow_rating": {
+ "name": "cash_flow_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"id\", \"vendor_name\", \"vendor_code\", \"tax_id\", \"address\", \"business_size\", \"country\", \"phone\", \"email\", \"website\", \"status\", \"representative_name\", \"representative_birth\", \"representative_email\", \"representative_phone\", \"corporate_registration_number\", \"credit_agency\", \"credit_rating\", \"cash_flow_rating\", \"created_at\", \"updated_at\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', c.id,\n 'contactName', c.contact_name,\n 'contactPosition', c.contact_position,\n 'contactEmail', c.contact_email,\n 'contactPhone', c.contact_phone,\n 'isPrimary', c.is_primary\n )\n ),\n '[]'::json\n )\n FROM vendor_contacts c\n WHERE c.vendor_id = vendors.id)\n as \"contacts\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', a.id,\n 'fileName', a.file_name,\n 'filePath', a.file_path,\n 'attachmentType', a.attachment_type,\n 'createdAt', a.created_at\n )\n ORDER BY a.attachment_type, a.created_at DESC\n ),\n '[]'::json\n )\n FROM vendor_attachments a\n WHERE a.vendor_id = vendors.id)\n as \"attachments\", \n (SELECT COUNT(*)\n FROM vendor_attachments a\n WHERE a.vendor_id = vendors.id)\n as \"attachment_count\", \n (SELECT COUNT(*) \n FROM vendor_contacts c\n WHERE c.vendor_id = vendors.id)\n as \"contact_count\" from \"vendors\"",
+ "name": "vendor_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_items_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"vendor_possible_items\".\"id\", \"vendor_possible_items\".\"vendor_id\", \"items\".\"item_name\", \"items\".\"item_code\", \"items\".\"description\", \"vendor_possible_items\".\"created_at\", \"vendor_possible_items\".\"updated_at\" from \"vendor_possible_items\" left join \"items\" on \"vendor_possible_items\".\"item_code\" = \"items\".\"item_code\"",
+ "name": "vendor_items_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_materials_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"vendor_possible_materials\".\"id\", \"vendor_possible_materials\".\"vendor_id\", \"materials\".\"item_name\", \"materials\".\"item_code\", \"materials\".\"description\", \"materials\".\"unit_of_measure\", \"materials\".\"steel_type\", \"materials\".\"grade_material\", \"vendor_possible_materials\".\"created_at\", \"vendor_possible_materials\".\"updated_at\" from \"vendor_possible_materials\" left join \"materials\" on \"vendor_possible_materials\".\"item_code\" = \"materials\".\"item_code\"",
+ "name": "vendor_materials_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendors_with_types": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"tax_id\" as \"tax_id\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"phone\" as \"phone\", \"vendors\".\"email\" as \"email\", \"vendors\".\"business_size\" as \"business_size\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"status\", \"vendors\".\"vendor_type_id\" as \"vendor_type_id\", \"vendors\".\"representative_name\" as \"representative_name\", \"vendors\".\"representative_birth\" as \"representative_birth\", \"vendors\".\"representative_email\" as \"representative_email\", \"vendors\".\"representative_phone\" as \"representative_phone\", \"vendors\".\"corporate_registration_number\" as \"corporate_registration_number\", \"vendors\".\"items\" as \"items\", \"vendors\".\"credit_agency\" as \"credit_agency\", \"vendors\".\"credit_rating\" as \"credit_rating\", \"vendors\".\"cash_flow_rating\" as \"cash_flow_rating\", \"vendors\".\"created_at\" as \"created_at\", \"vendors\".\"updated_at\" as \"updated_at\", \"vendor_types\".\"name_ko\" as \"vendor_type_name\", \"vendor_types\".\"name_en\" as \"vendor_type_name_en\", \"vendor_types\".\"code\" as \"vendor_type_code\", \n CASE\n WHEN \"vendors\".\"status\" = 'ACTIVE' THEN '정규업체'\n WHEN \"vendors\".\"status\" IN ('INACTIVE', 'BLACKLISTED', 'REJECTED') THEN ''\n ELSE '잠재업체'\n END\n as \"vendor_category\" from \"vendors\" left join \"vendor_types\" on \"vendors\".\"vendor_type_id\" = \"vendor_types\".\"id\"",
+ "name": "vendors_with_types",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.basic_contract_view": {
+ "columns": {},
+ "definition": "select \"basic_contract\".\"id\" as \"id\", \"basic_contract\".\"template_id\" as \"template_id\", \"basic_contract\".\"vendor_id\" as \"vendor_id\", \"basic_contract\".\"requested_by\" as \"requested_by\", \"basic_contract\".\"status\" as \"basic_contract_status\", \"basic_contract\".\"created_at\" as \"created_at\", \"basic_contract\".\"updated_at\" as \"updated_at\", \"basic_contract\".\"completed_at\" as \"completed_at\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"email\" as \"vendor_email\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"users\".\"name\" as \"requested_by_name\", \"basic_contract_templates\".\"template_name\" as \"template_name\", \"basic_contract_templates\".\"revision\" as \"template_revision\", \"basic_contract_templates\".\"status\" as \"template_status\", \"basic_contract_templates\".\"validity_period\" as \"validity_period\", \"basic_contract_templates\".\"legal_review_required\" as \"legal_review_required\", \"basic_contract_templates\".\"shipbuilding_applicable\" as \"shipbuilding_applicable\", \"basic_contract_templates\".\"wind_applicable\" as \"wind_applicable\", \"basic_contract_templates\".\"pc_applicable\" as \"pc_applicable\", \"basic_contract_templates\".\"nb_applicable\" as \"nb_applicable\", \"basic_contract_templates\".\"rc_applicable\" as \"rc_applicable\", \"basic_contract_templates\".\"gy_applicable\" as \"gy_applicable\", \"basic_contract_templates\".\"sys_applicable\" as \"sys_applicable\", \"basic_contract_templates\".\"infra_applicable\" as \"infra_applicable\", \"basic_contract_templates\".\"file_path\" as \"template_file_path\", \"basic_contract_templates\".\"file_name\" as \"template_file_name\", \"basic_contract\".\"file_path\" as \"signed_file_path\", \"basic_contract\".\"file_name\" as \"signed_file_name\", \"basic_contract_templates\".\"created_at\" as \"template_created_at\", \"basic_contract_templates\".\"created_by\" as \"template_created_by\", \"basic_contract_templates\".\"updated_at\" as \"template_updated_at\", \"basic_contract_templates\".\"updated_by\" as \"template_updated_by\", \"basic_contract_templates\".\"disposed_at\" as \"template_disposed_at\", \"basic_contract_templates\".\"restored_at\" as \"template_restored_at\" from \"basic_contract\" left join \"vendors\" on \"basic_contract\".\"vendor_id\" = \"vendors\".\"id\" left join \"users\" on \"basic_contract\".\"requested_by\" = \"users\".\"id\" left join \"basic_contract_templates\" on \"basic_contract\".\"template_id\" = \"basic_contract_templates\".\"id\"",
+ "name": "basic_contract_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.pr_items_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_item": {
+ "name": "rfq_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item": {
+ "name": "pr_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_no": {
+ "name": "pr_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_category": {
+ "name": "material_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "acc": {
+ "name": "acc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "size": {
+ "name": "size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gross_weight": {
+ "name": "gross_weight",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "gw_uom": {
+ "name": "gw_uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_no": {
+ "name": "spec_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_url": {
+ "name": "spec_url",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tracking_no": {
+ "name": "tracking_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_yn": {
+ "name": "major_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "project_def": {
+ "name": "project_def",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_sc": {
+ "name": "project_sc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_kl": {
+ "name": "project_kl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_lc": {
+ "name": "project_lc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_dl": {
+ "name": "project_dl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"pr_items\".\"id\", \"pr_items\".\"procurement_rfqs_id\", \"pr_items\".\"rfq_item\", \"pr_items\".\"pr_item\", \"pr_items\".\"pr_no\", \"pr_items\".\"material_code\", \"pr_items\".\"material_category\", \"pr_items\".\"acc\", \"pr_items\".\"material_description\", \"pr_items\".\"size\", \"pr_items\".\"delivery_date\", \"pr_items\".\"quantity\", \"pr_items\".\"uom\", \"pr_items\".\"gross_weight\", \"pr_items\".\"gw_uom\", \"pr_items\".\"spec_no\", \"pr_items\".\"spec_url\", \"pr_items\".\"tracking_no\", \"pr_items\".\"major_yn\", \"pr_items\".\"project_def\", \"pr_items\".\"project_sc\", \"pr_items\".\"project_kl\", \"pr_items\".\"project_lc\", \"pr_items\".\"project_dl\", \"pr_items\".\"remark\", \"procurement_rfqs\".\"rfq_code\", \"procurement_rfqs\".\"item_code\", \"procurement_rfqs\".\"item_name\" from \"pr_items\" left join \"procurement_rfqs\" on \"pr_items\".\"procurement_rfqs_id\" = \"procurement_rfqs\".\"id\"",
+ "name": "pr_items_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.procurement_rfq_details_view": {
+ "columns": {},
+ "definition": "select \"rfq_details\".\"id\" as \"detail_id\", \"rfqs\".\"id\" as \"rfq_id\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"rfqs\".\"item_code\" as \"item_code\", \"rfqs\".\"item_name\" as \"item_name\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"country\" as \"vendor_country\", \"rfq_details\".\"currency\" as \"currency\", \"payment_terms\".\"code\" as \"payment_terms_code\", \"payment_terms\".\"description\" as \"payment_terms_description\", \"incoterms\".\"code\" as \"incoterms_code\", \"incoterms\".\"description\" as \"incoterms_description\", \"rfq_details\".\"incoterms_detail\" as \"incoterms_detail\", \"rfq_details\".\"delivery_date\" as \"delivery_date\", \"rfq_details\".\"tax_code\" as \"tax_code\", \"rfq_details\".\"place_of_shipping\" as \"place_of_shipping\", \"rfq_details\".\"place_of_destination\" as \"place_of_destination\", \"rfq_details\".\"material_price_related_yn\" as \"material_price_related_yn\", \"updated_by_user\".\"name\" as \"updated_by_user_name\", \"rfq_details\".\"updated_at\" as \"updated_at\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"rfqs\".\"id\"\n ) as \"pr_items_count\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"rfqs\".\"id\" \n AND major_yn = true\n ) as \"major_items_count\", (\n SELECT COUNT(*) \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"comment_count\", (\n SELECT created_at \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"last_comment_date\", (\n SELECT created_at \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\" AND is_vendor_comment = true\n ORDER BY created_at DESC LIMIT 1\n ) as \"last_vendor_comment_date\", (\n SELECT COUNT(*) \n FROM procurement_rfq_attachments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"attachment_count\", (\n SELECT COUNT(*) > 0\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"has_quotation\", (\n SELECT status\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"quotation_status\", (\n SELECT total_price\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"quotation_total_price\", (\n SELECT quotation_version\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY quotation_version DESC LIMIT 1\n ) as \"quotation_version\", (\n SELECT COUNT(DISTINCT quotation_version)\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"quotation_version_count\", (\n SELECT created_at\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY quotation_version DESC LIMIT 1\n ) as \"last_quotation_date\" from \"procurement_rfq_details\" \"rfq_details\" left join \"procurement_rfqs\" \"rfqs\" on \"rfq_details\".\"procurement_rfqs_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendors\" on \"rfq_details\".\"vendors_id\" = \"vendors\".\"id\" left join \"payment_terms\" on \"rfq_details\".\"payment_terms_code\" = \"payment_terms\".\"code\" left join \"incoterms\" on \"rfq_details\".\"incoterms_code\" = \"incoterms\".\"code\" left join \"users\" \"updated_by_user\" on \"rfq_details\".\"updated_by\" = \"updated_by_user\".\"id\"",
+ "name": "procurement_rfq_details_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.procurement_rfqs_view": {
+ "columns": {},
+ "definition": "select \"procurement_rfqs\".\"id\" as \"id\", \"procurement_rfqs\".\"rfq_code\" as \"rfq_code\", \"procurement_rfqs\".\"series\" as \"series\", \"procurement_rfqs\".\"rfq_sealed_yn\" as \"rfq_sealed_yn\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"procurement_rfqs\".\"item_code\" as \"item_code\", \"procurement_rfqs\".\"item_name\" as \"item_name\", \"procurement_rfqs\".\"status\" as \"status\", \"procurement_rfqs\".\"pic_code\" as \"pic_code\", \"procurement_rfqs\".\"rfq_send_date\" as \"rfq_send_date\", \"procurement_rfqs\".\"due_date\" as \"due_date\", (\n SELECT MIN(submitted_at)\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"procurement_rfqs\".\"id\"\n AND submitted_at IS NOT NULL\n ) as \"earliest_quotation_submitted_at\", \"created_by_user\".\"name\" as \"created_by_user_name\", \"sent_by_user\".\"name\" as \"sent_by_user_name\", \"procurement_rfqs\".\"updated_at\" as \"updated_at\", \"updated_by_user\".\"name\" as \"updated_by_user_name\", \"procurement_rfqs\".\"remark\" as \"remark\", (\n SELECT material_code \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n AND major_yn = true\n LIMIT 1\n ) as \"major_item_material_code\", (\n SELECT pr_no \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n AND major_yn = true\n LIMIT 1\n ) as \"po_no\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n ) as \"pr_items_count\" from \"procurement_rfqs\" left join \"projects\" on \"procurement_rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" \"created_by_user\" on \"procurement_rfqs\".\"created_by\" = \"created_by_user\".\"id\" left join \"users\" \"updated_by_user\" on \"procurement_rfqs\".\"updated_by\" = \"updated_by_user\".\"id\" left join \"users\" \"sent_by_user\" on \"procurement_rfqs\".\"sent_by\" = \"sent_by_user\".\"id\"",
+ "name": "procurement_rfqs_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.attachment_revision_history": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_id": {
+ "name": "client_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_no": {
+ "name": "client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_name": {
+ "name": "client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_path": {
+ "name": "client_file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_size": {
+ "name": "client_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_comment": {
+ "name": "client_revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_created_at": {
+ "name": "client_revision_created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest_client_revision": {
+ "name": "is_latest_client_revision",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_vendor_responses": {
+ "name": "total_vendor_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_vendors": {
+ "name": "responded_vendors",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pending_vendors": {
+ "name": "pending_vendors",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n ba.id as attachment_id,\n ba.attachment_type,\n ba.serial_no,\n \n -- 발주처 리비전 정보\n rev.id as client_revision_id,\n rev.revision_no as client_revision_no,\n rev.original_file_name as client_file_name,\n rev.file_size as client_file_size,\n rev.file_path as client_file_path,\n rev.revision_comment as client_revision_comment,\n rev.created_at as client_revision_created_at,\n rev.is_latest as is_latest_client_revision,\n \n -- 벤더 응답 통계\n COALESCE(response_stats.total_responses, 0) as total_vendor_responses,\n COALESCE(response_stats.responded_count, 0) as responded_vendors,\n COALESCE(response_stats.pending_count, 0) as pending_vendors,\n COALESCE(response_stats.total_files, 0) as total_response_files\n \n FROM b_rfqs br\n JOIN b_rfq_attachments ba ON br.id = ba.rfq_id\n JOIN b_rfq_attachment_revisions rev ON ba.id = rev.attachment_id\n LEFT JOIN (\n SELECT \n var.attachment_id,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN var.response_status = 'NOT_RESPONDED' THEN 1 END) as pending_count,\n COUNT(vra.id) as total_files\n FROM vendor_attachment_responses var\n LEFT JOIN vendor_response_attachments_b vra ON var.id = vra.vendor_response_id\n GROUP BY var.attachment_id\n ) response_stats ON ba.id = response_stats.attachment_id\n \n ORDER BY ba.id, rev.created_at DESC\n",
+ "name": "attachment_revision_history",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.attachments_with_latest_revision": {
+ "columns": {
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_comment": {
+ "name": "revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n a.id as attachment_id,\n a.attachment_type,\n a.serial_no,\n a.rfq_id,\n a.description,\n a.current_revision,\n \n r.id as revision_id,\n r.file_name,\n r.original_file_name,\n r.file_path,\n r.file_size,\n r.file_type,\n r.revision_comment,\n \n a.created_by,\n u.name as created_by_name,\n a.created_at,\n a.updated_at\n FROM b_rfq_attachments a\n LEFT JOIN b_rfq_attachment_revisions r ON a.latest_revision_id = r.id\n LEFT JOIN users u ON a.created_by = u.id\n ",
+ "name": "attachments_with_latest_revision",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.b_rfqs_master": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_type": {
+ "name": "project_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.description,\n br.status,\n br.due_date,\n br.pic_code,\n br.pic_name,\n br.eng_pic_name,\n br.package_no,\n br.package_name,\n br.project_id,\n p.code as project_code,\n p.name as project_name,\n p.type as project_type,\n br.project_company,\n br.project_flag,\n br.project_site,\n COALESCE(att_count.total_attachments, 0) as total_attachments,\n br.created_at,\n br.updated_at\n FROM b_rfqs br\n LEFT JOIN projects p ON br.project_id = p.id\n LEFT JOIN (\n SELECT rfq_id, COUNT(*) as total_attachments\n FROM b_rfq_attachments\n GROUP BY rfq_id\n ) att_count ON br.id = att_count.rfq_id\n",
+ "name": "b_rfqs_master",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.final_rfq_detail": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_rfq_id": {
+ "name": "final_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_rfq_status": {
+ "name": "final_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_description": {
+ "name": "incoterms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_description": {
+ "name": "payment_terms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "firsttime_yn": {
+ "name": "firsttime_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_remark": {
+ "name": "vendor_remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n fr.id as final_rfq_id,\n fr.final_rfq_status,\n fr.vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n fr.due_date,\n fr.valid_date,\n fr.delivery_date,\n fr.incoterms_code,\n inc.description as incoterms_description,\n fr.payment_terms_code,\n pt.description as payment_terms_description,\n fr.currency,\n fr.tax_code,\n fr.place_of_shipping,\n fr.place_of_destination,\n fr.short_list,\n fr.return_yn,\n fr.cp_request_yn,\n fr.prject_gtc_yn,\n fr.firsttime_yn,\n fr.material_price_related_yn,\n fr.return_revision,\n fr.gtc,\n fr.gtc_valid_date,\n fr.classification,\n fr.sparepart,\n fr.remark,\n fr.vendor_remark,\n fr.created_at,\n fr.updated_at\n FROM b_rfqs br\n JOIN final_rfq fr ON br.id = fr.rfq_id\n LEFT JOIN vendors v ON fr.vendor_id = v.id\n LEFT JOIN incoterms inc ON fr.incoterms_code = inc.code\n LEFT JOIN payment_terms pt ON fr.payment_terms_code = pt.code\n",
+ "name": "final_rfq_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.initial_rfq_detail": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_rfq_id": {
+ "name": "initial_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_rfq_status": {
+ "name": "initial_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_category": {
+ "name": "vendor_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_description": {
+ "name": "incoterms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_revision": {
+ "name": "rfq_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n ir.id as initial_rfq_id,\n ir.initial_rfq_status,\n ir.vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n v.vendor_category as vendor_category,\n ir.due_date,\n ir.valid_date,\n ir.incoterms_code,\n inc.description as incoterms_description,\n ir.short_list,\n ir.return_yn,\n ir.cp_request_yn,\n ir.prject_gtc_yn,\n ir.return_revision,\n ir.rfq_revision,\n ir.gtc,\n ir.gtc_valid_date,\n ir.classification,\n ir.sparepart,\n ir.created_at,\n ir.updated_at\n FROM b_rfqs br\n JOIN initial_rfq ir ON br.id = ir.rfq_id\n LEFT JOIN vendors_with_types v ON ir.vendor_id = v.id\n LEFT JOIN incoterms inc ON ir.incoterms_code = inc.code\n",
+ "name": "initial_rfq_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfq_dashboard": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_vendor_count": {
+ "name": "initial_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_vendor_count": {
+ "name": "final_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_response_rate": {
+ "name": "initial_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_response_rate": {
+ "name": "final_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "overall_progress": {
+ "name": "overall_progress",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_to_deadline": {
+ "name": "days_to_deadline",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by_name": {
+ "name": "updated_by_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by_email": {
+ "name": "updated_by_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n -- ② SELECT 절 확장 -------------------------------------------\n SELECT\n br.id AS rfq_id,\n br.rfq_code,\n br.description,\n br.status,\n br.due_date,\n p.code AS project_code,\n p.name AS project_name,\n br.package_no,\n br.package_name,\n br.pic_code,\n br.pic_name,\n br.eng_pic_name,\n br.project_company,\n br.project_flag,\n br.project_site,\n br.remark,\n \n -- 첨부/벤더 요약 -----------------------\n COALESCE(att_count.total_attachments, 0) AS total_attachments,\n COALESCE(init_summary.vendor_count, 0) AS initial_vendor_count,\n COALESCE(final_summary.vendor_count, 0) AS final_vendor_count,\n COALESCE(init_summary.avg_response_rate, 0) AS initial_response_rate,\n COALESCE(final_summary.avg_response_rate, 0) AS final_response_rate,\n \n -- 진행률·마감까지 일수 --------------\n CASE \n WHEN br.status = 'DRAFT' THEN 0\n WHEN br.status = 'Doc. Received' THEN 10\n WHEN br.status = 'PIC Assigned' THEN 20\n WHEN br.status = 'Doc. Confirmed' THEN 30\n WHEN br.status = 'Init. RFQ Sent' THEN 40\n WHEN br.status = 'Init. RFQ Answered' THEN 50\n WHEN br.status = 'TBE started' THEN 60\n WHEN br.status = 'TBE finished' THEN 70\n WHEN br.status = 'Final RFQ Sent' THEN 80\n WHEN br.status = 'Quotation Received' THEN 90\n WHEN br.status = 'Vendor Selected' THEN 100\n ELSE 0\n END AS overall_progress,\n (br.due_date - CURRENT_DATE) AS days_to_deadline,\n \n br.created_at,\n br.updated_at,\n \n -- 💡 추가되는 컬럼 -------------------\n upd.name AS updated_by_name,\n upd.email AS updated_by_email\n FROM b_rfqs br\n LEFT JOIN projects p ON br.project_id = p.id\n \n -- ③ 사용자 정보 조인 --------------------\n LEFT JOIN users upd ON br.updated_by = upd.id\n \n -- (나머지 이미 있던 JOIN 들은 그대로) -----\n LEFT JOIN (\n SELECT rfq_id, COUNT(*) AS total_attachments\n FROM b_rfq_attachments\n GROUP BY rfq_id\n ) att_count ON br.id = att_count.rfq_id\n \n LEFT JOIN (\n SELECT \n rfq_id, \n COUNT(DISTINCT vendor_id) AS vendor_count,\n AVG(response_rate) AS avg_response_rate\n FROM vendor_response_summary\n WHERE rfq_type = 'INITIAL'\n GROUP BY rfq_id\n ) init_summary ON br.id = init_summary.rfq_id\n \n LEFT JOIN (\n SELECT \n rfq_id, \n COUNT(DISTINCT vendor_id) AS vendor_count,\n AVG(response_rate) AS avg_response_rate\n FROM vendor_response_summary\n WHERE rfq_type = 'FINAL'\n GROUP BY rfq_id\n ) final_summary ON br.id = final_summary.rfq_id\n ",
+ "name": "rfq_dashboard",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfq_progress_summary": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_to_deadline": {
+ "name": "days_to_deadline",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachments_with_multiple_revisions": {
+ "name": "attachments_with_multiple_revisions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_client_revisions": {
+ "name": "total_client_revisions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_vendor_count": {
+ "name": "initial_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_total_responses": {
+ "name": "initial_total_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_responded_count": {
+ "name": "initial_responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_up_to_date_count": {
+ "name": "initial_up_to_date_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_version_mismatch_count": {
+ "name": "initial_version_mismatch_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_response_rate": {
+ "name": "initial_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_version_match_rate": {
+ "name": "initial_version_match_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_vendor_count": {
+ "name": "final_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_total_responses": {
+ "name": "final_total_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_responded_count": {
+ "name": "final_responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_up_to_date_count": {
+ "name": "final_up_to_date_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_version_mismatch_count": {
+ "name": "final_version_mismatch_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_response_rate": {
+ "name": "final_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_version_match_rate": {
+ "name": "final_version_match_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n br.due_date,\n (br.due_date - CURRENT_DATE) as days_to_deadline,\n \n -- 첨부파일 통계\n attachment_stats.total_attachments,\n attachment_stats.attachments_with_multiple_revisions,\n attachment_stats.total_client_revisions,\n \n -- Initial RFQ 통계\n COALESCE(initial_stats.vendor_count, 0) as initial_vendor_count,\n COALESCE(initial_stats.total_responses, 0) as initial_total_responses,\n COALESCE(initial_stats.responded_count, 0) as initial_responded_count,\n COALESCE(initial_stats.up_to_date_count, 0) as initial_up_to_date_count,\n COALESCE(initial_stats.version_mismatch_count, 0) as initial_version_mismatch_count,\n COALESCE(initial_stats.response_rate, 0) as initial_response_rate,\n COALESCE(initial_stats.version_match_rate, 0) as initial_version_match_rate,\n \n -- Final RFQ 통계\n COALESCE(final_stats.vendor_count, 0) as final_vendor_count,\n COALESCE(final_stats.total_responses, 0) as final_total_responses,\n COALESCE(final_stats.responded_count, 0) as final_responded_count,\n COALESCE(final_stats.up_to_date_count, 0) as final_up_to_date_count,\n COALESCE(final_stats.version_mismatch_count, 0) as final_version_mismatch_count,\n COALESCE(final_stats.response_rate, 0) as final_response_rate,\n COALESCE(final_stats.version_match_rate, 0) as final_version_match_rate,\n \n COALESCE(file_stats.total_files, 0) as total_response_files\n \n FROM b_rfqs br\n LEFT JOIN (\n SELECT \n ba.rfq_id,\n COUNT(*) as total_attachments,\n COUNT(CASE WHEN rev_count.total_revisions > 1 THEN 1 END) as attachments_with_multiple_revisions,\n SUM(rev_count.total_revisions) as total_client_revisions\n FROM b_rfq_attachments ba\n LEFT JOIN (\n SELECT \n attachment_id,\n COUNT(*) as total_revisions\n FROM b_rfq_attachment_revisions\n GROUP BY attachment_id\n ) rev_count ON ba.id = rev_count.attachment_id\n GROUP BY ba.rfq_id\n ) attachment_stats ON br.id = attachment_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(DISTINCT var.vendor_id) as vendor_count,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) as up_to_date_count,\n COUNT(CASE WHEN vrd.effective_status = 'VERSION_MISMATCH' THEN 1 END) as version_mismatch_count,\n ROUND(\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(*), 0), 2\n ) as response_rate,\n ROUND(\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END), 0), 2\n ) as version_match_rate\n FROM b_rfqs br\n JOIN vendor_response_detail vrd ON br.id = vrd.rfq_id\n JOIN vendor_attachment_responses var ON vrd.response_id = var.id\n WHERE var.rfq_type = 'INITIAL'\n GROUP BY br.id\n ) initial_stats ON br.id = initial_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(DISTINCT var.vendor_id) as vendor_count,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) as up_to_date_count,\n COUNT(CASE WHEN vrd.effective_status = 'VERSION_MISMATCH' THEN 1 END) as version_mismatch_count,\n ROUND(\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(*), 0), 2\n ) as response_rate,\n ROUND(\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END), 0), 2\n ) as version_match_rate\n FROM b_rfqs br\n JOIN vendor_response_detail vrd ON br.id = vrd.rfq_id\n JOIN vendor_attachment_responses var ON vrd.response_id = var.id\n WHERE var.rfq_type = 'FINAL'\n GROUP BY br.id\n ) final_stats ON br.id = final_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(vra.id) as total_files\n FROM b_rfqs br\n JOIN b_rfq_attachments ba ON br.id = ba.rfq_id\n JOIN vendor_attachment_responses var ON ba.id = var.attachment_id\n LEFT JOIN vendor_response_attachments_b vra ON var.id = vra.vendor_response_id\n GROUP BY br.id\n ) file_stats ON br.id = file_stats.rfq_id\n",
+ "name": "rfq_progress_summary",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_attachments_enhanced": {
+ "columns": {
+ "response_attachment_id": {
+ "name": "response_attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_id": {
+ "name": "latest_client_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_no": {
+ "name": "latest_client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_name": {
+ "name": "latest_client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_version_matched": {
+ "name": "is_version_matched",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version_lag": {
+ "name": "version_lag",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "needs_update": {
+ "name": "needs_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_sequence": {
+ "name": "file_sequence",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest_response_file": {
+ "name": "is_latest_response_file",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n vra.id as response_attachment_id,\n vra.vendor_response_id,\n vra.file_name,\n vra.original_file_name,\n vra.file_path,\n vra.file_size,\n vra.file_type,\n vra.description,\n vra.uploaded_at,\n \n -- 응답 기본 정보\n var.attachment_id,\n var.vendor_id,\n var.rfq_type,\n var.rfq_record_id,\n var.response_status,\n var.current_revision,\n var.responded_revision,\n \n -- 코멘트 (새로 추가된 필드 포함)\n var.response_comment,\n var.vendor_comment,\n var.revision_request_comment,\n \n -- 날짜 (새로 추가된 필드 포함)\n var.requested_at,\n var.responded_at,\n var.revision_requested_at,\n \n -- 첨부파일 정보\n ba.attachment_type,\n ba.serial_no,\n ba.rfq_id,\n \n -- 벤더 정보\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n \n -- 발주처 현재 리비전 정보\n latest_rev.id as latest_client_revision_id,\n latest_rev.revision_no as latest_client_revision_no,\n latest_rev.original_file_name as latest_client_file_name,\n \n -- 리비전 비교\n CASE \n WHEN var.responded_revision = ba.current_revision THEN true \n ELSE false \n END as is_version_matched,\n \n -- 버전 차이 계산 (Rev.0, Rev.1 형태 가정)\n CASE \n WHEN var.responded_revision IS NULL THEN NULL\n WHEN ba.current_revision IS NULL THEN NULL\n ELSE CAST(SUBSTRING(ba.current_revision FROM '[0-9]+') AS INTEGER) - \n CAST(SUBSTRING(var.responded_revision FROM '[0-9]+') AS INTEGER)\n END as version_lag,\n \n CASE \n WHEN var.response_status = 'RESPONDED' \n AND var.responded_revision != ba.current_revision THEN true \n ELSE false \n END as needs_update,\n \n -- 파일 순서\n ROW_NUMBER() OVER (\n PARTITION BY var.id \n ORDER BY vra.uploaded_at DESC\n ) as file_sequence,\n \n -- 최신 응답 파일 여부\n CASE \n WHEN ROW_NUMBER() OVER (\n PARTITION BY var.id \n ORDER BY vra.uploaded_at DESC\n ) = 1 THEN true \n ELSE false \n END as is_latest_response_file\n \n FROM vendor_response_attachments_b vra\n JOIN vendor_attachment_responses var ON vra.vendor_response_id = var.id\n JOIN b_rfq_attachments ba ON var.attachment_id = ba.id\n LEFT JOIN vendors v ON var.vendor_id = v.id\n LEFT JOIN b_rfq_attachment_revisions latest_rev ON ba.latest_revision_id = latest_rev.id\n",
+ "name": "vendor_response_attachments_enhanced",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_detail": {
+ "columns": {
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_description": {
+ "name": "attachment_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_no": {
+ "name": "latest_client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_name": {
+ "name": "latest_client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_size": {
+ "name": "latest_client_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_comment": {
+ "name": "latest_client_revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_version_matched": {
+ "name": "is_version_matched",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version_lag": {
+ "name": "version_lag",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "needs_update": {
+ "name": "needs_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_multiple_revisions": {
+ "name": "has_multiple_revisions",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_file_name": {
+ "name": "latest_response_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_file_size": {
+ "name": "latest_response_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_uploaded_at": {
+ "name": "latest_response_uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "effective_status": {
+ "name": "effective_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n var.id as response_id,\n ba.rfq_id,\n br.rfq_code,\n var.rfq_type,\n var.rfq_record_id,\n \n -- 첨부파일 정보\n ba.id as attachment_id,\n ba.attachment_type,\n ba.serial_no,\n ba.description as attachment_description,\n \n -- 벤더 정보\n v.id as vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n \n -- 응답 상태\n var.response_status,\n var.current_revision,\n var.responded_revision,\n \n -- 코멘트 (새로 추가된 필드 포함)\n var.response_comment,\n var.vendor_comment,\n var.revision_request_comment,\n \n -- 날짜 (새로 추가된 필드 포함)\n var.requested_at,\n var.responded_at,\n var.revision_requested_at,\n \n -- 발주처 최신 리비전\n latest_rev.revision_no as latest_client_revision_no,\n latest_rev.original_file_name as latest_client_file_name,\n latest_rev.file_size as latest_client_file_size,\n latest_rev.revision_comment as latest_client_revision_comment,\n \n -- 리비전 분석\n CASE \n WHEN var.responded_revision = ba.current_revision THEN true \n ELSE false \n END as is_version_matched,\n \n CASE \n WHEN var.responded_revision IS NULL OR ba.current_revision IS NULL THEN NULL\n ELSE CAST(SUBSTRING(ba.current_revision FROM '[0-9]+') AS INTEGER) - \n CAST(SUBSTRING(var.responded_revision FROM '[0-9]+') AS INTEGER)\n END as version_lag,\n \n CASE \n WHEN var.response_status = 'RESPONDED' \n AND var.responded_revision != ba.current_revision THEN true \n ELSE false \n END as needs_update,\n \n CASE \n WHEN revision_count.total_revisions > 1 THEN true \n ELSE false \n END as has_multiple_revisions,\n \n -- 응답 파일 정보\n COALESCE(file_stats.total_files, 0) as total_response_files,\n file_stats.latest_file_name as latest_response_file_name,\n file_stats.latest_file_size as latest_response_file_size,\n file_stats.latest_uploaded_at as latest_response_uploaded_at,\n \n -- 효과적인 상태\n CASE \n WHEN var.response_status = 'NOT_RESPONDED' THEN 'NOT_RESPONDED'\n WHEN var.response_status = 'WAIVED' THEN 'WAIVED'\n WHEN var.response_status = 'REVISION_REQUESTED' THEN 'REVISION_REQUESTED'\n WHEN var.response_status = 'RESPONDED' AND var.responded_revision = ba.current_revision THEN 'UP_TO_DATE'\n WHEN var.response_status = 'RESPONDED' AND var.responded_revision != ba.current_revision THEN 'VERSION_MISMATCH'\n ELSE var.response_status\n END as effective_status\n \n FROM vendor_attachment_responses var\n JOIN b_rfq_attachments ba ON var.attachment_id = ba.id\n JOIN b_rfqs br ON ba.rfq_id = br.id\n LEFT JOIN vendors v ON var.vendor_id = v.id\n LEFT JOIN b_rfq_attachment_revisions latest_rev ON ba.latest_revision_id = latest_rev.id\n LEFT JOIN (\n SELECT \n attachment_id,\n COUNT(*) as total_revisions\n FROM b_rfq_attachment_revisions\n GROUP BY attachment_id\n ) revision_count ON ba.id = revision_count.attachment_id\n LEFT JOIN (\n SELECT \n vendor_response_id,\n COUNT(*) as total_files,\n MAX(original_file_name) as latest_file_name,\n MAX(file_size) as latest_file_size,\n MAX(uploaded_at) as latest_uploaded_at\n FROM vendor_response_attachments_b\n GROUP BY vendor_response_id\n ) file_stats ON var.id = file_stats.vendor_response_id\n",
+ "name": "vendor_response_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_summary": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_count": {
+ "name": "responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pending_count": {
+ "name": "pending_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "waived_count": {
+ "name": "waived_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_count": {
+ "name": "revision_requested_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_rate": {
+ "name": "response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completion_rate": {
+ "name": "completion_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n v.id as vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n var.rfq_type,\n COUNT(var.id) as total_attachments,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN var.response_status = 'NOT_RESPONDED' THEN 1 END) as pending_count,\n COUNT(CASE WHEN var.response_status = 'WAIVED' THEN 1 END) as waived_count,\n COUNT(CASE WHEN var.response_status = 'REVISION_REQUESTED' THEN 1 END) as revision_requested_count,\n ROUND(\n (COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status != 'WAIVED' THEN 1 END), 0)), \n 2\n ) as response_rate,\n ROUND(\n ((COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) + \n COUNT(CASE WHEN var.response_status = 'WAIVED' THEN 1 END)) * 100.0 / COUNT(var.id)), \n 2\n ) as completion_rate\n FROM b_rfqs br\n JOIN b_rfq_attachments bra ON br.id = bra.rfq_id\n JOIN vendor_attachment_responses var ON bra.id = var.attachment_id\n JOIN vendors v ON var.vendor_id = v.id\n GROUP BY br.id, br.rfq_code, br.status, v.id, v.vendor_code, v.vendor_name, v.country, v.business_size, var.rfq_type\n",
+ "name": "vendor_response_summary",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.tech_vendor_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_eng": {
+ "name": "country_eng",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_fab": {
+ "name": "country_fab",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_name": {
+ "name": "agent_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_phone": {
+ "name": "agent_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_email": {
+ "name": "agent_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "tech_vendor_type": {
+ "name": "tech_vendor_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"id\", \"vendor_name\", \"vendor_code\", \"tax_id\", \"address\", \"country\", \"country_eng\", \"country_fab\", \"agent_name\", \"agent_phone\", \"agent_email\", \"phone\", \"email\", \"website\", \"status\", \"tech_vendor_type\", \"representative_name\", \"representative_email\", \"representative_phone\", \"representative_birth\", \"created_at\", \"updated_at\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', c.id,\n 'contactName', c.contact_name,\n 'contactPosition', c.contact_position,\n 'contactTitle', c.contact_title,\n 'contactEmail', c.contact_email,\n 'contactPhone', c.contact_phone,\n 'isPrimary', c.is_primary\n )\n ),\n '[]'::json\n )\n FROM tech_vendor_contacts c\n WHERE c.vendor_id = tech_vendors.id)\n as \"contacts\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', a.id,\n 'fileName', a.file_name,\n 'filePath', a.file_path,\n 'attachmentType', a.attachment_type,\n 'createdAt', a.created_at\n )\n ORDER BY a.attachment_type, a.created_at DESC\n ),\n '[]'::json\n )\n FROM tech_vendor_attachments a\n WHERE a.vendor_id = tech_vendors.id)\n as \"attachments\", \n (SELECT COUNT(*)\n FROM tech_vendor_attachments a\n WHERE a.vendor_id = tech_vendors.id)\n as \"attachment_count\", \n (SELECT COUNT(*) \n FROM vendor_contacts c\n WHERE c.vendor_id = tech_vendors.id)\n as \"contact_count\", \n (SELECT COUNT(*) \n FROM tech_vendor_possible_items i\n WHERE i.vendor_id = tech_vendors.id)\n as \"item_count\" from \"tech_vendors\"",
+ "name": "tech_vendor_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.esg_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"esg_evaluations\".\"id\", \"esg_evaluations\".\"serial_number\", \"esg_evaluations\".\"category\", \"esg_evaluations\".\"inspection_item\", \"esg_evaluations\".\"is_active\", \"esg_evaluations\".\"created_at\", \"esg_evaluations\".\"updated_at\", count(distinct \"esg_evaluation_items\".\"id\") as \"total_evaluation_items\", count(\"esg_answer_options\".\"id\") as \"total_answer_options\", coalesce(sum(\"esg_answer_options\".\"score\"), 0) as \"max_possible_score\", \n (\n SELECT array_agg(evaluation_item order by order_index) \n FROM esg_evaluation_items \n WHERE esg_evaluation_id = \"esg_evaluations\".\"id\" \n AND is_active = true \n AND evaluation_item is not null\n )\n as \"evaluation_items_list\" from \"esg_evaluations\" left join \"esg_evaluation_items\" on \"esg_evaluations\".\"id\" = \"esg_evaluation_items\".\"esg_evaluation_id\" AND \"esg_evaluation_items\".\"is_active\" = true left join \"esg_answer_options\" on \"esg_evaluation_items\".\"id\" = \"esg_answer_options\".\"esg_evaluation_item_id\" AND \"esg_answer_options\".\"is_active\" = true group by \"esg_evaluations\".\"id\", \"esg_evaluations\".\"serial_number\", \"esg_evaluations\".\"category\", \"esg_evaluations\".\"inspection_item\", \"esg_evaluations\".\"is_active\", \"esg_evaluations\".\"created_at\", \"esg_evaluations\".\"updated_at\"",
+ "name": "esg_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.evaluation_targets_with_departments": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"evaluation_targets\".\"id\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"evaluation_targets\".\"status\", \"evaluation_targets\".\"consensus_status\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"confirmed_at\", \"evaluation_targets\".\"confirmed_by\", \"evaluation_targets\".\"ld_claim_count\", \"evaluation_targets\".\"ld_claim_amount\", \"evaluation_targets\".\"ld_claim_currency\", \"evaluation_targets\".\"created_at\", \"evaluation_targets\".\"updated_at\", order_reviewer.name as \"order_reviewer_name\", order_reviewer.email as \"order_reviewer_email\", order_etr.department_name_from as \"order_department_name\", order_review.is_approved as \"order_is_approved\", order_review.reviewed_at as \"order_reviewed_at\", procurement_reviewer.name as \"procurement_reviewer_name\", procurement_reviewer.email as \"procurement_reviewer_email\", procurement_etr.department_name_from as \"procurement_department_name\", procurement_review.is_approved as \"procurement_is_approved\", procurement_review.reviewed_at as \"procurement_reviewed_at\", quality_reviewer.name as \"quality_reviewer_name\", quality_reviewer.email as \"quality_reviewer_email\", quality_etr.department_name_from as \"quality_department_name\", quality_review.is_approved as \"quality_is_approved\", quality_review.reviewed_at as \"quality_reviewed_at\", design_reviewer.name as \"design_reviewer_name\", design_reviewer.email as \"design_reviewer_email\", design_etr.department_name_from as \"design_department_name\", design_review.is_approved as \"design_is_approved\", design_review.reviewed_at as \"design_reviewed_at\", cs_reviewer.name as \"cs_reviewer_name\", cs_reviewer.email as \"cs_reviewer_email\", cs_etr.department_name_from as \"cs_department_name\", cs_review.is_approved as \"cs_is_approved\", cs_review.reviewed_at as \"cs_reviewed_at\" from \"evaluation_targets\" left join evaluation_target_reviewers order_etr on \"evaluation_targets\".\"id\" = order_etr.evaluation_target_id AND order_etr.department_code = 'ORDER_EVAL' left join users order_reviewer on order_etr.reviewer_user_id = order_reviewer.id left join evaluation_target_reviews order_review on \"evaluation_targets\".\"id\" = order_review.evaluation_target_id \n AND order_review.reviewer_user_id = order_reviewer.id \n AND order_review.department_code = 'ORDER_EVAL' left join evaluation_target_reviewers procurement_etr on \"evaluation_targets\".\"id\" = procurement_etr.evaluation_target_id AND procurement_etr.department_code = 'PROCUREMENT_EVAL' left join users procurement_reviewer on procurement_etr.reviewer_user_id = procurement_reviewer.id left join evaluation_target_reviews procurement_review on \"evaluation_targets\".\"id\" = procurement_review.evaluation_target_id \n AND procurement_review.reviewer_user_id = procurement_reviewer.id \n AND procurement_review.department_code = 'PROCUREMENT_EVAL' left join evaluation_target_reviewers quality_etr on \"evaluation_targets\".\"id\" = quality_etr.evaluation_target_id AND quality_etr.department_code = 'QUALITY_EVAL' left join users quality_reviewer on quality_etr.reviewer_user_id = quality_reviewer.id left join evaluation_target_reviews quality_review on \"evaluation_targets\".\"id\" = quality_review.evaluation_target_id \n AND quality_review.reviewer_user_id = quality_reviewer.id \n AND quality_review.department_code = 'QUALITY_EVAL' left join evaluation_target_reviewers design_etr on \"evaluation_targets\".\"id\" = design_etr.evaluation_target_id AND design_etr.department_code = 'DESIGN_EVAL' left join users design_reviewer on design_etr.reviewer_user_id = design_reviewer.id left join evaluation_target_reviews design_review on \"evaluation_targets\".\"id\" = design_review.evaluation_target_id \n AND design_review.reviewer_user_id = design_reviewer.id \n AND design_review.department_code = 'DESIGN_EVAL' left join evaluation_target_reviewers cs_etr on \"evaluation_targets\".\"id\" = cs_etr.evaluation_target_id AND cs_etr.department_code = 'CS_EVAL' left join users cs_reviewer on cs_etr.reviewer_user_id = cs_reviewer.id left join evaluation_target_reviews cs_review on \"evaluation_targets\".\"id\" = cs_review.evaluation_target_id \n AND cs_review.reviewer_user_id = cs_reviewer.id \n AND cs_review.department_code = 'CS_EVAL'",
+ "name": "evaluation_targets_with_departments",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.periodic_evaluations_aggregated_view": {
+ "columns": {
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select CONCAT(\"evaluation_year\", '_', \"vendor_id\") as \"id\", \"evaluation_year\", \"vendor_id\", \"vendor_code\", \"vendor_name\", \"domestic_foreign\", \"material_type\", ROUND(AVG(NULLIF(\"process_score\", 0)), 1) as \"process_score\", ROUND(AVG(NULLIF(\"price_score\", 0)), 1) as \"price_score\", ROUND(AVG(NULLIF(\"delivery_score\", 0)), 1) as \"delivery_score\", ROUND(AVG(NULLIF(\"self_evaluation_score\", 0)), 1) as \"self_evaluation_score\", ROUND(AVG(NULLIF(\"participation_bonus\", 0)), 1) as \"participation_bonus\", ROUND(AVG(NULLIF(\"quality_deduction\", 0)), 1) as \"quality_deduction\", ROUND(AVG(NULLIF(\"final_score\", 0)), 1) as \"final_score\", \n CASE \n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 90 THEN 'S'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 80 THEN 'A'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 70 THEN 'B'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 60 THEN 'C'\n ELSE 'D'\n END\n as \"evaluation_grade\", \n CASE \n WHEN AVG(NULLIF(\"final_score\", 0)) >= 90 THEN 'S'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 80 THEN 'A'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 70 THEN 'B'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 60 THEN 'C'\n ELSE 'D'\n END\n as \"final_grade\", \n CASE \n WHEN COUNT(CASE WHEN \"status\" = 'FINALIZED' THEN 1 END) = COUNT(*) THEN 'FINALIZED'\n WHEN COUNT(CASE WHEN \"status\" IN ('REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) = COUNT(*) THEN 'REVIEW_COMPLETED'\n WHEN COUNT(CASE WHEN \"status\" IN ('IN_REVIEW', 'REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) > 0 THEN 'IN_REVIEW'\n WHEN COUNT(CASE WHEN \"status\" IN ('SUBMITTED', 'IN_REVIEW', 'REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) > 0 THEN 'SUBMITTED'\n ELSE 'PENDING_SUBMISSION'\n END\n as \"status\", \n CASE \n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"order_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"procurement_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"quality_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"design_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"cs_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"admin_eval_status\", \n BOOL_AND(\"documents_submitted\")\n as \"documents_submitted\", MAX(\"submission_date\") as \"submission_date\", MAX(\"submission_deadline\") as \"submission_deadline\", MAX(\"review_completed_at\") as \"review_completed_at\", MAX(\"finalized_at\") as \"finalized_at\", \n CASE \n WHEN COUNT(DISTINCT \"division\") > 1 THEN 'BOTH'\n ELSE MAX(\"division\")\n END\n as \"division\", COUNT(*)::int as \"evaluation_count\", STRING_AGG(DISTINCT \"division\", ',') as \"divisions\", SUM(\"total_reviewers\")::int as \"total_reviewers\", SUM(\"completed_reviewers\")::int as \"completed_reviewers\", SUM(\"pending_reviewers\")::int as \"pending_reviewers\", MAX(\"evaluation_period\") as \"evaluation_period\", STRING_AGG(\"evaluation_note\", ' | ') as \"evaluation_note\", (ARRAY_AGG(\"periodic_evaluations_view\".\"finalized_by\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by\", (ARRAY_AGG(\"periodic_evaluations_view\".\"name\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by_user_name\", (ARRAY_AGG(\"periodic_evaluations_view\".\"email\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by_user_email\", MIN(\"created_at\") as \"created_at\", MAX(\"updated_at\") as \"updated_at\", (ARRAY_AGG(\"periodic_evaluations_view\".\"evaluation_target_id\"))[1] as \"evaluation_target_id\", \n STRING_AGG(DISTINCT \"admin_comment\", ' | ')\n as \"evaluation_target_admin_comment\", \n STRING_AGG(DISTINCT \"consolidated_comment\", ' | ')\n as \"evaluation_target_consolidated_comment\", (ARRAY_AGG(\"periodic_evaluations_view\".\"consensus_status\" ORDER BY \"periodic_evaluations_view\".\"updated_at\" DESC NULLS LAST))[1] as \"evaluation_target_consensus_status\", \n MAX(\"confirmed_at\")\n as \"evaluation_target_confirmed_at\" from \"periodic_evaluations_view\" group by \"periodic_evaluations_view\".\"evaluation_year\", \"periodic_evaluations_view\".\"vendor_id\", \"periodic_evaluations_view\".\"vendor_code\", \"periodic_evaluations_view\".\"vendor_name\", \"periodic_evaluations_view\".\"domestic_foreign\", \"periodic_evaluations_view\".\"material_type\"",
+ "name": "periodic_evaluations_aggregated_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.periodic_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"periodic_evaluations\".\"id\", \"periodic_evaluations\".\"evaluation_target_id\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_id\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"periodic_evaluations\".\"evaluation_period\", \"periodic_evaluations\".\"documents_submitted\", \"periodic_evaluations\".\"submission_date\", \"periodic_evaluations\".\"submission_deadline\", \"periodic_evaluations\".\"final_score\", \"periodic_evaluations\".\"final_grade\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'processScore'\n AND re.is_completed = true\n ) as \"process_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'priceScore'\n AND re.is_completed = true\n ) as \"price_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'deliveryScore'\n AND re.is_completed = true\n ) as \"delivery_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'selfEvaluationScore'\n AND re.is_completed = true\n ) as \"self_evaluation_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'bonus'\n AND re.is_completed = true\n ) as \"participation_bonus\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'penalty'\n AND re.is_completed = true\n ) as \"quality_deduction\", \"periodic_evaluations\".\"status\", \"periodic_evaluations\".\"review_completed_at\", \"periodic_evaluations\".\"finalized_at\", \"periodic_evaluations\".\"finalized_by\", \"periodic_evaluations\".\"evaluation_note\", \"periodic_evaluations\".\"created_at\", \"periodic_evaluations\".\"updated_at\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"consensus_status\", \"evaluation_targets\".\"confirmed_at\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'ORDER_EVAL'\n LIMIT 1\n ) as \"order_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'PROCUREMENT_EVAL'\n LIMIT 1\n ) as \"procurement_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'QUALITY_EVAL'\n LIMIT 1\n ) as \"quality_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'DESIGN_EVAL'\n LIMIT 1\n ) as \"design_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'CS_EVAL'\n LIMIT 1\n ) as \"cs_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'admin'\n LIMIT 1\n ) as \"admin_eval_status\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n ) as \"total_reviewers\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND re.is_completed = true\n ) as \"completed_reviewers\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND re.is_completed = false\n ) as \"pending_reviewers\", \"users\".\"name\", \"users\".\"email\" from \"periodic_evaluations\" left join \"evaluation_targets\" on \"periodic_evaluations\".\"evaluation_target_id\" = \"evaluation_targets\".\"id\" left join \"users\" on \"periodic_evaluations\".\"finalized_by\" = \"users\".\"id\" order by \"periodic_evaluations\".\"created_at\"",
+ "name": "periodic_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.reviewer_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_target_reviewer_id": {
+ "name": "evaluation_target_reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_completed": {
+ "name": "is_completed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_grade": {
+ "name": "evaluation_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name_from": {
+ "name": "department_name_from",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "assigned_by": {
+ "name": "assigned_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"reviewer_evaluations\".\"id\", \"reviewer_evaluations\".\"periodic_evaluation_id\", \"reviewer_evaluations\".\"evaluation_target_reviewer_id\", \"reviewer_evaluations\".\"is_completed\", \"reviewer_evaluations\".\"completed_at\", \"reviewer_evaluations\".\"reviewer_comment\", \"reviewer_evaluations\".\"created_at\", \"reviewer_evaluations\".\"updated_at\", \"periodic_evaluations\".\"evaluation_period\", \"reviewer_evaluations\".\"submitted_at\", \"periodic_evaluations\".\"documents_submitted\", \"periodic_evaluations\".\"submission_date\", \"periodic_evaluations\".\"submission_deadline\", \"periodic_evaluations\".\"final_score\", \"periodic_evaluations\".\"final_grade\", \"periodic_evaluations\".\"evaluation_score\", \"periodic_evaluations\".\"evaluation_grade\", \"periodic_evaluations\".\"status\", \"periodic_evaluations\".\"review_completed_at\", \"periodic_evaluations\".\"finalized_at\", \"periodic_evaluations\".\"finalized_by\", \"periodic_evaluations\".\"evaluation_note\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_id\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"confirmed_at\", \"evaluation_targets\".\"confirmed_by\", \"evaluation_targets\".\"ld_claim_count\", \"evaluation_targets\".\"ld_claim_amount\", \"evaluation_targets\".\"ld_claim_currency\", \"evaluation_target_reviewers\".\"department_code\", \"evaluation_target_reviewers\".\"department_name_from\", \"evaluation_target_reviewers\".\"reviewer_user_id\", reviewer_user.name as \"reviewer_name\", reviewer_user.email as \"reviewer_email\", \"evaluation_target_reviewers\".\"assigned_at\", \"evaluation_target_reviewers\".\"assigned_by\", assigned_by_user.name as \"assigned_by_user_name\", finalized_by_user.name as \"finalized_by_user_name\", finalized_by_user.email as \"finalized_by_user_email\", \n CASE \n WHEN \"reviewer_evaluations\".\"is_completed\" = true THEN 'COMPLETED'\n ELSE 'NOT_STARTED'\n END\n as \"evaluation_progress\" from \"reviewer_evaluations\" left join \"periodic_evaluations\" on \"reviewer_evaluations\".\"periodic_evaluation_id\" = \"periodic_evaluations\".\"id\" left join \"evaluation_targets\" on \"periodic_evaluations\".\"evaluation_target_id\" = \"evaluation_targets\".\"id\" left join \"evaluation_target_reviewers\" on \"reviewer_evaluations\".\"evaluation_target_reviewer_id\" = \"evaluation_target_reviewers\".\"id\" left join users reviewer_user on \"evaluation_target_reviewers\".\"reviewer_user_id\" = reviewer_user.id left join users assigned_by_user on \"evaluation_target_reviewers\".\"assigned_by\" = assigned_by_user.id left join users finalized_by_user on \"periodic_evaluations\".\"finalized_by\" = finalized_by_user.id order by \"reviewer_evaluations\".\"is_completed\" ASC, \"reviewer_evaluations\".\"updated_at\" DESC",
+ "name": "reviewer_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.reg_eval_criteria_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "category2": {
+ "name": "category2",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'processScore'"
+ },
+ "item": {
+ "name": "item",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "range": {
+ "name": "range",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score_equip_ship": {
+ "name": "score_equip_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_equip_marine": {
+ "name": "score_equip_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_ship": {
+ "name": "score_bulk_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_marine": {
+ "name": "score_bulk_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"reg_eval_criteria_details\".\"id\", \"reg_eval_criteria_details\".\"criteria_id\", \"reg_eval_criteria\".\"category\", \"reg_eval_criteria\".\"category2\", \"reg_eval_criteria\".\"item\", \"reg_eval_criteria\".\"classification\", \"reg_eval_criteria\".\"range\", \"reg_eval_criteria_details\".\"detail\", \"reg_eval_criteria_details\".\"order_index\", \"reg_eval_criteria_details\".\"score_equip_ship\", \"reg_eval_criteria_details\".\"score_equip_marine\", \"reg_eval_criteria_details\".\"score_bulk_ship\", \"reg_eval_criteria_details\".\"score_bulk_marine\", \"reg_eval_criteria\".\"remarks\" from \"reg_eval_criteria\" left join \"reg_eval_criteria_details\" on \"reg_eval_criteria\".\"id\" = \"reg_eval_criteria_details\".\"criteria_id\" order by \"reg_eval_criteria\".\"id\", \"reg_eval_criteria_details\".\"order_index\"",
+ "name": "reg_eval_criteria_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.project_gtc_view": {
+ "columns": {},
+ "definition": "select \"projects\".\"id\" as \"id\", \"projects\".\"code\" as \"code\", \"projects\".\"name\" as \"name\", \"projects\".\"type\" as \"type\", \"projects\".\"created_at\" as \"project_created_at\", \"projects\".\"updated_at\" as \"project_updated_at\", \"project_gtc_files\".\"id\" as \"gtc_file_id\", \"project_gtc_files\".\"file_name\" as \"fileName\", \"project_gtc_files\".\"file_path\" as \"filePath\", \"project_gtc_files\".\"original_file_name\" as \"originalFileName\", \"project_gtc_files\".\"file_size\" as \"fileSize\", \"project_gtc_files\".\"mime_type\" as \"mimeType\", \"project_gtc_files\".\"created_at\" as \"gtcCreatedAt\", \"project_gtc_files\".\"updated_at\" as \"gtcUpdatedAt\" from \"projects\" left join \"project_gtc_files\" on \"projects\".\"id\" = \"project_gtc_files\".\"project_id\"",
+ "name": "project_gtc_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_answer_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "qna_id": {
+ "name": "qna_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"qna_answer\".\"id\", \"qna_answer\".\"qna_id\", \"qna_answer\".\"content\", \"qna_answer\".\"author\", \"qna_answer\".\"created_at\" as \"created_at\", \"qna_answer\".\"updated_at\" as \"updated_at\", \"qna_answer\".\"is_deleted\" as \"is_deleted\", \"qna_answer\".\"deleted_at\" as \"deleted_at\", \"qna\".\"title\" as \"question_title\", \"qna\".\"category\" as \"question_category\", \"qna\".\"author\" as \"question_author\", \"qna\".\"created_at\" as \"question_created_at\", \"users\".\"name\" as \"author_name\", \"users\".\"email\" as \"author_email\", \"users\".\"domain\" as \"author_domain\", \"users\".\"phone\" as \"author_phone\", \"users\".\"image_url\" as \"author_image_url\", \"users\".\"language\" as \"author_language\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", \"tech_vendors\".\"vendor_code\" as \"tech_vendor_code\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", COALESCE(\"vendors\".\"vendor_code\", \"tech_vendors\".\"vendor_code\") as \"company_code\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"total_comments\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"comment_count\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.parent_comment_id IS NULL\n AND qc.is_deleted = false\n ) as \"parent_comments_count\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.parent_comment_id IS NOT NULL\n AND qc.is_deleted = false\n ) as \"child_comments_count\", (\n SELECT MAX(qc.created_at)\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"last_commented_at\", (\n SELECT ROW_NUMBER() OVER (\n PARTITION BY qa2.qna_id \n ORDER BY qa2.created_at ASC\n )\n FROM \"qna_answer\" qa2\n WHERE qa2.id = \"qna_answer\".\"id\"\n AND qa2.is_deleted = false\n ) as \"answer_order\", (\n \"qna_answer\".\"id\" = (\n SELECT qa2.id\n FROM \"qna_answer\" qa2\n WHERE qa2.qna_id = \"qna_answer\".\"qna_id\"\n AND qa2.is_deleted = false\n ORDER BY qa2.created_at ASC\n LIMIT 1\n )\n ) as \"is_first_answer\", (\n \"qna_answer\".\"id\" = (\n SELECT qa2.id\n FROM \"qna_answer\" qa2\n WHERE qa2.qna_id = \"qna_answer\".\"qna_id\"\n AND qa2.is_deleted = false\n ORDER BY qa2.created_at DESC\n LIMIT 1\n )\n ) as \"is_latest_answer\" from \"qna_answer\" left join \"qna\" on \"qna_answer\".\"qna_id\" = \"qna\".\"id\" left join \"users\" on \"qna_answer\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna_answer\".\"is_deleted\" = false order by \"qna_answer\".\"created_at\"",
+ "name": "qna_answer_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_comment_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_id": {
+ "name": "answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"qna_comments\".\"id\", \"qna_comments\".\"content\", \"qna_comments\".\"author\", \"qna_comments\".\"answer_id\", \"qna_comments\".\"parent_comment_id\", \"qna_comments\".\"created_at\" as \"created_at\", \"qna_comments\".\"updated_at\" as \"updated_at\", \"qna_comments\".\"is_deleted\" as \"is_deleted\", \"qna_comments\".\"deleted_at\" as \"deleted_at\", \"qna_answer\".\"content\" as \"answer_content\", \"qna_answer\".\"author\" as \"answer_author\", \"qna_answer\".\"created_at\" as \"answer_created_at\", \"qna_answer\".\"qna_id\" as \"qna_id\", \"qna\".\"title\" as \"question_title\", \"qna\".\"category\" as \"question_category\", \"qna\".\"author\" as \"question_author\", \"users\".\"name\" as \"author_name\", \"users\".\"email\" as \"author_email\", \"users\".\"domain\" as \"author_domain\", \"users\".\"image_url\" as \"author_image_url\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", \"qna_comments\".\"parent_comment_id\" IS NULL as \"is_parent_comment\", \"qna_comments\".\"parent_comment_id\" IS NOT NULL as \"is_child_comment\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc2\n WHERE qc2.parent_comment_id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"child_comments_count\", (\n SELECT COUNT(*) > 0\n FROM \"qna_comments\" qc2\n WHERE qc2.parent_comment_id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"has_child_comments\", \n CASE \n WHEN \"qna_comments\".\"parent_comment_id\" IS NULL THEN 0\n ELSE 1\n END\n as \"comment_depth\", (\n SELECT ROW_NUMBER() OVER (\n PARTITION BY qc2.answer_id, qc2.parent_comment_id\n ORDER BY qc2.created_at ASC\n )\n FROM \"qna_comments\" qc2\n WHERE qc2.id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"comment_order\" from \"qna_comments\" left join \"qna_answer\" on \"qna_comments\".\"answer_id\" = \"qna_answer\".\"id\" left join \"qna\" on \"qna_answer\".\"qna_id\" = \"qna\".\"id\" left join \"users\" on \"qna_comments\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna_comments\".\"is_deleted\" = false order by \"qna_comments\".\"created_at\"",
+ "name": "qna_comment_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "qna_category",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'partners'"
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'en'"
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "last_login_at": {
+ "name": "last_login_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"qna\".\"id\", \"qna\".\"title\", \"qna\".\"content\", \"qna\".\"author\", \"qna\".\"category\", \"qna\".\"created_at\", \"qna\".\"updated_at\", \"qna\".\"is_deleted\", \"qna\".\"deleted_at\", \"users\".\"name\", \"users\".\"email\", \"users\".\"domain\", \"users\".\"phone\", \"users\".\"image_url\", \"users\".\"language\", \"users\".\"is_active\", \"users\".\"last_login_at\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"status\" as \"vendor_status\", \"vendors\".\"country\" as \"vendor_country\", \"vendors\".\"business_size\" as \"vendor_business_size\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", \"tech_vendors\".\"vendor_code\" as \"tech_vendor_code\", \"tech_vendors\".\"status\" as \"tech_vendor_status\", \"tech_vendors\".\"country\" as \"tech_vendor_country\", \"tech_vendors\".\"tech_vendor_type\" as \"tech_vendor_type\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", COALESCE(\"vendors\".\"vendor_code\", \"tech_vendors\".\"vendor_code\") as \"company_code\", COALESCE(\"vendors\".\"country\", \"tech_vendors\".\"country\") as \"company_country\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", (\n SELECT COUNT(*)::int\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"total_answers\", (\n SELECT COUNT(*)::int\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"answer_count\", (\n SELECT MAX(qa.created_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"last_answered_at\", (\n SELECT MIN(qa.created_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"first_answered_at\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qc.is_deleted = false\n AND qa.is_deleted = false\n ) as \"total_comments\", (\n SELECT GREATEST(\n \"qna\".\"updated_at\",\n COALESCE((\n SELECT MAX(qa.updated_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ), \"qna\".\"updated_at\"),\n COALESCE((\n SELECT MAX(qc.updated_at)\n FROM \"qna_comments\" qc\n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qc.is_deleted = false\n AND qa.is_deleted = false\n ), \"qna\".\"updated_at\")\n )\n ) as \"last_activity_at\", (\n SELECT COUNT(*) > 0\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"has_answers\", (\n SELECT COUNT(*) > 0\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"is_answered\", (\n (SELECT COUNT(*) FROM \"qna_answer\" qa WHERE qa.qna_id = \"qna\".\"id\" AND qa.is_deleted = false) >= 3\n OR\n (SELECT COUNT(*) FROM \"qna_comments\" qc \n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id \n WHERE qa.qna_id = \"qna\".\"id\" AND qc.is_deleted = false AND qa.is_deleted = false) >= 5\n ) as \"is_popular\" from \"qna\" left join \"users\" on \"qna\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna\".\"is_deleted\" = false order by \"qna\".\"created_at\"",
+ "name": "qna_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.template_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sample_data": {
+ "name": "sample_data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_email": {
+ "name": "created_by_email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variables": {
+ "name": "variables",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.content,\n t.description,\n t.category,\n t.sample_data,\n t.is_active,\n t.version,\n t.created_by,\n u.name AS created_by_name,\n u.email AS created_by_email,\n t.created_at,\n t.updated_at,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', v.id,\n 'variableName', v.variable_name,\n 'variableType', v.variable_type,\n 'defaultValue', v.default_value,\n 'isRequired', v.is_required,\n 'description', v.description,\n 'displayOrder', v.display_order\n ) ORDER BY v.display_order\n ) FILTER (WHERE v.id IS NOT NULL),\n '[]'::json\n ) AS variables\n FROM \"templates\" t\n LEFT JOIN \"users\" u ON t.created_by = u.id\n LEFT JOIN \"template_variables\" v ON t.id = v.template_id\n GROUP BY\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.content,\n t.description,\n t.category,\n t.sample_data,\n t.is_active,\n t.version,\n t.created_by,\n u.name,\n u.email,\n t.created_at,\n t.updated_at\n",
+ "name": "template_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.template_list_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_email": {
+ "name": "created_by_email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_count": {
+ "name": "variable_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "required_variable_count": {
+ "name": "required_variable_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.description,\n t.category,\n t.is_active,\n t.version,\n t.created_by,\n u.name AS created_by_name,\n u.email AS created_by_email,\n t.created_at,\n t.updated_at,\n COALESCE(v.variable_count, 0) AS variable_count,\n COALESCE(v.required_variable_count, 0) AS required_variable_count\n FROM \"templates\" t\n LEFT JOIN \"users\" u ON t.created_by = u.id\n LEFT JOIN (\n SELECT\n template_id,\n COUNT(*) AS variable_count,\n COUNT(*) FILTER (WHERE is_required) AS required_variable_count\n FROM \"template_variables\"\n GROUP BY template_id\n ) v ON t.id = v.template_id\n",
+ "name": "template_list_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_clauses_tree_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"gtc_clauses\".\"id\", \"gtc_clauses\".\"document_id\", \"gtc_clauses\".\"parent_id\", \"gtc_clauses\".\"item_number\", \"gtc_clauses\".\"category\", \"gtc_clauses\".\"subtitle\", \"gtc_clauses\".\"content\", \"gtc_clauses\".\"sort_order\", \"gtc_clauses\".\"depth\", \"gtc_clauses\".\"full_path\", \"gtc_clauses\".\"images\", \"gtc_clauses\".\"is_active\", \"gtc_clauses\".\"created_at\", \"gtc_clauses\".\"created_by_id\", \"gtc_clauses\".\"updated_at\", \"gtc_clauses\".\"updated_by_id\", \"gtc_clauses\".\"edit_reason\", \"gtc_documents\".\"type\", \"gtc_documents\".\"file_name\", \"gtc_documents\".\"revision\", \"gtc_documents\".\"project_id\", created_by_user.name as \"created_by_name\", created_by_user.email as \"created_by_email\", updated_by_user.name as \"updated_by_name\", updated_by_user.email as \"updated_by_email\", parent_clause.item_number as \"parent_item_number\", parent_clause.subtitle as \"parent_subtitle\", \n (\n SELECT count(*)\n FROM gtc_clauses children\n WHERE children.parent_id = \"gtc_clauses\".\"id\"\n AND children.is_active = true\n )\n as \"children_count\", \n (\n SELECT count(*)\n FROM gtc_clauses siblings\n WHERE siblings.parent_id = \"gtc_clauses\".\"parent_id\"\n AND siblings.is_active = true\n )\n as \"siblings_count\", \n \"gtc_clauses\".\"created_by_id\" != \"gtc_clauses\".\"updated_by_id\" OR \n \"gtc_clauses\".\"created_at\" != \"gtc_clauses\".\"updated_at\"\n as \"has_edit_history\" from \"gtc_clauses\" left join \"gtc_documents\" on \"gtc_clauses\".\"document_id\" = \"gtc_documents\".\"id\" left join users created_by_user on \"gtc_clauses\".\"created_by_id\" = created_by_user.id left join users updated_by_user on \"gtc_clauses\".\"updated_by_id\" = updated_by_user.id left join gtc_clauses parent_clause on \"gtc_clauses\".\"parent_id\" = parent_clause.id",
+ "name": "gtc_clauses_tree_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_documents_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"gtc_documents\".\"id\", \"gtc_documents\".\"type\", \"gtc_documents\".\"project_id\", \"gtc_documents\".\"revision\", \"gtc_documents\".\"title\", \"gtc_documents\".\"file_name\", \"gtc_documents\".\"file_path\", \"gtc_documents\".\"file_size\", \"gtc_documents\".\"created_at\", \"gtc_documents\".\"created_by_id\", \"gtc_documents\".\"updated_at\", \"gtc_documents\".\"updated_by_id\", \"gtc_documents\".\"edit_reason\", \"gtc_documents\".\"is_active\", \"projects\".\"code\", \"projects\".\"name\", created_by_user.name as \"created_by_name\", created_by_user.email as \"created_by_email\", updated_by_user.name as \"updated_by_name\", updated_by_user.email as \"updated_by_email\", \n (\n SELECT count(*)\n FROM gtc_documents gd2\n WHERE gd2.type = \"gtc_documents\".\"type\"\n AND gd2.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd2.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd2.project_id IS NULL)\n )\n )\n as \"total_documents_in_group\", \n (\n SELECT max(revision)\n FROM gtc_documents gd3\n WHERE gd3.type = \"gtc_documents\".\"type\"\n AND gd3.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd3.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd3.project_id IS NULL)\n )\n )\n as \"latest_revision\", \n \"gtc_documents\".\"revision\" = (\n SELECT max(revision)\n FROM gtc_documents gd4\n WHERE gd4.type = \"gtc_documents\".\"type\"\n AND gd4.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd4.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd4.project_id IS NULL)\n )\n )\n as \"is_latest_revision\", \n (\n SELECT id\n FROM gtc_documents gd5\n WHERE gd5.type = \"gtc_documents\".\"type\"\n AND gd5.is_active = true\n AND gd5.revision < \"gtc_documents\".\"revision\"\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd5.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd5.project_id IS NULL)\n )\n ORDER BY gd5.revision DESC\n LIMIT 1\n )\n as \"previous_revision_id\", \n (\n SELECT id\n FROM gtc_documents gd6\n WHERE gd6.type = \"gtc_documents\".\"type\"\n AND gd6.is_active = true\n AND gd6.revision > \"gtc_documents\".\"revision\"\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd6.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd6.project_id IS NULL)\n )\n ORDER BY gd6.revision ASC\n LIMIT 1\n )\n as \"next_revision_id\", \n CASE \n WHEN \"gtc_documents\".\"file_size\" IS NULL THEN NULL\n WHEN \"gtc_documents\".\"file_size\" < 1024 THEN \"gtc_documents\".\"file_size\" || ' B'\n WHEN \"gtc_documents\".\"file_size\" < 1024 * 1024 THEN round(\"gtc_documents\".\"file_size\" / 1024.0, 1) || ' KB'\n WHEN \"gtc_documents\".\"file_size\" < 1024 * 1024 * 1024 THEN round(\"gtc_documents\".\"file_size\" / (1024.0 * 1024), 1) || ' MB'\n ELSE round(\"gtc_documents\".\"file_size\" / (1024.0 * 1024 * 1024), 1) || ' GB'\n END\n as \"file_size_formatted\", \n CASE \n WHEN \"gtc_documents\".\"project_id\" IS NOT NULL THEN (\n SELECT count(*)\n FROM gtc_documents gd7\n WHERE gd7.project_id = \"gtc_documents\".\"project_id\"\n AND gd7.is_active = true\n )\n ELSE NULL\n END\n as \"project_total_documents\", \n (\n SELECT array_agg(revision ORDER BY revision)\n FROM gtc_documents gd8\n WHERE gd8.type = \"gtc_documents\".\"type\"\n AND gd8.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd8.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd8.project_id IS NULL)\n )\n )\n as \"revision_history\", \n \"gtc_documents\".\"created_by_id\" != \"gtc_documents\".\"updated_by_id\" OR \n \"gtc_documents\".\"created_at\" != \"gtc_documents\".\"updated_at\"\n as \"has_edit_history\" from \"gtc_documents\" left join \"projects\" on \"gtc_documents\".\"project_id\" = \"projects\".\"id\" left join users created_by_user on \"gtc_documents\".\"created_by_id\" = created_by_user.id left join users updated_by_user on \"gtc_documents\".\"updated_by_id\" = updated_by_user.id",
+ "name": "gtc_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_vendor_clauses_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_document_id": {
+ "name": "vendor_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_clause_id": {
+ "name": "base_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_number_modified": {
+ "name": "is_number_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_category_modified": {
+ "name": "is_category_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_subtitle_modified": {
+ "name": "is_subtitle_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_content_modified": {
+ "name": "is_content_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_document_id": {
+ "name": "base_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_note": {
+ "name": "negotiation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_excluded": {
+ "name": "is_excluded",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"gtc_vendor_clauses\".\"id\", \"gtc_vendor_clauses\".\"vendor_document_id\", \"gtc_vendor_clauses\".\"base_clause_id\", \"gtc_vendor_clauses\".\"parent_id\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_item_number\", \"gtc_clauses\".\"item_number\")\n as \"effective_item_number\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_category\", \"gtc_clauses\".\"category\")\n as \"effective_category\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_subtitle\", \"gtc_clauses\".\"subtitle\")\n as \"effective_subtitle\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_content\", \"gtc_clauses\".\"content\")\n as \"effective_content\", \"gtc_vendor_clauses\".\"is_number_modified\", \"gtc_vendor_clauses\".\"is_category_modified\", \"gtc_vendor_clauses\".\"is_subtitle_modified\", \"gtc_vendor_clauses\".\"is_content_modified\", \"gtc_clauses\".\"item_number\", \"gtc_clauses\".\"category\", \"gtc_clauses\".\"subtitle\", \"gtc_clauses\".\"content\", \"gtc_vendor_documents\".\"vendor_id\", \"vendors\".\"vendor_code\", \"vendors\".\"vendor_name\", \"gtc_vendor_documents\".\"base_document_id\", \"gtc_documents\".\"type\", \"gtc_documents\".\"file_name\", \"gtc_vendor_clauses\".\"review_status\", \"gtc_vendor_clauses\".\"negotiation_note\", \"gtc_vendor_clauses\".\"is_excluded\", \"gtc_vendor_clauses\".\"sort_order\", \"gtc_vendor_clauses\".\"depth\", \"gtc_vendor_clauses\".\"full_path\", \n \"gtc_vendor_clauses\".\"is_number_modified\" OR \n \"gtc_vendor_clauses\".\"is_category_modified\" OR \n \"gtc_vendor_clauses\".\"is_subtitle_modified\" OR \n \"gtc_vendor_clauses\".\"is_content_modified\"\n as \"has_modifications\", \"gtc_vendor_clauses\".\"created_at\", \"gtc_vendor_clauses\".\"updated_at\" from \"gtc_vendor_clauses\" left join \"gtc_clauses\" on \"gtc_vendor_clauses\".\"base_clause_id\" = \"gtc_clauses\".\"id\" left join \"gtc_vendor_documents\" on \"gtc_vendor_clauses\".\"vendor_document_id\" = \"gtc_vendor_documents\".\"id\" left join \"vendors\" on \"gtc_vendor_documents\".\"vendor_id\" = \"vendors\".\"id\" left join \"gtc_documents\" on \"gtc_vendor_documents\".\"base_document_id\" = \"gtc_documents\".\"id\"",
+ "name": "gtc_vendor_clauses_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.legal_works_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_urgent": {
+ "name": "is_urgent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "request_date": {
+ "name": "request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consultation_date": {
+ "name": "consultation_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expected_answer_date": {
+ "name": "expected_answer_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_completion_date": {
+ "name": "legal_completion_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer": {
+ "name": "reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_responder": {
+ "name": "legal_responder",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachment": {
+ "name": "has_attachment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "review_department": {
+ "name": "review_department",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inquiry_type": {
+ "name": "inquiry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "request_content": {
+ "name": "request_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "contract_project_name": {
+ "name": "contract_project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_amount": {
+ "name": "contract_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"legal_works\".\"id\", \"legal_works\".\"category\", \"legal_works\".\"status\", \"legal_works\".\"company_id\", \"legal_works\".\"vendor_code\", \"legal_works\".\"vendor_name\", \"legal_works\".\"is_urgent\", \"legal_works\".\"request_date\", \"legal_works\".\"consultation_date\", \"legal_works\".\"expected_answer_date\", \"legal_works\".\"legal_completion_date\", \"legal_works\".\"reviewer\", \"legal_works\".\"legal_responder\", \"legal_works\".\"has_attachment\", \"legal_works\".\"created_at\", \"legal_works\".\"updated_at\", \"legal_work_requests\".\"review_department\", \"legal_work_requests\".\"inquiry_type\", \"legal_work_requests\".\"title\", \"legal_work_requests\".\"request_content\", \"legal_work_requests\".\"is_public\", \"legal_work_requests\".\"contract_project_name\", \"legal_work_requests\".\"contract_type\", \"legal_work_requests\".\"contract_amount\", (\n SELECT response_content \n FROM legal_work_responses lwr_latest \n WHERE lwr_latest.legal_work_id = \"legal_works\".\"id\" \n ORDER BY lwr_latest.created_at DESC \n LIMIT 1\n ) as \"response_content\", (\n SELECT COUNT(*)::integer \n FROM legal_work_attachments lwa \n WHERE lwa.legal_work_id = \"legal_works\".\"id\"\n ) as \"attachment_count\" from \"legal_works\" left join \"legal_work_requests\" on \"legal_works\".\"id\" = \"legal_work_requests\".\"legal_work_id\" left join \"vendors\" on \"legal_works\".\"company_id\" = \"vendors\".\"id\"",
+ "name": "legal_works_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.bidding_list_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_number": {
+ "name": "bidding_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "contract_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bidding_type": {
+ "name": "bidding_type",
+ "type": "bidding_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "award_count": {
+ "name": "award_count",
+ "type": "award_count",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'single'"
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_date": {
+ "name": "pre_quote_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_registration_date": {
+ "name": "bidding_registration_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_start_date": {
+ "name": "submission_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_end_date": {
+ "name": "submission_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_date": {
+ "name": "evaluation_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_specification_meeting": {
+ "name": "has_specification_meeting",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "has_pr_document": {
+ "name": "has_pr_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "budget": {
+ "name": "budget",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_price": {
+ "name": "target_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_bid_price": {
+ "name": "final_bid_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "bidding_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bidding_generated'"
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_email": {
+ "name": "manager_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_phone": {
+ "name": "manager_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "meeting_date": {
+ "name": "meeting_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "location": {
+ "name": "location",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "definition": "select \"biddings\".\"id\", \"biddings\".\"bidding_number\", \"biddings\".\"revision\", \"biddings\".\"project_name\", \"biddings\".\"item_name\", \"biddings\".\"title\", \"biddings\".\"description\", \"biddings\".\"content\", \"biddings\".\"contract_type\", \"biddings\".\"bidding_type\", \"biddings\".\"award_count\", \"biddings\".\"contract_period\", \"biddings\".\"pre_quote_date\", \"biddings\".\"bidding_registration_date\", \"biddings\".\"submission_start_date\", \"biddings\".\"submission_end_date\", \"biddings\".\"evaluation_date\", \"biddings\".\"has_specification_meeting\", \"biddings\".\"has_pr_document\", \"biddings\".\"pr_number\", \"biddings\".\"currency\", \"biddings\".\"budget\", \"biddings\".\"target_price\", \"biddings\".\"final_bid_price\", \"biddings\".\"status\", \"biddings\".\"is_public\", \"biddings\".\"manager_name\", \"biddings\".\"manager_email\", \"biddings\".\"manager_phone\", \"biddings\".\"remarks\", \"biddings\".\"created_by\", \"biddings\".\"created_at\", \"biddings\".\"updated_at\", \"biddings\".\"updated_by\", \"specification_meetings\".\"id\" IS NOT NULL as \"has_specification_meeting_details\", \"specification_meetings\".\"meeting_date\", \"specification_meetings\".\"location\", \"specification_meetings\".\"contact_person\", \"specification_meetings\".\"is_required\", \n COALESCE((\n SELECT count(*) \n FROM pr_documents \n WHERE bidding_id = \"biddings\".\"id\"\n ), 0)\n as \"pr_document_count\", \n (\n SELECT array_agg(document_name ORDER BY registered_at DESC)\n FROM pr_documents \n WHERE bidding_id = \"biddings\".\"id\"\n LIMIT 5\n )\n as \"pr_document_names\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ), 0)\n as \"participant_expected\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'submitted'\n ), 0)\n as \"participant_participated\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'declined'\n ), 0)\n as \"participant_declined\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status IN ('pending', 'sent')\n ), 0)\n as \"participant_pending\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'accepted'\n ), 0)\n as \"participant_accepted\", \n CASE \n WHEN (\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ) > 0 \n THEN ROUND(\n (\n SELECT count(*)::decimal \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'submitted'\n ) / (\n SELECT count(*)::decimal \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ) * 100, 1\n )\n ELSE 0 \n END\n as \"participation_rate\", \n (\n SELECT AVG(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"avg_pre_quote_amount\", \n (\n SELECT MIN(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"min_pre_quote_amount\", \n (\n SELECT MAX(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"max_pre_quote_amount\", \n (\n SELECT AVG(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"avg_final_quote_amount\", \n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"min_final_quote_amount\", \n (\n SELECT MAX(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"max_final_quote_amount\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND is_pre_quote_selected = true\n ), 0)\n as \"selected_for_final_bid_count\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND is_winner = true\n ), 0)\n as \"winner_count\", \n (\n SELECT array_agg(v.vendor_name ORDER BY v.vendor_name)\n FROM bidding_companies bc\n JOIN vendors v ON bc.company_id = v.id\n WHERE bc.bidding_id = \"biddings\".\"id\" \n AND bc.is_winner = true\n )\n as \"winner_company_names\", \n CASE \n WHEN \"biddings\".\"submission_start_date\" IS NULL OR \"biddings\".\"submission_end_date\" IS NULL \n THEN 'not_scheduled'\n WHEN NOW() < \"biddings\".\"submission_start_date\" \n THEN 'scheduled'\n WHEN NOW() BETWEEN \"biddings\".\"submission_start_date\" AND \"biddings\".\"submission_end_date\" \n THEN 'active'\n WHEN NOW() > \"biddings\".\"submission_end_date\" \n THEN 'closed'\n ELSE 'unknown'\n END\n as \"submission_status\", \n CASE \n WHEN \"biddings\".\"submission_end_date\" IS NOT NULL \n AND NOW() < \"biddings\".\"submission_end_date\" \n THEN EXTRACT(DAYS FROM (\"biddings\".\"submission_end_date\" - NOW()))::integer\n ELSE NULL \n END\n as \"days_until_deadline\", \n CASE \n WHEN \"biddings\".\"submission_start_date\" IS NOT NULL \n AND NOW() < \"biddings\".\"submission_start_date\" \n THEN EXTRACT(DAYS FROM (\"biddings\".\"submission_start_date\" - NOW()))::integer\n ELSE NULL \n END\n as \"days_until_start\", \n CASE \n WHEN \"biddings\".\"budget\" IS NOT NULL AND \"biddings\".\"budget\" > 0\n AND (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) IS NOT NULL\n THEN ROUND(\n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) / \"biddings\".\"budget\" * 100, 1\n )\n ELSE NULL \n END\n as \"budget_efficiency_rate\", \n CASE \n WHEN \"biddings\".\"target_price\" IS NOT NULL AND \"biddings\".\"target_price\" > 0\n AND (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) IS NOT NULL\n THEN ROUND(\n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) / \"biddings\".\"target_price\" * 100, 1\n )\n ELSE NULL \n END\n as \"target_price_efficiency_rate\", \n CASE \"biddings\".\"status\"\n WHEN 'bidding_generated' THEN 10\n WHEN 'request_for_quotation' THEN 20\n WHEN 'received_quotation' THEN 40\n WHEN 'set_target_price' THEN 60\n WHEN 'bidding_opened' THEN 70\n WHEN 'bidding_closed' THEN 80\n WHEN 'evaluation_of_bidding' THEN 90\n WHEN 'vendor_selected' THEN 100\n WHEN 'bidding_disposal' THEN 0\n ELSE 0\n END\n as \"progress_score\", \n GREATEST(\n \"biddings\".\"updated_at\",\n COALESCE((\n SELECT MAX(updated_at) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ), \"biddings\".\"updated_at\")\n )\n as \"last_activity_date\" from \"biddings\" left join \"specification_meetings\" on \"biddings\".\"id\" = \"specification_meetings\".\"bidding_id\"",
+ "name": "bidding_list_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "risks.risks_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "event_type": {
+ "name": "event_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "event_status": {
+ "name": "event_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "manager_id": {
+ "name": "manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occurred_at": {
+ "name": "occurred_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"risks\".\"risk_events\".\"id\", \"risks\".\"risk_events\".\"event_type\", \"risks\".\"risk_events\".\"vendor_id\", \"vendors\".\"vendor_code\", \"vendors\".\"vendor_name\", \"vendors\".\"tax_id\", \"risks\".\"risk_events\".\"provider\", \"risks\".\"risk_events\".\"content\", \"risks\".\"risk_events\".\"event_status\", \"risks\".\"risk_events\".\"manager_id\", \"users\".\"name\", \"risks\".\"risk_events\".\"admin_comment\", \"risks\".\"risk_events\".\"occurred_at\" from \"risks\".\"risk_events\" left join \"vendors\" on \"vendors\".\"id\" = \"risks\".\"risk_events\".\"vendor_id\" left join \"users\" on \"users\".\"id\" = \"risks\".\"risk_events\".\"manager_id\"",
+ "name": "risks_view",
+ "schema": "risks",
+ "isExisting": false,
+ "materialized": false
+ }
+ },
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/db/migrations/meta/0292_snapshot.json b/db/migrations/meta/0292_snapshot.json
new file mode 100644
index 00000000..7a97b737
--- /dev/null
+++ b/db/migrations/meta/0292_snapshot.json
@@ -0,0 +1,48457 @@
+{
+ "id": "5d2c2459-8667-451c-b617-fdbfc272a257",
+ "prevId": "4fffa3c2-0a6d-4aaf-8d71-7efc66234c30",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.companies": {
+ "name": "companies",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "companies_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "taxID": {
+ "name": "taxID",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_envelopes": {
+ "name": "contract_envelopes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_envelopes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "envelope_id": {
+ "name": "envelope_id",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "envelope_status": {
+ "name": "envelope_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contract_envelopes_contract_id_contracts_id_fk": {
+ "name": "contract_envelopes_contract_id_contracts_id_fk",
+ "tableFrom": "contract_envelopes",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_items": {
+ "name": "contract_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_items_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_id": {
+ "name": "item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "unit_price": {
+ "name": "unit_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_rate": {
+ "name": "tax_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_amount": {
+ "name": "tax_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_line_amount": {
+ "name": "total_line_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "contract_items_contract_item_idx": {
+ "name": "contract_items_contract_item_idx",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "item_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "contract_items_contract_id_contracts_id_fk": {
+ "name": "contract_items_contract_id_contracts_id_fk",
+ "tableFrom": "contract_items",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contract_items_item_id_items_id_fk": {
+ "name": "contract_items_item_id_items_id_fk",
+ "tableFrom": "contract_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contract_items_contract_id_item_id_unique": {
+ "name": "contract_items_contract_id_item_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_id",
+ "item_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contract_signers": {
+ "name": "contract_signers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contract_signers_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "envelope_id": {
+ "name": "envelope_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_contact_id": {
+ "name": "vendor_contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "signer_type": {
+ "name": "signer_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'VENDOR'"
+ },
+ "signer_email": {
+ "name": "signer_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "signer_name": {
+ "name": "signer_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "signer_position": {
+ "name": "signer_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "signer_status": {
+ "name": "signer_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "signed_at": {
+ "name": "signed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contract_signers_envelope_id_contract_envelopes_id_fk": {
+ "name": "contract_signers_envelope_id_contract_envelopes_id_fk",
+ "tableFrom": "contract_signers",
+ "tableTo": "contract_envelopes",
+ "columnsFrom": [
+ "envelope_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contract_signers_vendor_contact_id_vendor_contacts_id_fk": {
+ "name": "contract_signers_vendor_contact_id_vendor_contacts_id_fk",
+ "tableFrom": "contract_signers",
+ "tableTo": "vendor_contacts",
+ "columnsFrom": [
+ "vendor_contact_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.contracts": {
+ "name": "contracts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contracts_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_name": {
+ "name": "contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "end_date": {
+ "name": "end_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "partial_shipping_allowed": {
+ "name": "partial_shipping_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "partial_payment_allowed": {
+ "name": "partial_payment_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "contracts_project_id_projects_id_fk": {
+ "name": "contracts_project_id_projects_id_fk",
+ "tableFrom": "contracts",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "contracts_vendor_id_vendors_id_fk": {
+ "name": "contracts_vendor_id_vendors_id_fk",
+ "tableFrom": "contracts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contracts_contract_no_unique": {
+ "name": "contracts_contract_no_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_no"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.poa": {
+ "name": "poa",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "poa_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_contract_no": {
+ "name": "original_contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_contract_name": {
+ "name": "original_contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_status": {
+ "name": "original_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_status": {
+ "name": "approval_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "poa_original_contract_no_contracts_contract_no_fk": {
+ "name": "poa_original_contract_no_contracts_contract_no_fk",
+ "tableFrom": "poa",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "original_contract_no"
+ ],
+ "columnsTo": [
+ "contract_no"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "poa_project_id_projects_id_fk": {
+ "name": "poa_project_id_projects_id_fk",
+ "tableFrom": "poa",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "poa_vendor_id_vendors_id_fk": {
+ "name": "poa_vendor_id_vendors_id_fk",
+ "tableFrom": "poa",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_offshore_hull": {
+ "name": "item_offshore_hull",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_item_list": {
+ "name": "sub_item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_offshore_top": {
+ "name": "item_offshore_top",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_item_list": {
+ "name": "sub_item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.item_shipbuilding": {
+ "name": "item_shipbuilding",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "work_type": {
+ "name": "work_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_list": {
+ "name": "item_list",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ship_types": {
+ "name": "ship_types",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'OPTION'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.items": {
+ "name": "items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_no": {
+ "name": "project_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "package_code": {
+ "name": "package_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sm_code": {
+ "name": "sm_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_item_code": {
+ "name": "parent_item_code",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_level": {
+ "name": "item_level",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delete_flag": {
+ "name": "delete_flag",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_date": {
+ "name": "change_date",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "base_unit_of_measure": {
+ "name": "base_unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_item_unique": {
+ "name": "project_item_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_no",
+ "item_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.materials": {
+ "name": "materials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_item_code": {
+ "name": "parent_item_code",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_level": {
+ "name": "item_level",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delete_flag": {
+ "name": "delete_flag",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_date": {
+ "name": "change_date",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "base_unit_of_measure": {
+ "name": "base_unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "materials_item_code_unique": {
+ "name": "materials_item_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "item_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pq_criterias": {
+ "name": "pq_criterias",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_point": {
+ "name": "check_point",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_group_name": {
+ "name": "sub_group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pq_list_id": {
+ "name": "pq_list_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "input_format": {
+ "name": "input_format",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'TEXT'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pq_criterias_pq_list_id_pq_lists_id_fk": {
+ "name": "pq_criterias_pq_list_id_pq_lists_id_fk",
+ "tableFrom": "pq_criterias",
+ "tableTo": "pq_lists",
+ "columnsFrom": [
+ "pq_list_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pq_lists": {
+ "name": "pq_lists",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_to": {
+ "name": "valid_to",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pq_lists_project_id_projects_id_fk": {
+ "name": "pq_lists_project_id_projects_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "pq_lists_created_by_users_id_fk": {
+ "name": "pq_lists_created_by_users_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "pq_lists_updated_by_users_id_fk": {
+ "name": "pq_lists_updated_by_users_id_fk",
+ "tableFrom": "pq_lists",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.site_visit_request_attachments": {
+ "name": "site_visit_request_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "site_visit_request_id": {
+ "name": "site_visit_request_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_site_visit_info_id": {
+ "name": "vendor_site_visit_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "site_visit_request_attachments_site_visit_request_id_site_visit_requests_id_fk": {
+ "name": "site_visit_request_attachments_site_visit_request_id_site_visit_requests_id_fk",
+ "tableFrom": "site_visit_request_attachments",
+ "tableTo": "site_visit_requests",
+ "columnsFrom": [
+ "site_visit_request_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "site_visit_request_attachments_vendor_site_visit_info_id_vendor_site_visit_info_id_fk": {
+ "name": "site_visit_request_attachments_vendor_site_visit_info_id_vendor_site_visit_info_id_fk",
+ "tableFrom": "site_visit_request_attachments",
+ "tableTo": "vendor_site_visit_info",
+ "columnsFrom": [
+ "vendor_site_visit_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.site_visit_requests": {
+ "name": "site_visit_requests",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "investigation_id": {
+ "name": "investigation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "inspection_duration": {
+ "name": "inspection_duration",
+ "type": "numeric(4, 1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_start_date": {
+ "name": "requested_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_end_date": {
+ "name": "requested_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_attendees": {
+ "name": "shi_attendees",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "vendor_requests": {
+ "name": "vendor_requests",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "additional_requests": {
+ "name": "additional_requests",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REQUESTED'"
+ },
+ "sent_at": {
+ "name": "sent_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "site_visit_requests_investigation_id_vendor_investigations_id_fk": {
+ "name": "site_visit_requests_investigation_id_vendor_investigations_id_fk",
+ "tableFrom": "site_visit_requests",
+ "tableTo": "vendor_investigations",
+ "columnsFrom": [
+ "investigation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "site_visit_requests_requester_id_users_id_fk": {
+ "name": "site_visit_requests_requester_id_users_id_fk",
+ "tableFrom": "site_visit_requests",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_criteria_attachments": {
+ "name": "vendor_criteria_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_criteria_answer_id": {
+ "name": "vendor_criteria_answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_criteria_attachments_vendor_criteria_answer_id_vendor_pq_criteria_answers_id_fk": {
+ "name": "vendor_criteria_attachments_vendor_criteria_answer_id_vendor_pq_criteria_answers_id_fk",
+ "tableFrom": "vendor_criteria_attachments",
+ "tableTo": "vendor_pq_criteria_answers",
+ "columnsFrom": [
+ "vendor_criteria_answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_investigation_attachments": {
+ "name": "vendor_investigation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "investigation_id": {
+ "name": "investigation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'REPORT'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_investigation_attachments_investigation_id_vendor_investigations_id_fk": {
+ "name": "vendor_investigation_attachments_investigation_id_vendor_investigations_id_fk",
+ "tableFrom": "vendor_investigation_attachments",
+ "tableTo": "vendor_investigations",
+ "columnsFrom": [
+ "investigation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_investigations": {
+ "name": "vendor_investigations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pq_submission_id": {
+ "name": "pq_submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "qm_manager_id": {
+ "name": "qm_manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_status": {
+ "name": "investigation_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "investigation_address": {
+ "name": "investigation_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_method": {
+ "name": "investigation_method",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_start_at": {
+ "name": "scheduled_start_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_end_at": {
+ "name": "scheduled_end_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "forecasted_at": {
+ "name": "forecasted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_result": {
+ "name": "evaluation_result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_notes": {
+ "name": "investigation_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "purchase_comment": {
+ "name": "purchase_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_investigations_vendor_id_vendors_id_fk": {
+ "name": "vendor_investigations_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_investigations_pq_submission_id_vendor_pq_submissions_id_fk": {
+ "name": "vendor_investigations_pq_submission_id_vendor_pq_submissions_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "vendor_pq_submissions",
+ "columnsFrom": [
+ "pq_submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "cascade"
+ },
+ "vendor_investigations_requester_id_users_id_fk": {
+ "name": "vendor_investigations_requester_id_users_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_investigations_qm_manager_id_users_id_fk": {
+ "name": "vendor_investigations_qm_manager_id_users_id_fk",
+ "tableFrom": "vendor_investigations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "qm_manager_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_submissions": {
+ "name": "vendor_pq_submissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "pq_number": {
+ "name": "pq_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REQUESTED'"
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agreements": {
+ "name": "agreements",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "pq_items": {
+ "name": "pq_items",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejected_at": {
+ "name": "rejected_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reject_reason": {
+ "name": "reject_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_pq_submission": {
+ "name": "unique_pq_submission",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_pq_submissions_requester_id_users_id_fk": {
+ "name": "vendor_pq_submissions_requester_id_users_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requester_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_pq_submissions_vendor_id_vendors_id_fk": {
+ "name": "vendor_pq_submissions_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_submissions_project_id_projects_id_fk": {
+ "name": "vendor_pq_submissions_project_id_projects_id_fk",
+ "tableFrom": "vendor_pq_submissions",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_pq_submissions_pq_number_unique": {
+ "name": "vendor_pq_submissions_pq_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pq_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_criteria_answers": {
+ "name": "vendor_pq_criteria_answers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "answer": {
+ "name": "answer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_comment": {
+ "name": "shi_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_reply": {
+ "name": "vendor_reply",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_pq_criteria_answers_vendor_id_vendors_id_fk": {
+ "name": "vendor_pq_criteria_answers_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_criteria_answers_criteria_id_pq_criterias_id_fk": {
+ "name": "vendor_pq_criteria_answers_criteria_id_pq_criterias_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "pq_criterias",
+ "columnsFrom": [
+ "criteria_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "vendor_pq_criteria_answers_project_id_projects_id_fk": {
+ "name": "vendor_pq_criteria_answers_project_id_projects_id_fk",
+ "tableFrom": "vendor_pq_criteria_answers",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_pq_review_logs": {
+ "name": "vendor_pq_review_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_pq_criteria_answer_id": {
+ "name": "vendor_pq_criteria_answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_name": {
+ "name": "reviewer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_pq_review_logs_vendor_pq_criteria_answer_id_vendor_pq_criteria_answers_id_fk": {
+ "name": "vendor_pq_review_logs_vendor_pq_criteria_answer_id_vendor_pq_criteria_answers_id_fk",
+ "tableFrom": "vendor_pq_review_logs",
+ "tableTo": "vendor_pq_criteria_answers",
+ "columnsFrom": [
+ "vendor_pq_criteria_answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_site_visit_info": {
+ "name": "vendor_site_visit_info",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "site_visit_request_id": {
+ "name": "site_visit_request_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_name": {
+ "name": "factory_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_location": {
+ "name": "factory_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_address": {
+ "name": "factory_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_name": {
+ "name": "factory_pic_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_phone": {
+ "name": "factory_pic_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_pic_email": {
+ "name": "factory_pic_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "factory_directions": {
+ "name": "factory_directions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_procedure": {
+ "name": "access_procedure",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachments": {
+ "name": "has_attachments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "other_info": {
+ "name": "other_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "submitted_by": {
+ "name": "submitted_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_site_visit_info_site_visit_request_id_site_visit_requests_id_fk": {
+ "name": "vendor_site_visit_info_site_visit_request_id_site_visit_requests_id_fk",
+ "tableFrom": "vendor_site_visit_info",
+ "tableTo": "site_visit_requests",
+ "columnsFrom": [
+ "site_visit_request_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_site_visit_info_submitted_by_users_id_fk": {
+ "name": "vendor_site_visit_info_submitted_by_users_id_fk",
+ "tableFrom": "vendor_site_visit_info",
+ "tableTo": "users",
+ "columnsFrom": [
+ "submitted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_projects": {
+ "name": "bidding_projects",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "proj_nm": {
+ "name": "proj_nm",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sector": {
+ "name": "sector",
+ "type": "char(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proj_msrm": {
+ "name": "proj_msrm",
+ "type": "numeric(3, 0)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kunnr": {
+ "name": "kunnr",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kunnr_nm": {
+ "name": "kunnr_nm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cls_1": {
+ "name": "cls_1",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cls1_nm": {
+ "name": "cls1_nm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ptype": {
+ "name": "ptype",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ptype_nm": {
+ "name": "ptype_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_cd": {
+ "name": "pmodel_cd",
+ "type": "char(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_nm": {
+ "name": "pmodel_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_sz": {
+ "name": "pmodel_sz",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pmodel_uom": {
+ "name": "pmodel_uom",
+ "type": "char(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "txt04": {
+ "name": "txt04",
+ "type": "char(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "txt30": {
+ "name": "txt30",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "estm_pm": {
+ "name": "estm_pm",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pjt_type": {
+ "name": "pjt_type",
+ "type": "varchar",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "bidding_projects_pspid_unique": {
+ "name": "bidding_projects_pspid_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pspid"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_series": {
+ "name": "project_series",
+ "schema": "",
+ "columns": {
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sers_no": {
+ "name": "sers_no",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sc_dt": {
+ "name": "sc_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kl_dt": {
+ "name": "kl_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "lc_dt": {
+ "name": "lc_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dl_dt": {
+ "name": "dl_dt",
+ "type": "char(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dock_no": {
+ "name": "dock_no",
+ "type": "char(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dock_nm": {
+ "name": "dock_nm",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proj_no": {
+ "name": "proj_no",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "post1": {
+ "name": "post1",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "project_sersNo_unique": {
+ "name": "project_sersNo_unique",
+ "columns": [
+ {
+ "expression": "pspid",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "sers_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_series_pspid_bidding_projects_pspid_fk": {
+ "name": "project_series_pspid_bidding_projects_pspid_fk",
+ "tableFrom": "project_series",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "pspid"
+ ],
+ "columnsTo": [
+ "pspid"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.projects": {
+ "name": "projects",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ship'"
+ },
+ "pspid": {
+ "name": "pspid",
+ "type": "char(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "projects_pspid_unique": {
+ "name": "projects_pspid_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "pspid"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.cbe_evaluations": {
+ "name": "cbe_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluated_by": {
+ "name": "evaluated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluated_at": {
+ "name": "evaluated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "result": {
+ "name": "result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_cost": {
+ "name": "total_cost",
+ "type": "numeric(18, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_schedule": {
+ "name": "delivery_schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cbe_evaluations_rfq_id_rfqs_id_fk": {
+ "name": "cbe_evaluations_rfq_id_rfqs_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "cbe_evaluations_vendor_id_vendors_id_fk": {
+ "name": "cbe_evaluations_vendor_id_vendors_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "cbe_evaluations_evaluated_by_users_id_fk": {
+ "name": "cbe_evaluations_evaluated_by_users_id_fk",
+ "tableFrom": "cbe_evaluations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "evaluated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_attachments": {
+ "name": "rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_id": {
+ "name": "evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cbe_id": {
+ "name": "cbe_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_attachments_rfq_id_rfqs_id_fk": {
+ "name": "rfq_attachments_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_vendor_id_vendors_id_fk": {
+ "name": "rfq_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_evaluation_id_rfq_evaluations_id_fk": {
+ "name": "rfq_attachments_evaluation_id_rfq_evaluations_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfq_evaluations",
+ "columnsFrom": [
+ "evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_cbe_id_cbe_evaluations_id_fk": {
+ "name": "rfq_attachments_cbe_id_cbe_evaluations_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "cbe_evaluations",
+ "columnsFrom": [
+ "cbe_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_attachments_comment_id_rfq_comments_id_fk": {
+ "name": "rfq_attachments_comment_id_rfq_comments_id_fk",
+ "tableFrom": "rfq_attachments",
+ "tableTo": "rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_comments": {
+ "name": "rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment_text": {
+ "name": "comment_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "commented_by": {
+ "name": "commented_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_id": {
+ "name": "evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cbe_id": {
+ "name": "cbe_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_comments_rfq_id_rfqs_id_fk": {
+ "name": "rfq_comments_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_vendor_id_vendors_id_fk": {
+ "name": "rfq_comments_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_commented_by_users_id_fk": {
+ "name": "rfq_comments_commented_by_users_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "commented_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_evaluation_id_rfq_evaluations_id_fk": {
+ "name": "rfq_comments_evaluation_id_rfq_evaluations_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "rfq_evaluations",
+ "columnsFrom": [
+ "evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_comments_cbe_id_vendor_responses_id_fk": {
+ "name": "rfq_comments_cbe_id_vendor_responses_id_fk",
+ "tableFrom": "rfq_comments",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "cbe_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_evaluations": {
+ "name": "rfq_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "eval_type": {
+ "name": "eval_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "result": {
+ "name": "result",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_evaluations_rfq_id_rfqs_id_fk": {
+ "name": "rfq_evaluations_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_evaluations",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "rfq_evaluations_vendor_id_vendors_id_fk": {
+ "name": "rfq_evaluations_vendor_id_vendors_id_fk",
+ "tableFrom": "rfq_evaluations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfq_items": {
+ "name": "rfq_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfq_items_rfq_id_rfqs_id_fk": {
+ "name": "rfq_items_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfq_items",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "rfq_items_item_code_items_item_code_fk": {
+ "name": "rfq_items_item_code_items_item_code_fk",
+ "tableFrom": "rfq_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rfqs": {
+ "name": "rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_project_id": {
+ "name": "bid_project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PURCHASE'"
+ },
+ "parent_rfq_id": {
+ "name": "parent_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rfqs_project_id_projects_id_fk": {
+ "name": "rfqs_project_id_projects_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_bid_project_id_bidding_projects_id_fk": {
+ "name": "rfqs_bid_project_id_bidding_projects_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "bid_project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_created_by_users_id_fk": {
+ "name": "rfqs_created_by_users_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "rfqs_parent_rfq_id_rfqs_id_fk": {
+ "name": "rfqs_parent_rfq_id_rfqs_id_fk",
+ "tableFrom": "rfqs",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "parent_rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "rfqs_rfq_code_unique": {
+ "name": "rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_commercial_responses": {
+ "name": "vendor_commercial_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric(18, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_period": {
+ "name": "delivery_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "warranty_period": {
+ "name": "warranty_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validity_period": {
+ "name": "validity_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "price_breakdown": {
+ "name": "price_breakdown",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commercial_notes": {
+ "name": "commercial_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_commercial_responses_response_id_vendor_responses_id_fk": {
+ "name": "vendor_commercial_responses_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_commercial_responses",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_attachments": {
+ "name": "vendor_response_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "technical_response_id": {
+ "name": "technical_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commercial_response_id": {
+ "name": "commercial_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_attachments_response_id_vendor_responses_id_fk": {
+ "name": "vendor_response_attachments_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_technical_response_id_vendor_technical_responses_id_fk": {
+ "name": "vendor_response_attachments_technical_response_id_vendor_technical_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_technical_responses",
+ "columnsFrom": [
+ "technical_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_commercial_response_id_vendor_commercial_responses_id_fk": {
+ "name": "vendor_response_attachments_commercial_response_id_vendor_commercial_responses_id_fk",
+ "tableFrom": "vendor_response_attachments",
+ "tableTo": "vendor_commercial_responses",
+ "columnsFrom": [
+ "commercial_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_responses": {
+ "name": "vendor_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'REVIEWING'"
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_by": {
+ "name": "responded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "vendor_response_unique": {
+ "name": "vendor_response_unique",
+ "columns": [
+ {
+ "expression": "rfq_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_responses_rfq_id_rfqs_id_fk": {
+ "name": "vendor_responses_rfq_id_rfqs_id_fk",
+ "tableFrom": "vendor_responses",
+ "tableTo": "rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_responses_vendor_id_vendors_id_fk": {
+ "name": "vendor_responses_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_responses",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_technical_responses": {
+ "name": "vendor_technical_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_technical_responses_response_id_vendor_responses_id_fk": {
+ "name": "vendor_technical_responses_response_id_vendor_responses_id_fk",
+ "tableFrom": "vendor_technical_responses",
+ "tableTo": "vendor_responses",
+ "columnsFrom": [
+ "response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.departments": {
+ "name": "departments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "departments_department_code_unique": {
+ "name": "departments_department_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.login_attempts": {
+ "name": "login_attempts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "login_attempts_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "failure_reason": {
+ "name": "failure_reason",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attempted_at": {
+ "name": "attempted_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "login_attempts_email_idx": {
+ "name": "login_attempts_email_idx",
+ "columns": [
+ {
+ "expression": "email",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "login_attempts_attempted_at_idx": {
+ "name": "login_attempts_attempted_at_idx",
+ "columns": [
+ {
+ "expression": "attempted_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "login_attempts_ip_address_idx": {
+ "name": "login_attempts_ip_address_idx",
+ "columns": [
+ {
+ "expression": "ip_address",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "login_attempts_user_id_users_id_fk": {
+ "name": "login_attempts_user_id_users_id_fk",
+ "tableFrom": "login_attempts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mfa_tokens": {
+ "name": "mfa_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "mfa_tokens_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "phone_number": {
+ "name": "phone_number",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attempts": {
+ "name": "attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "mfa_tokens_user_id_idx": {
+ "name": "mfa_tokens_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "mfa_tokens_token_idx": {
+ "name": "mfa_tokens_token_idx",
+ "columns": [
+ {
+ "expression": "token",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "mfa_tokens_expires_at_idx": {
+ "name": "mfa_tokens_expires_at_idx",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "mfa_tokens_user_id_users_id_fk": {
+ "name": "mfa_tokens_user_id_users_id_fk",
+ "tableFrom": "mfa_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.otps": {
+ "name": "otps",
+ "schema": "",
+ "columns": {
+ "email": {
+ "name": "email",
+ "type": "varchar(256)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "otpToken": {
+ "name": "otpToken",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "otp_expires": {
+ "name": "otp_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.password_history": {
+ "name": "password_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "password_history_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "salt": {
+ "name": "salt",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "replaced_at": {
+ "name": "replaced_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "password_history_user_id_idx": {
+ "name": "password_history_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "password_history_created_at_idx": {
+ "name": "password_history_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "password_history_user_id_users_id_fk": {
+ "name": "password_history_user_id_users_id_fk",
+ "tableFrom": "password_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.passwords": {
+ "name": "passwords",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "passwords_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "salt": {
+ "name": "salt",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "strength": {
+ "name": "strength",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_uppercase": {
+ "name": "has_uppercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_lowercase": {
+ "name": "has_lowercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_numbers": {
+ "name": "has_numbers",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_symbols": {
+ "name": "has_symbols",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "length": {
+ "name": "length",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "passwords_user_id_idx": {
+ "name": "passwords_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "passwords_active_idx": {
+ "name": "passwords_active_idx",
+ "columns": [
+ {
+ "expression": "is_active",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "passwords_user_id_users_id_fk": {
+ "name": "passwords_user_id_users_id_fk",
+ "tableFrom": "passwords",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.permissions": {
+ "name": "permissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "permissions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_key": {
+ "name": "permission_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.role_permissions": {
+ "name": "role_permissions",
+ "schema": "",
+ "columns": {
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_id": {
+ "name": "permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "role_permissions_role_id_roles_id_fk": {
+ "name": "role_permissions_role_id_roles_id_fk",
+ "tableFrom": "role_permissions",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "role_permissions_permission_id_permissions_id_fk": {
+ "name": "role_permissions_permission_id_permissions_id_fk",
+ "tableFrom": "role_permissions",
+ "tableTo": "permissions",
+ "columnsFrom": [
+ "permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "roles_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "roles_company_id_vendors_id_fk": {
+ "name": "roles_company_id_vendors_id_fk",
+ "tableFrom": "roles",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security_settings": {
+ "name": "security_settings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "security_settings_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "min_password_length": {
+ "name": "min_password_length",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 8
+ },
+ "require_uppercase": {
+ "name": "require_uppercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_lowercase": {
+ "name": "require_lowercase",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_numbers": {
+ "name": "require_numbers",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "require_symbols": {
+ "name": "require_symbols",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "password_expiry_days": {
+ "name": "password_expiry_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 90
+ },
+ "password_history_count": {
+ "name": "password_history_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "max_failed_attempts": {
+ "name": "max_failed_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "lockout_duration_minutes": {
+ "name": "lockout_duration_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 30
+ },
+ "require_mfa_for_partners": {
+ "name": "require_mfa_for_partners",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "sms_token_expiry_minutes": {
+ "name": "sms_token_expiry_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "max_sms_attempts_per_day": {
+ "name": "max_sms_attempts_per_day",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 10
+ },
+ "session_timeout_minutes": {
+ "name": "session_timeout_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 480
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "epId": {
+ "name": "epId",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deptCode": {
+ "name": "deptCode",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deptName": {
+ "name": "deptName",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tech_company_id": {
+ "name": "tech_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'partners'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'en'"
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mfa_enabled": {
+ "name": "mfa_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "mfa_secret": {
+ "name": "mfa_secret",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_locked": {
+ "name": "is_locked",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "lockout_until": {
+ "name": "lockout_until",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "failed_login_attempts": {
+ "name": "failed_login_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_login_at": {
+ "name": "last_login_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password_change_required": {
+ "name": "password_change_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "deactivated_at": {
+ "name": "deactivated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "deactivation_reason": {
+ "name": "deactivation_reason",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_consent_update": {
+ "name": "last_consent_update",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consent_version": {
+ "name": "consent_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requires_consent_update": {
+ "name": "requires_consent_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "users_email_idx": {
+ "name": "users_email_idx",
+ "columns": [
+ {
+ "expression": "email",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "users_phone_idx": {
+ "name": "users_phone_idx",
+ "columns": [
+ {
+ "expression": "phone",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "users_company_id_vendors_id_fk": {
+ "name": "users_company_id_vendors_id_fk",
+ "tableFrom": "users",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "users_tech_company_id_tech_vendors_id_fk": {
+ "name": "users_tech_company_id_tech_vendors_id_fk",
+ "tableFrom": "users",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "tech_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "users_email_unique": {
+ "name": "users_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.form_entries": {
+ "name": "form_entries",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "form_entries_contract_item_id_contract_items_id_fk": {
+ "name": "form_entries_contract_item_id_contract_items_id_fk",
+ "tableFrom": "form_entries",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.form_metas": {
+ "name": "form_metas",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "columns": {
+ "name": "columns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "form_metas_project_id_projects_id_fk": {
+ "name": "form_metas_project_id_projects_id_fk",
+ "tableFrom": "form_metas",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "form_code_project_unique": {
+ "name": "form_code_project_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "form_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.forms": {
+ "name": "forms",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "forms_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "eng": {
+ "name": "eng",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "im": {
+ "name": "im",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "contract_item_form_code_unique": {
+ "name": "contract_item_form_code_unique",
+ "columns": [
+ {
+ "expression": "contract_item_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "form_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "forms_contract_item_id_contract_items_id_fk": {
+ "name": "forms_contract_item_id_contract_items_id_fk",
+ "tableFrom": "forms",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_class_attributes": {
+ "name": "tag_class_attributes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tag_class_attributes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_class_id": {
+ "name": "tag_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "att_id": {
+ "name": "att_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "def_val": {
+ "name": "def_val",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uom_id": {
+ "name": "uom_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "seq": {
+ "name": "seq",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "tag_class_attributes_seq_idx": {
+ "name": "tag_class_attributes_seq_idx",
+ "columns": [
+ {
+ "expression": "seq",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "tag_class_attributes_tag_class_id_tag_classes_id_fk": {
+ "name": "tag_class_attributes_tag_class_id_tag_classes_id_fk",
+ "tableFrom": "tag_class_attributes",
+ "tableTo": "tag_classes",
+ "columnsFrom": [
+ "tag_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_att_id_in_tag_class": {
+ "name": "uniq_att_id_in_tag_class",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_class_id",
+ "att_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_classes": {
+ "name": "tag_classes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tag_classes_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subclasses": {
+ "name": "subclasses",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'[]'::json"
+ },
+ "subclass_remark": {
+ "name": "subclass_remark",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{}'::json"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_classes_project_id_projects_id_fk": {
+ "name": "tag_classes_project_id_projects_id_fk",
+ "tableFrom": "tag_classes",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tag_classes_tag_type_code_project_id_tag_types_code_project_id_fk": {
+ "name": "tag_classes_tag_type_code_project_id_tag_types_code_project_id_fk",
+ "tableFrom": "tag_classes",
+ "tableTo": "tag_types",
+ "columnsFrom": [
+ "tag_type_code",
+ "project_id"
+ ],
+ "columnsTo": [
+ "code",
+ "project_id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_code_in_project": {
+ "name": "uniq_code_in_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_subfield_options": {
+ "name": "tag_subfield_options",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_subfield_options_project_id_projects_id_fk": {
+ "name": "tag_subfield_options_project_id_projects_id_fk",
+ "tableFrom": "tag_subfield_options",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_attribute_project_code": {
+ "name": "uniq_attribute_project_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "attributes_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_subfields": {
+ "name": "tag_subfields",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_description": {
+ "name": "attributes_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expression": {
+ "name": "expression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delimiter": {
+ "name": "delimiter",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_subfields_project_id_projects_id_fk": {
+ "name": "tag_subfields_project_id_projects_id_fk",
+ "tableFrom": "tag_subfields",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_tag_type_attribute": {
+ "name": "uniq_tag_type_attribute",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "tag_type_code",
+ "attributes_id"
+ ]
+ },
+ "uniq_attribute_id_project": {
+ "name": "uniq_attribute_id_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "attributes_id",
+ "project_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_type_class_form_mappings": {
+ "name": "tag_type_class_form_mappings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type_label": {
+ "name": "tag_type_label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "class_label": {
+ "name": "class_label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_code": {
+ "name": "form_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_name": {
+ "name": "form_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ep": {
+ "name": "ep",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_mapping_in_project": {
+ "name": "uniq_mapping_in_project",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "tag_type_label",
+ "class_label",
+ "form_code",
+ "remark"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tag_types": {
+ "name": "tag_types",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tag_types_project_id_projects_id_fk": {
+ "name": "tag_types_project_id_projects_id_fk",
+ "tableFrom": "tag_types",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tag_types_code_project_id_pk": {
+ "name": "tag_types_code_project_id_pk",
+ "columns": [
+ "code",
+ "project_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tags": {
+ "name": "tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "tags_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_id": {
+ "name": "form_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_idx": {
+ "name": "tag_idx",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_no": {
+ "name": "tag_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_type": {
+ "name": "tag_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "class": {
+ "name": "class",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_class_id": {
+ "name": "tag_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tags_contract_item_id_contract_items_id_fk": {
+ "name": "tags_contract_item_id_contract_items_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tags_form_id_forms_id_fk": {
+ "name": "tags_form_id_forms_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "forms",
+ "columnsFrom": [
+ "form_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tags_tag_class_id_tag_classes_id_fk": {
+ "name": "tags_tag_class_id_tag_classes_id_fk",
+ "tableFrom": "tags",
+ "tableTo": "tag_classes",
+ "columnsFrom": [
+ "tag_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "contract_item_tag_idx_unique": {
+ "name": "contract_item_tag_idx_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "contract_item_id",
+ "tag_idx"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_items": {
+ "name": "template_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "form_mapping_id": {
+ "name": "form_mapping_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tmpl_id": {
+ "name": "tmpl_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tmpl_type": {
+ "name": "tmpl_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "spr_lst_setup": {
+ "name": "spr_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "grd_lst_setup": {
+ "name": "grd_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "spr_itm_lst_setup": {
+ "name": "spr_itm_lst_setup",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_items_form_mapping_id_tag_type_class_form_mappings_id_fk": {
+ "name": "template_items_form_mapping_id_tag_type_class_form_mappings_id_fk",
+ "tableFrom": "template_items",
+ "tableTo": "tag_type_class_form_mappings",
+ "columnsFrom": [
+ "form_mapping_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "uniq_tmpl_in_form_mapping": {
+ "name": "uniq_tmpl_in_form_mapping",
+ "nullsNotDistinct": false,
+ "columns": [
+ "form_mapping_id",
+ "tmpl_id"
+ ]
+ },
+ "uniq_name_in_form_mapping": {
+ "name": "uniq_name_in_form_mapping",
+ "nullsNotDistinct": false,
+ "columns": [
+ "form_mapping_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_data_report_temps": {
+ "name": "vendor_data_report_temps",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "contract_item_id": {
+ "name": "contract_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "form_id": {
+ "name": "form_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_data_report_temps_contract_item_id_contract_items_id_fk": {
+ "name": "vendor_data_report_temps_contract_item_id_contract_items_id_fk",
+ "tableFrom": "vendor_data_report_temps",
+ "tableTo": "contract_items",
+ "columnsFrom": [
+ "contract_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_data_report_temps_form_id_forms_id_fk": {
+ "name": "vendor_data_report_temps_form_id_forms_id_fk",
+ "tableFrom": "vendor_data_report_temps",
+ "tableTo": "forms",
+ "columnsFrom": [
+ "form_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.change_logs": {
+ "name": "change_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_id": {
+ "name": "entity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "changed_fields": {
+ "name": "changed_fields",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "old_values": {
+ "name": "old_values",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_values": {
+ "name": "new_values",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_name": {
+ "name": "user_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_synced": {
+ "name": "is_synced",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "sync_attempts": {
+ "name": "sync_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "last_sync_error": {
+ "name": "last_sync_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "synced_at": {
+ "name": "synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_systems": {
+ "name": "target_systems",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'[]'::jsonb"
+ }
+ },
+ "indexes": {
+ "idx_change_logs_vendor_synced": {
+ "name": "idx_change_logs_vendor_synced",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_synced",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_created_at": {
+ "name": "idx_change_logs_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_entity": {
+ "name": "idx_change_logs_entity",
+ "columns": [
+ {
+ "expression": "entity_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "entity_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_change_logs_sync_attempts": {
+ "name": "idx_change_logs_sync_attempts",
+ "columns": [
+ {
+ "expression": "sync_attempts",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_attachments": {
+ "name": "document_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "document_attachments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upload_id": {
+ "name": "upload_id",
+ "type": "varchar(36)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "varchar(36)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dolce_file_path": {
+ "name": "dolce_file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_attachments_revision_id_revisions_id_fk": {
+ "name": "document_attachments_revision_id_revisions_id_fk",
+ "tableFrom": "document_attachments",
+ "tableTo": "revisions",
+ "columnsFrom": [
+ "revision_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.documents": {
+ "name": "documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "documents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_move_gbn": {
+ "name": "drawing_move_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discipline": {
+ "name": "discipline",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_document_id": {
+ "name": "external_document_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_system_type": {
+ "name": "external_system_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_synced_at": {
+ "name": "external_synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_drawing_no": {
+ "name": "shi_drawing_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager": {
+ "name": "manager",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_enm": {
+ "name": "manager_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_no": {
+ "name": "manager_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group": {
+ "name": "register_group",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group_id": {
+ "name": "register_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_no": {
+ "name": "create_user_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_id": {
+ "name": "create_user_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_enm": {
+ "name": "create_user_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_contract_doc_status": {
+ "name": "unique_contract_doc_status",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_contract_vendor_doc": {
+ "name": "unique_contract_vendor_doc",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"vendor_doc_number\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_external_doc": {
+ "name": "unique_external_doc",
+ "columns": [
+ {
+ "expression": "contract_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_system_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"external_document_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_project_doc_status": {
+ "name": "unique_project_doc_status",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_external_doc_project": {
+ "name": "unique_external_doc_project",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "external_system_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"documents\".\"external_document_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "drawing_kind_idx": {
+ "name": "drawing_kind_idx",
+ "columns": [
+ {
+ "expression": "drawing_kind",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "documents_project_id_projects_id_fk": {
+ "name": "documents_project_id_projects_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "documents_contract_id_contracts_id_fk": {
+ "name": "documents_contract_id_contracts_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "contracts",
+ "columnsFrom": [
+ "contract_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "documents_vendor_id_vendors_id_fk": {
+ "name": "documents_vendor_id_vendors_id_fk",
+ "tableFrom": "documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_stages": {
+ "name": "issue_stages",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "issue_stages_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_name": {
+ "name": "stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "plan_date": {
+ "name": "plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actual_date": {
+ "name": "actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stage_status": {
+ "name": "stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "stage_order": {
+ "name": "stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'MEDIUM'"
+ },
+ "assignee_id": {
+ "name": "assignee_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assignee_name": {
+ "name": "assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reminder_days": {
+ "name": "reminder_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_document_stage": {
+ "name": "unique_document_stage",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "document_stage_order": {
+ "name": "document_stage_order",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_order",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_stages_document_id_documents_id_fk": {
+ "name": "issue_stages_document_id_documents_id_fk",
+ "tableFrom": "issue_stages",
+ "tableTo": "documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.revisions": {
+ "name": "revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "revisions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "issue_stage_id": {
+ "name": "issue_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "uploader_type": {
+ "name": "uploader_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'vendor'"
+ },
+ "uploader_id": {
+ "name": "uploader_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploader_name": {
+ "name": "uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage": {
+ "name": "usage",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_type": {
+ "name": "usage_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_status": {
+ "name": "revision_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'SUBMITTED'"
+ },
+ "submitted_date": {
+ "name": "submitted_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_start_date": {
+ "name": "review_start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_date": {
+ "name": "approved_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejected_date": {
+ "name": "rejected_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_id": {
+ "name": "reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_name": {
+ "name": "reviewer_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_upload_id": {
+ "name": "external_upload_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "register_id": {
+ "name": "register_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "unique_stage_revision_usage": {
+ "name": "unique_stage_revision_usage",
+ "columns": [
+ {
+ "expression": "issue_stage_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "usage",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "COALESCE(\"usage_type\", '')",
+ "asc": true,
+ "isExpression": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.stage_documents": {
+ "name": "stage_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "stage_documents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_project_doc": {
+ "name": "unique_project_doc",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unique_project_vendor_doc": {
+ "name": "unique_project_vendor_doc",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_doc_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"stage_documents\".\"vendor_doc_number\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_doc_vendor_id_idx": {
+ "name": "stage_doc_vendor_id_idx",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_doc_status_idx": {
+ "name": "stage_doc_status_idx",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "stage_documents_project_id_projects_id_fk": {
+ "name": "stage_documents_project_id_projects_id_fk",
+ "tableFrom": "stage_documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.stage_issue_stages": {
+ "name": "stage_issue_stages",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "stage_issue_stages_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_name": {
+ "name": "stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "plan_date": {
+ "name": "plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actual_date": {
+ "name": "actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stage_status": {
+ "name": "stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "stage_order": {
+ "name": "stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'MEDIUM'"
+ },
+ "assignee_id": {
+ "name": "assignee_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assignee_name": {
+ "name": "assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reminder_days": {
+ "name": "reminder_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "unique_stage_document_stage": {
+ "name": "unique_stage_document_stage",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stage_document_stage_order": {
+ "name": "stage_document_stage_order",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "stage_order",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "stage_issue_stages_document_id_stage_documents_id_fk": {
+ "name": "stage_issue_stages_document_id_stage_documents_id_fk",
+ "tableFrom": "stage_issue_stages",
+ "tableTo": "stage_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_batches": {
+ "name": "sync_batches",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "batch_size": {
+ "name": "batch_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "retry_count": {
+ "name": "retry_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "change_log_ids": {
+ "name": "change_log_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "success_count": {
+ "name": "success_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "failure_count": {
+ "name": "failure_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_metadata": {
+ "name": "sync_metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_sync_batches_project_system": {
+ "name": "idx_sync_batches_project_system",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_system",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sync_batches_status": {
+ "name": "idx_sync_batches_status",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sync_batches_created_at": {
+ "name": "idx_sync_batches_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_configs": {
+ "name": "sync_configs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_enabled": {
+ "name": "sync_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "sync_interval_minutes": {
+ "name": "sync_interval_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 30
+ },
+ "last_successful_sync": {
+ "name": "last_successful_sync",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_sync_attempt": {
+ "name": "last_sync_attempt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpoint_url": {
+ "name": "endpoint_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_token": {
+ "name": "auth_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_version": {
+ "name": "api_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'v1'"
+ },
+ "max_batch_size": {
+ "name": "max_batch_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 100
+ },
+ "retry_max_attempts": {
+ "name": "retry_max_attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_sync_configs_contract_system": {
+ "name": "idx_sync_configs_contract_system",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_system",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_attachments": {
+ "name": "vendor_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'GENERAL'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_attachments_vendor_id_vendors_id_fk": {
+ "name": "vendor_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_candidates": {
+ "name": "vendor_candidates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'COLLECTED'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_candidates_vendor_id_vendors_id_fk": {
+ "name": "vendor_candidates_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_candidates",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_contacts": {
+ "name": "vendor_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_position": {
+ "name": "contact_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_department": {
+ "name": "contact_department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_task": {
+ "name": "contact_task",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_primary": {
+ "name": "is_primary",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_contacts_vendor_id_vendors_id_fk": {
+ "name": "vendor_contacts_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_contacts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_possible_items": {
+ "name": "vendor_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_possible_items_vendor_id_vendors_id_fk": {
+ "name": "vendor_possible_items_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_possible_items",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_possible_items_item_code_items_item_code_fk": {
+ "name": "vendor_possible_items_item_code_items_item_code_fk",
+ "tableFrom": "vendor_possible_items",
+ "tableTo": "items",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_possible_materials": {
+ "name": "vendor_possible_materials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_possible_materials_vendor_id_vendors_id_fk": {
+ "name": "vendor_possible_materials_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_possible_materials",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_possible_materials_item_code_materials_item_code_fk": {
+ "name": "vendor_possible_materials_item_code_materials_item_code_fk",
+ "tableFrom": "vendor_possible_materials",
+ "tableTo": "materials",
+ "columnsFrom": [
+ "item_code"
+ ],
+ "columnsTo": [
+ "item_code"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_types": {
+ "name": "vendor_types",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_ko": {
+ "name": "name_ko",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_en": {
+ "name": "name_en",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_types_code_unique": {
+ "name": "vendor_types_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendors": {
+ "name": "vendors",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "vendor_type_id": {
+ "name": "vendor_type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_work_expirence": {
+ "name": "representative_work_expirence",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "corporate_registration_number": {
+ "name": "corporate_registration_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_agency": {
+ "name": "credit_agency",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_rating": {
+ "name": "credit_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cash_flow_rating": {
+ "name": "cash_flow_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "business_size": {
+ "name": "business_size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendors_vendor_type_id_vendor_types_id_fk": {
+ "name": "vendors_vendor_type_id_vendor_types_id_fk",
+ "tableFrom": "vendors",
+ "tableTo": "vendor_types",
+ "columnsFrom": [
+ "vendor_type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tasks": {
+ "name": "tasks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(30)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'todo'"
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bug'"
+ },
+ "priority": {
+ "name": "priority",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'low'"
+ },
+ "archived": {
+ "name": "archived",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "current_timestamp"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "tasks_code_unique": {
+ "name": "tasks_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_candidate_logs": {
+ "name": "vendor_candidate_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_candidate_id": {
+ "name": "vendor_candidate_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_candidate_logs_vendor_candidate_id_vendor_candidates_id_fk": {
+ "name": "vendor_candidate_logs_vendor_candidate_id_vendor_candidates_id_fk",
+ "tableFrom": "vendor_candidate_logs",
+ "tableTo": "vendor_candidates",
+ "columnsFrom": [
+ "vendor_candidate_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_candidate_logs_user_id_users_id_fk": {
+ "name": "vendor_candidate_logs_user_id_users_id_fk",
+ "tableFrom": "vendor_candidate_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendors_logs": {
+ "name": "vendors_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendors_logs_vendor_id_vendors_id_fk": {
+ "name": "vendors_logs_vendor_id_vendors_id_fk",
+ "tableFrom": "vendors_logs",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendors_logs_user_id_users_id_fk": {
+ "name": "vendors_logs_user_id_users_id_fk",
+ "tableFrom": "vendors_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.basic_contract": {
+ "name": "basic_contract",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "basic_contract_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_by": {
+ "name": "requested_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "basic_contract_template_id_basic_contract_templates_id_fk": {
+ "name": "basic_contract_template_id_basic_contract_templates_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "basic_contract_templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_vendor_id_vendors_id_fk": {
+ "name": "basic_contract_vendor_id_vendors_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_requested_by_users_id_fk": {
+ "name": "basic_contract_requested_by_users_id_fk",
+ "tableFrom": "basic_contract",
+ "tableTo": "users",
+ "columnsFrom": [
+ "requested_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.basic_contract_templates": {
+ "name": "basic_contract_templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "basic_contract_templates_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "template_name": {
+ "name": "template_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validity_period": {
+ "name": "validity_period",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_review_required": {
+ "name": "legal_review_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "shipbuilding_applicable": {
+ "name": "shipbuilding_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "wind_applicable": {
+ "name": "wind_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "pc_applicable": {
+ "name": "pc_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "nb_applicable": {
+ "name": "nb_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "rc_applicable": {
+ "name": "rc_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "gy_applicable": {
+ "name": "gy_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sys_applicable": {
+ "name": "sys_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "infra_applicable": {
+ "name": "infra_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disposed_at": {
+ "name": "disposed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restored_at": {
+ "name": "restored_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "basic_contract_templates_created_by_users_id_fk": {
+ "name": "basic_contract_templates_created_by_users_id_fk",
+ "tableFrom": "basic_contract_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "basic_contract_templates_updated_by_users_id_fk": {
+ "name": "basic_contract_templates_updated_by_users_id_fk",
+ "tableFrom": "basic_contract_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "template_name_revision_unique": {
+ "name": "template_name_revision_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "template_name",
+ "revision"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.incoterms": {
+ "name": "incoterms",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(20)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.payment_terms": {
+ "name": "payment_terms",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.place_of_shipping": {
+ "name": "place_of_shipping",
+ "schema": "",
+ "columns": {
+ "code": {
+ "name": "code",
+ "type": "varchar(20)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_items": {
+ "name": "pr_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_item": {
+ "name": "rfq_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item": {
+ "name": "pr_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_no": {
+ "name": "pr_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_category": {
+ "name": "material_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "acc": {
+ "name": "acc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "size": {
+ "name": "size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gross_weight": {
+ "name": "gross_weight",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "gw_uom": {
+ "name": "gw_uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_no": {
+ "name": "spec_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_url": {
+ "name": "spec_url",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tracking_no": {
+ "name": "tracking_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_yn": {
+ "name": "major_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "project_def": {
+ "name": "project_def",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_sc": {
+ "name": "project_sc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_kl": {
+ "name": "project_kl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_lc": {
+ "name": "project_lc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_dl": {
+ "name": "project_dl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_items_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "pr_items_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "pr_items",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_attachments": {
+ "name": "procurement_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "procurement_rfq_details_id": {
+ "name": "procurement_rfq_details_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_attachments_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "procurement_attachments_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_attachments_procurement_rfq_details_id_procurement_rfq_details_id_fk": {
+ "name": "procurement_attachments_procurement_rfq_details_id_procurement_rfq_details_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "procurement_rfq_details",
+ "columnsFrom": [
+ "procurement_rfq_details_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_attachments_created_by_users_id_fk": {
+ "name": "procurement_attachments_created_by_users_id_fk",
+ "tableFrom": "procurement_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "attachment_type_check": {
+ "name": "attachment_type_check",
+ "value": "\"procurement_attachments\".\"procurement_rfqs_id\" IS NOT NULL OR \"procurement_attachments\".\"procurement_rfq_details_id\" IS NOT NULL"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.procurement_quotation_items": {
+ "name": "procurement_quotation_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_price": {
+ "name": "unit_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "vendor_material_code": {
+ "name": "vendor_material_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_material_description": {
+ "name": "vendor_material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "lead_time_in_days": {
+ "name": "lead_time_in_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_rate": {
+ "name": "tax_rate",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_amount": {
+ "name": "tax_amount",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount_rate": {
+ "name": "discount_rate",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount_amount": {
+ "name": "discount_amount",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_alternative": {
+ "name": "is_alternative",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_recommended": {
+ "name": "is_recommended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_quotation_items_quotation_id_procurement_vendor_quotations_id_fk": {
+ "name": "procurement_quotation_items_quotation_id_procurement_vendor_quotations_id_fk",
+ "tableFrom": "procurement_quotation_items",
+ "tableTo": "procurement_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_quotation_items_pr_item_id_pr_items_id_fk": {
+ "name": "procurement_quotation_items_pr_item_id_pr_items_id_fk",
+ "tableFrom": "procurement_quotation_items",
+ "tableTo": "pr_items",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_attachments": {
+ "name": "procurement_rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_attachments_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_attachments_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_comment_id_procurement_rfq_comments_id_fk": {
+ "name": "procurement_rfq_attachments_comment_id_procurement_rfq_comments_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_quotation_id_procurement_vendor_quotations_id_fk": {
+ "name": "procurement_rfq_attachments_quotation_id_procurement_vendor_quotations_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "procurement_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_uploaded_by_users_id_fk": {
+ "name": "procurement_rfq_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_attachments_vendor_id_vendors_id_fk": {
+ "name": "procurement_rfq_attachments_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_attachments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_comments": {
+ "name": "procurement_rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_comment": {
+ "name": "is_vendor_comment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_comments_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_comments_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_vendor_id_vendors_id_fk": {
+ "name": "procurement_rfq_comments_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_user_id_users_id_fk": {
+ "name": "procurement_rfq_comments_user_id_users_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_comments_parent_comment_id_procurement_rfq_comments_id_fk": {
+ "name": "procurement_rfq_comments_parent_comment_id_procurement_rfq_comments_id_fk",
+ "tableFrom": "procurement_rfq_comments",
+ "tableTo": "procurement_rfq_comments",
+ "columnsFrom": [
+ "parent_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfq_details": {
+ "name": "procurement_rfq_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendors_id": {
+ "name": "vendors_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_detail": {
+ "name": "incoterms_detail",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'VV'"
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfq_details_procurement_rfqs_id_procurement_rfqs_id_fk": {
+ "name": "procurement_rfq_details_procurement_rfqs_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "procurement_rfqs_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_vendors_id_vendors_id_fk": {
+ "name": "procurement_rfq_details_vendors_id_vendors_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendors_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_payment_terms_code_payment_terms_code_fk": {
+ "name": "procurement_rfq_details_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_incoterms_code_incoterms_code_fk": {
+ "name": "procurement_rfq_details_incoterms_code_incoterms_code_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfq_details_updated_by_users_id_fk": {
+ "name": "procurement_rfq_details_updated_by_users_id_fk",
+ "tableFrom": "procurement_rfq_details",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_rfqs": {
+ "name": "procurement_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "series": {
+ "name": "series",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_send_date": {
+ "name": "rfq_send_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'RFQ Created'"
+ },
+ "rfq_sealed_yn": {
+ "name": "rfq_sealed_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sent_by": {
+ "name": "sent_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_rfqs_sent_by_users_id_fk": {
+ "name": "procurement_rfqs_sent_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "sent_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfqs_created_by_users_id_fk": {
+ "name": "procurement_rfqs_created_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_rfqs_updated_by_users_id_fk": {
+ "name": "procurement_rfqs_updated_by_users_id_fk",
+ "tableFrom": "procurement_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "procurement_rfqs_rfq_code_unique": {
+ "name": "procurement_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.procurement_vendor_quotations": {
+ "name": "procurement_vendor_quotations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quotation_code": {
+ "name": "quotation_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_version": {
+ "name": "quotation_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "total_items_count": {
+ "name": "total_items_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sub_total": {
+ "name": "sub_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "tax_total": {
+ "name": "tax_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "discount_total": {
+ "name": "discount_total",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'USD'"
+ },
+ "valid_until": {
+ "name": "valid_until",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "estimated_delivery_date": {
+ "name": "estimated_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_detail": {
+ "name": "incoterms_detail",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Draft'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejection_reason": {
+ "name": "rejection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accepted_at": {
+ "name": "accepted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "procurement_vendor_quotations_rfq_id_procurement_rfqs_id_fk": {
+ "name": "procurement_vendor_quotations_rfq_id_procurement_rfqs_id_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "procurement_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_vendor_id_vendors_id_fk": {
+ "name": "procurement_vendor_quotations_vendor_id_vendors_id_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_payment_terms_code_payment_terms_code_fk": {
+ "name": "procurement_vendor_quotations_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "procurement_vendor_quotations_incoterms_code_incoterms_code_fk": {
+ "name": "procurement_vendor_quotations_incoterms_code_incoterms_code_fk",
+ "tableFrom": "procurement_vendor_quotations",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preset_shares": {
+ "name": "preset_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "preset_id": {
+ "name": "preset_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "shared_with_user_id": {
+ "name": "shared_with_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission": {
+ "name": "permission",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preset_shares_preset_id_table_presets_id_fk": {
+ "name": "preset_shares_preset_id_table_presets_id_fk",
+ "tableFrom": "preset_shares",
+ "tableTo": "table_presets",
+ "columnsFrom": [
+ "preset_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.table_presets": {
+ "name": "table_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "table_id": {
+ "name": "table_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "settings": {
+ "name": "settings",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_shared": {
+ "name": "is_shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_attachments": {
+ "name": "tech_sales_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tech_sales_rfq_id": {
+ "name": "tech_sales_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_attachments_tech_sales_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_attachments_tech_sales_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_attachments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "tech_sales_rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_attachments_created_by_users_id_fk": {
+ "name": "tech_sales_attachments_created_by_users_id_fk",
+ "tableFrom": "tech_sales_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_contact_possible_items": {
+ "name": "tech_sales_contact_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "contact_id": {
+ "name": "contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_possible_item_id": {
+ "name": "vendor_possible_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_contact_possible_items_contact_id_tech_vendor_contacts_id_fk": {
+ "name": "tech_sales_contact_possible_items_contact_id_tech_vendor_contacts_id_fk",
+ "tableFrom": "tech_sales_contact_possible_items",
+ "tableTo": "tech_vendor_contacts",
+ "columnsFrom": [
+ "contact_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_contact_possible_items_vendor_possible_item_id_tech_vendor_possible_items_id_fk": {
+ "name": "tech_sales_contact_possible_items_vendor_possible_item_id_tech_vendor_possible_items_id_fk",
+ "tableFrom": "tech_sales_contact_possible_items",
+ "tableTo": "tech_vendor_possible_items",
+ "columnsFrom": [
+ "vendor_possible_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_comment_attachments": {
+ "name": "tech_sales_rfq_comment_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "comment_id": {
+ "name": "comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_comment_attachments_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_comment_id_tech_sales_rfq_comments_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_comment_id_tech_sales_rfq_comments_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_rfq_comments",
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_uploaded_by_users_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comment_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_rfq_comment_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_rfq_comment_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_comments": {
+ "name": "tech_sales_rfq_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_vendor_comment": {
+ "name": "is_vendor_comment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_comments_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_comments_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_rfq_comments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_user_id_users_id_fk": {
+ "name": "tech_sales_rfq_comments_user_id_users_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_comments_parent_comment_id_tech_sales_rfq_comments_id_fk": {
+ "name": "tech_sales_rfq_comments_parent_comment_id_tech_sales_rfq_comments_id_fk",
+ "tableFrom": "tech_sales_rfq_comments",
+ "tableTo": "tech_sales_rfq_comments",
+ "columnsFrom": [
+ "parent_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfq_items": {
+ "name": "tech_sales_rfq_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_shipbuilding_id": {
+ "name": "item_shipbuilding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_offshore_top_id": {
+ "name": "item_offshore_top_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_offshore_hull_id": {
+ "name": "item_offshore_hull_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_type": {
+ "name": "item_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfq_items_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_rfq_items_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_shipbuilding_id_item_shipbuilding_id_fk": {
+ "name": "tech_sales_rfq_items_item_shipbuilding_id_item_shipbuilding_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_shipbuilding",
+ "columnsFrom": [
+ "item_shipbuilding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_offshore_top_id_item_offshore_top_id_fk": {
+ "name": "tech_sales_rfq_items_item_offshore_top_id_item_offshore_top_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_offshore_top",
+ "columnsFrom": [
+ "item_offshore_top_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfq_items_item_offshore_hull_id_item_offshore_hull_id_fk": {
+ "name": "tech_sales_rfq_items_item_offshore_hull_id_item_offshore_hull_id_fk",
+ "tableFrom": "tech_sales_rfq_items",
+ "tableTo": "item_offshore_hull",
+ "columnsFrom": [
+ "item_offshore_hull_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_rfqs": {
+ "name": "tech_sales_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_project_id": {
+ "name": "bidding_project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_send_date": {
+ "name": "rfq_send_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'RFQ Created'"
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sent_by": {
+ "name": "sent_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'SHIP'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_rfqs_bidding_project_id_bidding_projects_id_fk": {
+ "name": "tech_sales_rfqs_bidding_project_id_bidding_projects_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "bidding_projects",
+ "columnsFrom": [
+ "bidding_project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_sent_by_users_id_fk": {
+ "name": "tech_sales_rfqs_sent_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "sent_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_created_by_users_id_fk": {
+ "name": "tech_sales_rfqs_created_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_rfqs_updated_by_users_id_fk": {
+ "name": "tech_sales_rfqs_updated_by_users_id_fk",
+ "tableFrom": "tech_sales_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "tech_sales_rfqs_rfq_code_unique": {
+ "name": "tech_sales_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_attachments": {
+ "name": "tech_sales_vendor_quotation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_vendor_upload": {
+ "name": "is_vendor_upload",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_vendor_quotation_attachments_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotation_attachments_uploaded_by_users_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotation_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_vendor_quotation_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_contacts": {
+ "name": "tech_sales_vendor_quotation_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_id": {
+ "name": "contact_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotation_revisions": {
+ "name": "tech_sales_vendor_quotation_revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "quotation_id": {
+ "name": "quotation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "snapshot": {
+ "name": "snapshot",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_note": {
+ "name": "revision_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revised_by": {
+ "name": "revised_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revised_at": {
+ "name": "revised_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "tech_sales_quotation_revisions_quotation_version_idx": {
+ "name": "tech_sales_quotation_revisions_quotation_version_idx",
+ "columns": [
+ {
+ "expression": "quotation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "tech_sales_vendor_quotation_revisions_quotation_id_tech_sales_vendor_quotations_id_fk": {
+ "name": "tech_sales_vendor_quotation_revisions_quotation_id_tech_sales_vendor_quotations_id_fk",
+ "tableFrom": "tech_sales_vendor_quotation_revisions",
+ "tableTo": "tech_sales_vendor_quotations",
+ "columnsFrom": [
+ "quotation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_sales_vendor_quotations": {
+ "name": "tech_sales_vendor_quotations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quotation_code": {
+ "name": "quotation_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quotation_version": {
+ "name": "quotation_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_price": {
+ "name": "total_price",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_until": {
+ "name": "valid_until",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_flags": {
+ "name": "vendor_flags",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Assigned'"
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rejection_reason": {
+ "name": "rejection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accepted_at": {
+ "name": "accepted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_sales_vendor_quotations_rfq_id_tech_sales_rfqs_id_fk": {
+ "name": "tech_sales_vendor_quotations_rfq_id_tech_sales_rfqs_id_fk",
+ "tableFrom": "tech_sales_vendor_quotations",
+ "tableTo": "tech_sales_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tech_sales_vendor_quotations_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_sales_vendor_quotations_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_sales_vendor_quotations",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_rotation_attempts": {
+ "name": "ocr_rotation_attempts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rotation": {
+ "name": "rotation",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "confidence": {
+ "name": "confidence",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tables_found": {
+ "name": "tables_found",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "text_quality": {
+ "name": "text_quality",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "keyword_count": {
+ "name": "keyword_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "extracted_rows_count": {
+ "name": "extracted_rows_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ocr_rotation_attempts_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_rotation_attempts_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_rotation_attempts",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_rows": {
+ "name": "ocr_rows",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "table_id": {
+ "name": "table_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "row_index": {
+ "name": "row_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "report_no": {
+ "name": "report_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "inspection_date": {
+ "name": "inspection_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "no": {
+ "name": "no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identification_no": {
+ "name": "identification_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_no": {
+ "name": "tag_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joint_no": {
+ "name": "joint_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joint_type": {
+ "name": "joint_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "welding_date": {
+ "name": "welding_date",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confidence": {
+ "name": "confidence",
+ "type": "numeric(5, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source_table": {
+ "name": "source_table",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source_row": {
+ "name": "source_row",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "idx_ocr_report_no_unique": {
+ "name": "idx_ocr_report_no_unique",
+ "columns": [
+ {
+ "expression": "report_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "tag_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "joint_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "joint_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ocr_rows_table_id_ocr_tables_id_fk": {
+ "name": "ocr_rows_table_id_ocr_tables_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "ocr_tables",
+ "columnsFrom": [
+ "table_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ocr_rows_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_rows_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ocr_rows_user_id_users_id_fk": {
+ "name": "ocr_rows_user_id_users_id_fk",
+ "tableFrom": "ocr_rows",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_sessions": {
+ "name": "ocr_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "processing_time": {
+ "name": "processing_time",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "best_rotation": {
+ "name": "best_rotation",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_tables": {
+ "name": "total_tables",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_rows": {
+ "name": "total_rows",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "image_enhanced": {
+ "name": "image_enhanced",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "pdf_converted": {
+ "name": "pdf_converted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "warnings": {
+ "name": "warnings",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ocr_tables": {
+ "name": "ocr_tables",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "table_index": {
+ "name": "table_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "row_count": {
+ "name": "row_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ocr_tables_session_id_ocr_sessions_id_fk": {
+ "name": "ocr_tables_session_id_ocr_sessions_id_fk",
+ "tableFrom": "ocr_tables",
+ "tableTo": "ocr_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfq_attachment_revisions": {
+ "name": "b_rfq_attachment_revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_no": {
+ "name": "revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision_comment": {
+ "name": "revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest": {
+ "name": "is_latest",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "latest_revision_idx": {
+ "name": "latest_revision_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_latest",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"b_rfq_attachment_revisions\".\"is_latest\" = $1",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "attachment_revision_idx": {
+ "name": "attachment_revision_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision_no",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "b_rfq_attachment_revisions_attachment_id_b_rfq_attachments_id_fk": {
+ "name": "b_rfq_attachment_revisions_attachment_id_b_rfq_attachments_id_fk",
+ "tableFrom": "b_rfq_attachment_revisions",
+ "tableTo": "b_rfq_attachments",
+ "columnsFrom": [
+ "attachment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "b_rfq_attachment_revisions_created_by_users_id_fk": {
+ "name": "b_rfq_attachment_revisions_created_by_users_id_fk",
+ "tableFrom": "b_rfq_attachment_revisions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfqs": {
+ "name": "b_rfqs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "b_rfqs_project_id_projects_id_fk": {
+ "name": "b_rfqs_project_id_projects_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "b_rfqs_created_by_users_id_fk": {
+ "name": "b_rfqs_created_by_users_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "b_rfqs_updated_by_users_id_fk": {
+ "name": "b_rfqs_updated_by_users_id_fk",
+ "tableFrom": "b_rfqs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "b_rfqs_rfq_code_unique": {
+ "name": "b_rfqs_rfq_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "rfq_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.b_rfq_attachments": {
+ "name": "b_rfq_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'Rev.0'"
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "b_rfq_attachments_rfq_id_b_rfqs_id_fk": {
+ "name": "b_rfq_attachments_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "b_rfq_attachments",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "b_rfq_attachments_created_by_users_id_fk": {
+ "name": "b_rfq_attachments_created_by_users_id_fk",
+ "tableFrom": "b_rfq_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.final_rfq": {
+ "name": "final_rfq",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "final_rfq_status": {
+ "name": "final_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'VV'"
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "firsttime_yn": {
+ "name": "firsttime_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_remark": {
+ "name": "vendor_remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "final_rfq_rfq_id_b_rfqs_id_fk": {
+ "name": "final_rfq_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "final_rfq_vendor_id_vendors_id_fk": {
+ "name": "final_rfq_vendor_id_vendors_id_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "final_rfq_incoterms_code_incoterms_code_fk": {
+ "name": "final_rfq_incoterms_code_incoterms_code_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "final_rfq_payment_terms_code_payment_terms_code_fk": {
+ "name": "final_rfq_payment_terms_code_payment_terms_code_fk",
+ "tableFrom": "final_rfq",
+ "tableTo": "payment_terms",
+ "columnsFrom": [
+ "payment_terms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.initial_rfq": {
+ "name": "initial_rfq",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "initial_rfq_status": {
+ "name": "initial_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'DRAFT'"
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "rfq_revision": {
+ "name": "rfq_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "initial_rfq_rfq_id_b_rfqs_id_fk": {
+ "name": "initial_rfq_rfq_id_b_rfqs_id_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "b_rfqs",
+ "columnsFrom": [
+ "rfq_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "initial_rfq_vendor_id_vendors_id_fk": {
+ "name": "initial_rfq_vendor_id_vendors_id_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "initial_rfq_incoterms_code_incoterms_code_fk": {
+ "name": "initial_rfq_incoterms_code_incoterms_code_fk",
+ "tableFrom": "initial_rfq",
+ "tableTo": "incoterms",
+ "columnsFrom": [
+ "incoterms_code"
+ ],
+ "columnsTo": [
+ "code"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_attachment_responses": {
+ "name": "vendor_attachment_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'NOT_RESPONDED'"
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'Rev.0'"
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "vendor_response_idx": {
+ "name": "vendor_response_idx",
+ "columns": [
+ {
+ "expression": "attachment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "rfq_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vendor_attachment_responses_attachment_id_b_rfq_attachments_id_fk": {
+ "name": "vendor_attachment_responses_attachment_id_b_rfq_attachments_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "b_rfq_attachments",
+ "columnsFrom": [
+ "attachment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_vendor_id_vendors_id_fk": {
+ "name": "vendor_attachment_responses_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_created_by_users_id_fk": {
+ "name": "vendor_attachment_responses_created_by_users_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "vendor_attachment_responses_updated_by_users_id_fk": {
+ "name": "vendor_attachment_responses_updated_by_users_id_fk",
+ "tableFrom": "vendor_attachment_responses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_attachments_b": {
+ "name": "vendor_response_attachments_b",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_attachments_b_vendor_response_id_vendor_attachment_responses_id_fk": {
+ "name": "vendor_response_attachments_b_vendor_response_id_vendor_attachment_responses_id_fk",
+ "tableFrom": "vendor_response_attachments_b",
+ "tableTo": "vendor_attachment_responses",
+ "columnsFrom": [
+ "vendor_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_attachments_b_uploaded_by_users_id_fk": {
+ "name": "vendor_response_attachments_b_uploaded_by_users_id_fk",
+ "tableFrom": "vendor_response_attachments_b",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_response_history": {
+ "name": "vendor_response_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_status": {
+ "name": "previous_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_by": {
+ "name": "action_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_at": {
+ "name": "action_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_response_history_vendor_response_id_vendor_attachment_responses_id_fk": {
+ "name": "vendor_response_history_vendor_response_id_vendor_attachment_responses_id_fk",
+ "tableFrom": "vendor_response_history",
+ "tableTo": "vendor_attachment_responses",
+ "columnsFrom": [
+ "vendor_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_response_history_action_by_users_id_fk": {
+ "name": "vendor_response_history_action_by_users_id_fk",
+ "tableFrom": "vendor_response_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "action_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_attachments": {
+ "name": "tech_vendor_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'GENERAL'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_attachments_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_attachments_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_attachments",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_contacts": {
+ "name": "tech_vendor_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_position": {
+ "name": "contact_position",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_title": {
+ "name": "contact_title",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_country": {
+ "name": "contact_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_primary": {
+ "name": "is_primary",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_contacts_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_contacts_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_contacts",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendor_possible_items": {
+ "name": "tech_vendor_possible_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "shipbuilding_item_id": {
+ "name": "shipbuilding_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "offshore_top_item_id": {
+ "name": "offshore_top_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "offshore_hull_item_id": {
+ "name": "offshore_hull_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tech_vendor_possible_items_vendor_id_tech_vendors_id_fk": {
+ "name": "tech_vendor_possible_items_vendor_id_tech_vendors_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "tech_vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_shipbuilding_item_id_item_shipbuilding_id_fk": {
+ "name": "tech_vendor_possible_items_shipbuilding_item_id_item_shipbuilding_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_shipbuilding",
+ "columnsFrom": [
+ "shipbuilding_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_offshore_top_item_id_item_offshore_top_id_fk": {
+ "name": "tech_vendor_possible_items_offshore_top_item_id_item_offshore_top_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_offshore_top",
+ "columnsFrom": [
+ "offshore_top_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "tech_vendor_possible_items_offshore_hull_item_id_item_offshore_hull_id_fk": {
+ "name": "tech_vendor_possible_items_offshore_hull_item_id_item_offshore_hull_id_fk",
+ "tableFrom": "tech_vendor_possible_items",
+ "tableTo": "item_offshore_hull",
+ "columnsFrom": [
+ "offshore_hull_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tech_vendors": {
+ "name": "tech_vendors",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_eng": {
+ "name": "country_eng",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_fab": {
+ "name": "country_fab",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_name": {
+ "name": "agent_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_phone": {
+ "name": "agent_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_email": {
+ "name": "agent_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tech_vendor_type": {
+ "name": "tech_vendor_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "is_quote_comparison": {
+ "name": "is_quote_comparison",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_answer_options": {
+ "name": "esg_answer_options",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "esg_evaluation_item_id": {
+ "name": "esg_evaluation_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_text": {
+ "name": "answer_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_answer_options_esg_evaluation_item_id_esg_evaluation_items_id_fk": {
+ "name": "esg_answer_options_esg_evaluation_item_id_esg_evaluation_items_id_fk",
+ "tableFrom": "esg_answer_options",
+ "tableTo": "esg_evaluation_items",
+ "columnsFrom": [
+ "esg_evaluation_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluation_items": {
+ "name": "esg_evaluation_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "esg_evaluation_id": {
+ "name": "esg_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_item": {
+ "name": "evaluation_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_item_description": {
+ "name": "evaluation_item_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_evaluation_items_esg_evaluation_id_esg_evaluations_id_fk": {
+ "name": "esg_evaluation_items_esg_evaluation_id_esg_evaluations_id_fk",
+ "tableFrom": "esg_evaluation_items",
+ "tableTo": "esg_evaluations",
+ "columnsFrom": [
+ "esg_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluation_responses": {
+ "name": "esg_evaluation_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "esg_evaluation_item_id": {
+ "name": "esg_evaluation_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "esg_answer_option_id": {
+ "name": "esg_answer_option_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selected_score": {
+ "name": "selected_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "additional_comments": {
+ "name": "additional_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "esg_evaluation_responses_submission_id_evaluation_submissions_id_fk": {
+ "name": "esg_evaluation_responses_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "esg_evaluation_responses_esg_evaluation_item_id_esg_evaluation_items_id_fk": {
+ "name": "esg_evaluation_responses_esg_evaluation_item_id_esg_evaluation_items_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "esg_evaluation_items",
+ "columnsFrom": [
+ "esg_evaluation_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "esg_evaluation_responses_esg_answer_option_id_esg_answer_options_id_fk": {
+ "name": "esg_evaluation_responses_esg_answer_option_id_esg_answer_options_id_fk",
+ "tableFrom": "esg_evaluation_responses",
+ "tableTo": "esg_answer_options",
+ "columnsFrom": [
+ "esg_answer_option_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.esg_evaluations": {
+ "name": "esg_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "esg_evaluations_serial_number_unique": {
+ "name": "esg_evaluations_serial_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "serial_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_submissions": {
+ "name": "evaluation_submissions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_round": {
+ "name": "evaluation_round",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_status": {
+ "name": "submission_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_by": {
+ "name": "reviewed_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "average_esg_score": {
+ "name": "average_esg_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_general_items": {
+ "name": "total_general_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "completed_general_items": {
+ "name": "completed_general_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "total_esg_items": {
+ "name": "total_esg_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "completed_esg_items": {
+ "name": "completed_esg_items",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_submissions_periodic_evaluation_id_periodic_evaluations_id_fk": {
+ "name": "evaluation_submissions_periodic_evaluation_id_periodic_evaluations_id_fk",
+ "tableFrom": "evaluation_submissions",
+ "tableTo": "periodic_evaluations",
+ "columnsFrom": [
+ "periodic_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_submissions_company_id_vendors_id_fk": {
+ "name": "evaluation_submissions_company_id_vendors_id_fk",
+ "tableFrom": "evaluation_submissions",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "evaluation_submissions_submission_id_unique": {
+ "name": "evaluation_submissions_submission_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "submission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.general_evaluation_responses": {
+ "name": "general_evaluation_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "general_evaluation_id": {
+ "name": "general_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_text": {
+ "name": "response_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "has_attachments": {
+ "name": "has_attachments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "review_comments": {
+ "name": "review_comments",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "general_evaluation_responses_submission_id_evaluation_submissions_id_fk": {
+ "name": "general_evaluation_responses_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "general_evaluation_responses",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "general_evaluation_responses_general_evaluation_id_general_evaluations_id_fk": {
+ "name": "general_evaluation_responses_general_evaluation_id_general_evaluations_id_fk",
+ "tableFrom": "general_evaluation_responses",
+ "tableTo": "general_evaluations",
+ "columnsFrom": [
+ "general_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.general_evaluations": {
+ "name": "general_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "general_evaluations_serial_number_unique": {
+ "name": "general_evaluations_serial_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "serial_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_evaluation_attachments": {
+ "name": "vendor_evaluation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "submission_id": {
+ "name": "submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "general_evaluation_response_id": {
+ "name": "general_evaluation_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stored_file_name": {
+ "name": "stored_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_evaluation_attachments_submission_id_evaluation_submissions_id_fk": {
+ "name": "vendor_evaluation_attachments_submission_id_evaluation_submissions_id_fk",
+ "tableFrom": "vendor_evaluation_attachments",
+ "tableTo": "evaluation_submissions",
+ "columnsFrom": [
+ "submission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vendor_evaluation_attachments_general_evaluation_response_id_general_evaluation_responses_id_fk": {
+ "name": "vendor_evaluation_attachments_general_evaluation_response_id_general_evaluation_responses_id_fk",
+ "tableFrom": "vendor_evaluation_attachments",
+ "tableTo": "general_evaluation_responses",
+ "columnsFrom": [
+ "general_evaluation_response_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_evaluation_attachments_file_id_unique": {
+ "name": "vendor_evaluation_attachments_file_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "file_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_target_reviewers": {
+ "name": "evaluation_target_reviewers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name_from": {
+ "name": "department_name_from",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "assigned_by": {
+ "name": "assigned_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_target_reviewers_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "evaluation_target_reviewers_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviewers_reviewer_user_id_users_id_fk": {
+ "name": "evaluation_target_reviewers_reviewer_user_id_users_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "reviewer_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviewers_assigned_by_users_id_fk": {
+ "name": "evaluation_target_reviewers_assigned_by_users_id_fk",
+ "tableFrom": "evaluation_target_reviewers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "assigned_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_target_department": {
+ "name": "unique_target_department",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_target_reviews": {
+ "name": "evaluation_target_reviews",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_approved": {
+ "name": "is_approved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_comment": {
+ "name": "review_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_target_reviews_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "evaluation_target_reviews_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "evaluation_target_reviews",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "evaluation_target_reviews_reviewer_user_id_users_id_fk": {
+ "name": "evaluation_target_reviews_reviewer_user_id_users_id_fk",
+ "tableFrom": "evaluation_target_reviews",
+ "tableTo": "users",
+ "columnsFrom": [
+ "reviewer_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_target_reviewer": {
+ "name": "unique_target_reviewer",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "reviewer_user_id",
+ "department_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.evaluation_targets": {
+ "name": "evaluation_targets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_user_id": {
+ "name": "admin_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "evaluation_targets_vendor_id_vendors_id_fk": {
+ "name": "evaluation_targets_vendor_id_vendors_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_targets_admin_user_id_users_id_fk": {
+ "name": "evaluation_targets_admin_user_id_users_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "admin_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "evaluation_targets_confirmed_by_users_id_fk": {
+ "name": "evaluation_targets_confirmed_by_users_id_fk",
+ "tableFrom": "evaluation_targets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "confirmed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.periodic_evaluations": {
+ "name": "periodic_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_grade": {
+ "name": "evaluation_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "periodic_evaluations_evaluation_target_id_evaluation_targets_id_fk": {
+ "name": "periodic_evaluations_evaluation_target_id_evaluation_targets_id_fk",
+ "tableFrom": "periodic_evaluations",
+ "tableTo": "evaluation_targets",
+ "columnsFrom": [
+ "evaluation_target_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "periodic_evaluations_finalized_by_users_id_fk": {
+ "name": "periodic_evaluations_finalized_by_users_id_fk",
+ "tableFrom": "periodic_evaluations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "finalized_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_evaluation_target": {
+ "name": "unique_evaluation_target",
+ "nullsNotDistinct": false,
+ "columns": [
+ "evaluation_target_id",
+ "evaluation_period"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluation_attachments": {
+ "name": "reviewer_evaluation_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reviewer_evaluation_detail_id": {
+ "name": "reviewer_evaluation_detail_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stored_file_name": {
+ "name": "stored_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_path": {
+ "name": "public_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_extension": {
+ "name": "file_extension",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "reviewer_evaluation_detail_id_idx": {
+ "name": "reviewer_evaluation_detail_id_idx",
+ "columns": [
+ {
+ "expression": "reviewer_evaluation_detail_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "reviewer_evaluation_attachments_reviewer_evaluation_detail_id_reviewer_evaluation_details_id_fk": {
+ "name": "reviewer_evaluation_attachments_reviewer_evaluation_detail_id_reviewer_evaluation_details_id_fk",
+ "tableFrom": "reviewer_evaluation_attachments",
+ "tableTo": "reviewer_evaluation_details",
+ "columnsFrom": [
+ "reviewer_evaluation_detail_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluation_attachments_uploaded_by_users_id_fk": {
+ "name": "reviewer_evaluation_attachments_uploaded_by_users_id_fk",
+ "tableFrom": "reviewer_evaluation_attachments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "uploaded_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluation_details": {
+ "name": "reviewer_evaluation_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reviewer_evaluation_id": {
+ "name": "reviewer_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reg_eval_criteria_details_id": {
+ "name": "reg_eval_criteria_details_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score": {
+ "name": "score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reviewer_evaluation_details_reviewer_evaluation_id_reviewer_evaluations_id_fk": {
+ "name": "reviewer_evaluation_details_reviewer_evaluation_id_reviewer_evaluations_id_fk",
+ "tableFrom": "reviewer_evaluation_details",
+ "tableTo": "reviewer_evaluations",
+ "columnsFrom": [
+ "reviewer_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluation_details_reg_eval_criteria_details_id_reg_eval_criteria_details_id_fk": {
+ "name": "reviewer_evaluation_details_reg_eval_criteria_details_id_reg_eval_criteria_details_id_fk",
+ "tableFrom": "reviewer_evaluation_details",
+ "tableTo": "reg_eval_criteria_details",
+ "columnsFrom": [
+ "reg_eval_criteria_details_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_reviewer_criteria": {
+ "name": "unique_reviewer_criteria",
+ "nullsNotDistinct": false,
+ "columns": [
+ "reviewer_evaluation_id",
+ "reg_eval_criteria_details_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reviewer_evaluations": {
+ "name": "reviewer_evaluations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_target_reviewer_id": {
+ "name": "evaluation_target_reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_completed": {
+ "name": "is_completed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reviewer_evaluations_periodic_evaluation_id_periodic_evaluations_id_fk": {
+ "name": "reviewer_evaluations_periodic_evaluation_id_periodic_evaluations_id_fk",
+ "tableFrom": "reviewer_evaluations",
+ "tableTo": "periodic_evaluations",
+ "columnsFrom": [
+ "periodic_evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "reviewer_evaluations_evaluation_target_reviewer_id_evaluation_target_reviewers_id_fk": {
+ "name": "reviewer_evaluations_evaluation_target_reviewer_id_evaluation_target_reviewers_id_fk",
+ "tableFrom": "reviewer_evaluations",
+ "tableTo": "evaluation_target_reviewers",
+ "columnsFrom": [
+ "evaluation_target_reviewer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_reviewer_evaluation": {
+ "name": "unique_reviewer_evaluation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "periodic_evaluation_id",
+ "evaluation_target_reviewer_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reg_eval_criteria": {
+ "name": "reg_eval_criteria",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "category2": {
+ "name": "category2",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'processScore'"
+ },
+ "item": {
+ "name": "item",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "range": {
+ "name": "range",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_score_min ": {
+ "name": "variable_score_min ",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_score_max ": {
+ "name": "variable_score_max ",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_score_unit ": {
+ "name": "variable_score_unit ",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_type": {
+ "name": "score_type",
+ "type": "score_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'fixed'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reg_eval_criteria_created_by_users_id_fk": {
+ "name": "reg_eval_criteria_created_by_users_id_fk",
+ "tableFrom": "reg_eval_criteria",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "reg_eval_criteria_updated_by_users_id_fk": {
+ "name": "reg_eval_criteria_updated_by_users_id_fk",
+ "tableFrom": "reg_eval_criteria",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.reg_eval_criteria_details": {
+ "name": "reg_eval_criteria_details",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score_equip_ship": {
+ "name": "score_equip_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_equip_marine": {
+ "name": "score_equip_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_ship": {
+ "name": "score_bulk_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_marine": {
+ "name": "score_bulk_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reg_eval_criteria_details_criteria_id_reg_eval_criteria_id_fk": {
+ "name": "reg_eval_criteria_details_criteria_id_reg_eval_criteria_id_fk",
+ "tableFrom": "reg_eval_criteria_details",
+ "tableTo": "reg_eval_criteria",
+ "columnsFrom": [
+ "criteria_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_gtc_files": {
+ "name": "project_gtc_files",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_gtc_files_project_id_projects_id_fk": {
+ "name": "project_gtc_files_project_id_projects_id_fk",
+ "tableFrom": "project_gtc_files",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.menu_assignments": {
+ "name": "menu_assignments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "menu_assignments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "menu_path": {
+ "name": "menu_path",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "menu_title": {
+ "name": "menu_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "menu_description": {
+ "name": "menu_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "menu_group": {
+ "name": "menu_group",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "section_title": {
+ "name": "section_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'evcp'"
+ },
+ "manager1_id": {
+ "name": "manager1_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager2_id": {
+ "name": "manager2_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "menu_assignments_path_idx": {
+ "name": "menu_assignments_path_idx",
+ "columns": [
+ {
+ "expression": "menu_path",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_manager1_idx": {
+ "name": "menu_assignments_manager1_idx",
+ "columns": [
+ {
+ "expression": "manager1_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_manager2_idx": {
+ "name": "menu_assignments_manager2_idx",
+ "columns": [
+ {
+ "expression": "manager2_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "menu_assignments_domain_idx": {
+ "name": "menu_assignments_domain_idx",
+ "columns": [
+ {
+ "expression": "domain",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "menu_assignments_manager1_id_users_id_fk": {
+ "name": "menu_assignments_manager1_id_users_id_fk",
+ "tableFrom": "menu_assignments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "manager1_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "menu_assignments_manager2_id_users_id_fk": {
+ "name": "menu_assignments_manager2_id_users_id_fk",
+ "tableFrom": "menu_assignments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "manager2_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "menu_assignments_menu_path_unique": {
+ "name": "menu_assignments_menu_path_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "menu_path"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.page_information": {
+ "name": "page_information",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "page_path": {
+ "name": "page_path",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "page_name": {
+ "name": "page_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "information_content": {
+ "name": "information_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attachment_file_name": {
+ "name": "attachment_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_file_path": {
+ "name": "attachment_file_path",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_file_size": {
+ "name": "attachment_file_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "page_information_page_path_unique": {
+ "name": "page_information_page_path_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "page_path"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna": {
+ "name": "qna",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "qna_category",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_qna_author": {
+ "name": "idx_qna_author",
+ "columns": [
+ {
+ "expression": "author",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_author_users_id_fk": {
+ "name": "qna_author_users_id_fk",
+ "tableFrom": "qna",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna_answer": {
+ "name": "qna_answer",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "qna_id": {
+ "name": "qna_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_answer_qna": {
+ "name": "idx_answer_qna",
+ "columns": [
+ {
+ "expression": "qna_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_answer_author": {
+ "name": "idx_answer_author",
+ "columns": [
+ {
+ "expression": "author",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_answer_qna_id_qna_id_fk": {
+ "name": "qna_answer_qna_id_qna_id_fk",
+ "tableFrom": "qna_answer",
+ "tableTo": "qna",
+ "columnsFrom": [
+ "qna_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "qna_answer_author_users_id_fk": {
+ "name": "qna_answer_author_users_id_fk",
+ "tableFrom": "qna_answer",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.qna_comments": {
+ "name": "qna_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_id": {
+ "name": "answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_comment_answer": {
+ "name": "idx_comment_answer",
+ "columns": [
+ {
+ "expression": "answer_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_comment_parent": {
+ "name": "idx_comment_parent",
+ "columns": [
+ {
+ "expression": "parent_comment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "qna_comments_author_users_id_fk": {
+ "name": "qna_comments_author_users_id_fk",
+ "tableFrom": "qna_comments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "qna_comments_answer_id_qna_answer_id_fk": {
+ "name": "qna_comments_answer_id_qna_answer_id_fk",
+ "tableFrom": "qna_comments",
+ "tableTo": "qna_answer",
+ "columnsFrom": [
+ "answer_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notice": {
+ "name": "notice",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "page_path": {
+ "name": "page_path",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author_id": {
+ "name": "author_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notice_author_id_users_id_fk": {
+ "name": "notice_author_id_users_id_fk",
+ "tableFrom": "notice",
+ "tableTo": "users",
+ "columnsFrom": [
+ "author_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.daily_access_stats": {
+ "name": "daily_access_stats",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "date": {
+ "name": "date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_visits": {
+ "name": "total_visits",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "unique_users": {
+ "name": "unique_users",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_sessions": {
+ "name": "total_sessions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "avg_session_duration": {
+ "name": "avg_session_duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_download_logs": {
+ "name": "file_download_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "file_id": {
+ "name": "file_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_email": {
+ "name": "user_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_name": {
+ "name": "user_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_role": {
+ "name": "user_role",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_ip": {
+ "name": "user_ip",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "downloaded_at": {
+ "name": "downloaded_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_id": {
+ "name": "request_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "referer": {
+ "name": "referer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "download_duration_ms": {
+ "name": "download_duration_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.login_sessions": {
+ "name": "login_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "login_at": {
+ "name": "login_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "logout_at": {
+ "name": "logout_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_token": {
+ "name": "session_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "nextauth_session_id": {
+ "name": "nextauth_session_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_method": {
+ "name": "auth_method",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "last_activity_at": {
+ "name": "last_activity_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "session_expired_at": {
+ "name": "session_expired_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "login_sessions_user_id_users_id_fk": {
+ "name": "login_sessions_user_id_users_id_fk",
+ "tableFrom": "login_sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "login_sessions_session_token_unique": {
+ "name": "login_sessions_session_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "session_token"
+ ]
+ },
+ "login_sessions_nextauth_session_id_unique": {
+ "name": "login_sessions_nextauth_session_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "nextauth_session_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.page_visits": {
+ "name": "page_visits",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "route": {
+ "name": "route",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "page_title": {
+ "name": "page_title",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "referrer": {
+ "name": "referrer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "inet",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "visited_at": {
+ "name": "visited_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "query_params": {
+ "name": "query_params",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "browser_name": {
+ "name": "browser_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "os_name": {
+ "name": "os_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "page_visits_user_id_users_id_fk": {
+ "name": "page_visits_user_id_users_id_fk",
+ "tableFrom": "page_visits",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "page_visits_session_id_login_sessions_id_fk": {
+ "name": "page_visits_session_id_login_sessions_id_fk",
+ "tableFrom": "page_visits",
+ "tableTo": "login_sessions",
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.temp_auth_sessions": {
+ "name": "temp_auth_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "temp_auth_key": {
+ "name": "temp_auth_key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_method": {
+ "name": "auth_method",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_used": {
+ "name": "is_used",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "temp_auth_sessions_user_id_users_id_fk": {
+ "name": "temp_auth_sessions_user_id_users_id_fk",
+ "tableFrom": "temp_auth_sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "temp_auth_sessions_temp_auth_key_unique": {
+ "name": "temp_auth_sessions_temp_auth_key_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "temp_auth_key"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_download_stats": {
+ "name": "user_download_stats",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "date": {
+ "name": "date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_downloads": {
+ "name": "total_downloads",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_bytes": {
+ "name": "total_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "unique_files": {
+ "name": "unique_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_download_at": {
+ "name": "last_download_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notifications": {
+ "name": "notifications",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "related_record_id": {
+ "name": "related_record_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "related_record_type": {
+ "name": "related_record_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "read_at": {
+ "name": "read_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_notifications_user_id": {
+ "name": "idx_notifications_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_created_at": {
+ "name": "idx_notifications_created_at",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_is_read": {
+ "name": "idx_notifications_is_read",
+ "columns": [
+ {
+ "expression": "is_read",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_notifications_user_read": {
+ "name": "idx_notifications_user_read",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_read",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_history": {
+ "name": "template_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_description": {
+ "name": "change_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_by": {
+ "name": "changed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_history_template_id_templates_id_fk": {
+ "name": "template_history_template_id_templates_id_fk",
+ "tableFrom": "template_history",
+ "tableTo": "templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "template_history_changed_by_users_id_fk": {
+ "name": "template_history_changed_by_users_id_fk",
+ "tableFrom": "template_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "changed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.template_variables": {
+ "name": "template_variables",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "template_id": {
+ "name": "template_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_name": {
+ "name": "variable_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variable_type": {
+ "name": "variable_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "default_value": {
+ "name": "default_value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "validation_rule": {
+ "name": "validation_rule",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "template_variables_template_id_templates_id_fk": {
+ "name": "template_variables_template_id_templates_id_fk",
+ "tableFrom": "template_variables",
+ "tableTo": "templates",
+ "columnsFrom": [
+ "template_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.templates": {
+ "name": "templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sample_data": {
+ "name": "sample_data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{}'::jsonb"
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "templates_created_by_users_id_fk": {
+ "name": "templates_created_by_users_id_fk",
+ "tableFrom": "templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "templates_slug_unique": {
+ "name": "templates_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_clauses": {
+ "name": "gtc_clauses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_clauses_document_item_number_idx": {
+ "name": "gtc_clauses_document_item_number_idx",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "item_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_document_idx": {
+ "name": "gtc_clauses_document_idx",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_parent_idx": {
+ "name": "gtc_clauses_parent_idx",
+ "columns": [
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_clauses_full_path_idx": {
+ "name": "gtc_clauses_full_path_idx",
+ "columns": [
+ {
+ "expression": "full_path",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_clauses_document_id_gtc_documents_id_fk": {
+ "name": "gtc_clauses_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_clauses_created_by_id_users_id_fk": {
+ "name": "gtc_clauses_created_by_id_users_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_clauses_updated_by_id_users_id_fk": {
+ "name": "gtc_clauses_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_documents": {
+ "name": "gtc_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {
+ "gtc_project_revision_idx": {
+ "name": "gtc_project_revision_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "revision",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_type_idx": {
+ "name": "gtc_type_idx",
+ "columns": [
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_project_idx": {
+ "name": "gtc_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_created_at_idx": {
+ "name": "gtc_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_updated_at_idx": {
+ "name": "gtc_updated_at_idx",
+ "columns": [
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_documents_project_id_projects_id_fk": {
+ "name": "gtc_documents_project_id_projects_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_documents_created_by_id_users_id_fk": {
+ "name": "gtc_documents_created_by_id_users_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_documents_updated_by_id_users_id_fk": {
+ "name": "gtc_documents_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_negotiation_history": {
+ "name": "gtc_negotiation_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_clause_id": {
+ "name": "vendor_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_status": {
+ "name": "previous_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_fields": {
+ "name": "changed_fields",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachments": {
+ "name": "attachments",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_type": {
+ "name": "actor_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "actor_id": {
+ "name": "actor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_name": {
+ "name": "actor_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_email": {
+ "name": "actor_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "gtc_negotiation_history_vendor_clause_idx": {
+ "name": "gtc_negotiation_history_vendor_clause_idx",
+ "columns": [
+ {
+ "expression": "vendor_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_negotiation_history_action_idx": {
+ "name": "gtc_negotiation_history_action_idx",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_negotiation_history_created_at_idx": {
+ "name": "gtc_negotiation_history_created_at_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_negotiation_history_vendor_clause_id_gtc_vendor_clauses_id_fk": {
+ "name": "gtc_negotiation_history_vendor_clause_id_gtc_vendor_clauses_id_fk",
+ "tableFrom": "gtc_negotiation_history",
+ "tableTo": "gtc_vendor_clauses",
+ "columnsFrom": [
+ "vendor_clause_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_negotiation_history_actor_id_users_id_fk": {
+ "name": "gtc_negotiation_history_actor_id_users_id_fk",
+ "tableFrom": "gtc_negotiation_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "actor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_templates": {
+ "name": "gtc_templates",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'1.0'"
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_metadata": {
+ "name": "variable_metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_templates_name_idx": {
+ "name": "gtc_templates_name_idx",
+ "columns": [
+ {
+ "expression": "name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_templates_is_default_idx": {
+ "name": "gtc_templates_is_default_idx",
+ "columns": [
+ {
+ "expression": "is_default",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_templates_document_id_gtc_documents_id_fk": {
+ "name": "gtc_templates_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_templates_created_by_id_users_id_fk": {
+ "name": "gtc_templates_created_by_id_users_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_templates_updated_by_id_users_id_fk": {
+ "name": "gtc_templates_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_vendor_clauses": {
+ "name": "gtc_vendor_clauses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_document_id": {
+ "name": "vendor_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_clause_id": {
+ "name": "base_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_item_number": {
+ "name": "modified_item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_category": {
+ "name": "modified_category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_subtitle": {
+ "name": "modified_subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modified_content": {
+ "name": "modified_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_number_modified": {
+ "name": "is_number_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_category_modified": {
+ "name": "is_category_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_subtitle_modified": {
+ "name": "is_subtitle_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_content_modified": {
+ "name": "is_content_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_note": {
+ "name": "negotiation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_excluded": {
+ "name": "is_excluded",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_vendor_clauses_vendor_base_idx": {
+ "name": "gtc_vendor_clauses_vendor_base_idx",
+ "columns": [
+ {
+ "expression": "vendor_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "base_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_vendor_document_idx": {
+ "name": "gtc_vendor_clauses_vendor_document_idx",
+ "columns": [
+ {
+ "expression": "vendor_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_base_clause_idx": {
+ "name": "gtc_vendor_clauses_base_clause_idx",
+ "columns": [
+ {
+ "expression": "base_clause_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_parent_idx": {
+ "name": "gtc_vendor_clauses_parent_idx",
+ "columns": [
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_clauses_review_status_idx": {
+ "name": "gtc_vendor_clauses_review_status_idx",
+ "columns": [
+ {
+ "expression": "review_status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_vendor_clauses_vendor_document_id_gtc_vendor_documents_id_fk": {
+ "name": "gtc_vendor_clauses_vendor_document_id_gtc_vendor_documents_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "gtc_vendor_documents",
+ "columnsFrom": [
+ "vendor_document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_base_clause_id_gtc_clauses_id_fk": {
+ "name": "gtc_vendor_clauses_base_clause_id_gtc_clauses_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "gtc_clauses",
+ "columnsFrom": [
+ "base_clause_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_created_by_id_users_id_fk": {
+ "name": "gtc_vendor_clauses_created_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_clauses_updated_by_id_users_id_fk": {
+ "name": "gtc_vendor_clauses_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_clauses",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gtc_vendor_documents": {
+ "name": "gtc_vendor_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "base_document_id": {
+ "name": "base_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'1.0'"
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_start_date": {
+ "name": "negotiation_start_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "negotiation_end_date": {
+ "name": "negotiation_end_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_date": {
+ "name": "approval_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_name": {
+ "name": "final_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_path": {
+ "name": "final_file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_file_size": {
+ "name": "final_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "gtc_vendor_documents_base_vendor_idx": {
+ "name": "gtc_vendor_documents_base_vendor_idx",
+ "columns": [
+ {
+ "expression": "base_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_vendor_idx": {
+ "name": "gtc_vendor_documents_vendor_idx",
+ "columns": [
+ {
+ "expression": "vendor_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_base_document_idx": {
+ "name": "gtc_vendor_documents_base_document_idx",
+ "columns": [
+ {
+ "expression": "base_document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "gtc_vendor_documents_review_status_idx": {
+ "name": "gtc_vendor_documents_review_status_idx",
+ "columns": [
+ {
+ "expression": "review_status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "gtc_vendor_documents_base_document_id_gtc_documents_id_fk": {
+ "name": "gtc_vendor_documents_base_document_id_gtc_documents_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "gtc_documents",
+ "columnsFrom": [
+ "base_document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_vendor_id_vendors_id_fk": {
+ "name": "gtc_vendor_documents_vendor_id_vendors_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_created_by_id_users_id_fk": {
+ "name": "gtc_vendor_documents_created_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "gtc_vendor_documents_updated_by_id_users_id_fk": {
+ "name": "gtc_vendor_documents_updated_by_id_users_id_fk",
+ "tableFrom": "gtc_vendor_documents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.code_groups": {
+ "name": "code_groups",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_format": {
+ "name": "code_format",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expressions": {
+ "name": "expressions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "control_type": {
+ "name": "control_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "code_groups_project_id_projects_id_fk": {
+ "name": "code_groups_project_id_projects_id_fk",
+ "tableFrom": "code_groups",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_group_id": {
+ "name": "unique_project_group_id",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.combo_box_settings": {
+ "name": "combo_box_settings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "combo_box_settings_code_group_id_code_groups_id_fk": {
+ "name": "combo_box_settings_code_group_id_code_groups_id_fk",
+ "tableFrom": "combo_box_settings",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_code_group_code": {
+ "name": "unique_code_group_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "code_group_id",
+ "code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_class_options_new": {
+ "name": "document_class_options_new",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_class_id": {
+ "name": "document_class_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "option_code": {
+ "name": "option_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_class_options_new_document_class_id_document_classes_id_fk": {
+ "name": "document_class_options_new_document_class_id_document_classes_id_fk",
+ "tableFrom": "document_class_options_new",
+ "tableTo": "document_classes",
+ "columnsFrom": [
+ "document_class_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_document_class_option": {
+ "name": "unique_document_class_option",
+ "nullsNotDistinct": false,
+ "columns": [
+ "document_class_id",
+ "option_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_classes": {
+ "name": "document_classes",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_classes_project_id_projects_id_fk": {
+ "name": "document_classes_project_id_projects_id_fk",
+ "tableFrom": "document_classes",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "document_classes_code_group_id_code_groups_id_fk": {
+ "name": "document_classes_code_group_id_code_groups_id_fk",
+ "tableFrom": "document_classes",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_code": {
+ "name": "unique_project_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "code"
+ ]
+ },
+ "unique_project_value": {
+ "name": "unique_project_value",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "value"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_number_type_configs": {
+ "name": "document_number_type_configs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_number_type_id": {
+ "name": "document_number_type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code_group_id": {
+ "name": "code_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sdq": {
+ "name": "sdq",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_number_type_configs_document_number_type_id_document_number_types_id_fk": {
+ "name": "document_number_type_configs_document_number_type_id_document_number_types_id_fk",
+ "tableFrom": "document_number_type_configs",
+ "tableTo": "document_number_types",
+ "columnsFrom": [
+ "document_number_type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "document_number_type_configs_code_group_id_code_groups_id_fk": {
+ "name": "document_number_type_configs_code_group_id_code_groups_id_fk",
+ "tableFrom": "document_number_type_configs",
+ "tableTo": "code_groups",
+ "columnsFrom": [
+ "code_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_document_number_type_sdq": {
+ "name": "unique_document_number_type_sdq",
+ "nullsNotDistinct": false,
+ "columns": [
+ "document_number_type_id",
+ "sdq"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.document_number_types": {
+ "name": "document_number_types",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "document_number_types_project_id_projects_id_fk": {
+ "name": "document_number_types_project_id_projects_id_fk",
+ "tableFrom": "document_number_types",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_project_name": {
+ "name": "unique_project_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_attachments": {
+ "name": "legal_work_attachments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_auto_generated": {
+ "name": "is_auto_generated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'request'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_attachments_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_attachments_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_attachments",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_requests": {
+ "name": "legal_work_requests",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_department": {
+ "name": "review_department",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inquiry_type": {
+ "name": "inquiry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "request_content": {
+ "name": "request_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "contract_project_name": {
+ "name": "contract_project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_amount": {
+ "name": "contract_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_counterparty": {
+ "name": "contract_counterparty",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "counterparty_type": {
+ "name": "counterparty_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "factual_relation": {
+ "name": "factual_relation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_number": {
+ "name": "project_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipowner_orderer": {
+ "name": "shipowner_orderer",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "governing_law": {
+ "name": "governing_law",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_type": {
+ "name": "project_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_requests_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_requests_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_requests",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_work_responses": {
+ "name": "legal_work_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "legal_work_id": {
+ "name": "legal_work_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_content": {
+ "name": "response_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response_reviewer": {
+ "name": "response_reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_confirmer": {
+ "name": "response_confirmer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_approver": {
+ "name": "response_approver",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_re_revision": {
+ "name": "is_re_revision",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "parent_response_id": {
+ "name": "parent_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_work_responses_legal_work_id_legal_works_id_fk": {
+ "name": "legal_work_responses_legal_work_id_legal_works_id_fk",
+ "tableFrom": "legal_work_responses",
+ "tableTo": "legal_works",
+ "columnsFrom": [
+ "legal_work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.legal_works": {
+ "name": "legal_works",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_urgent": {
+ "name": "is_urgent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "request_date": {
+ "name": "request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consultation_date": {
+ "name": "consultation_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expected_answer_date": {
+ "name": "expected_answer_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_completion_date": {
+ "name": "legal_completion_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer": {
+ "name": "reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_responder": {
+ "name": "legal_responder",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachment": {
+ "name": "has_attachment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "legal_works_company_id_vendors_id_fk": {
+ "name": "legal_works_company_id_vendors_id_fk",
+ "tableFrom": "legal_works",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.consent_logs": {
+ "name": "consent_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "consent_logs_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_type": {
+ "name": "consent_type",
+ "type": "consent_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "consent_action",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_status": {
+ "name": "old_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_status": {
+ "name": "new_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "policy_version": {
+ "name": "policy_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action_timestamp": {
+ "name": "action_timestamp",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "additional_data": {
+ "name": "additional_data",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "consent_logs_user_action_timestamp_idx": {
+ "name": "consent_logs_user_action_timestamp_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "action_timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "consent_logs_consent_type_idx": {
+ "name": "consent_logs_consent_type_idx",
+ "columns": [
+ {
+ "expression": "consent_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "consent_logs_action_idx": {
+ "name": "consent_logs_action_idx",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "consent_logs_user_id_users_id_fk": {
+ "name": "consent_logs_user_id_users_id_fk",
+ "tableFrom": "consent_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.policy_versions": {
+ "name": "policy_versions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "policy_versions_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "policy_type": {
+ "name": "policy_type",
+ "type": "policy_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "effective_date": {
+ "name": "effective_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_current": {
+ "name": "is_current",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "policy_versions_type_version_idx": {
+ "name": "policy_versions_type_version_idx",
+ "columns": [
+ {
+ "expression": "policy_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "policy_versions_current_idx": {
+ "name": "policy_versions_current_idx",
+ "columns": [
+ {
+ "expression": "is_current",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "policy_versions_effective_date_idx": {
+ "name": "policy_versions_effective_date_idx",
+ "columns": [
+ {
+ "expression": "effective_date",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_consents": {
+ "name": "user_consents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_consents_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_type": {
+ "name": "consent_type",
+ "type": "consent_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consent_status": {
+ "name": "consent_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "policy_version": {
+ "name": "policy_version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "consented_at": {
+ "name": "consented_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revoke_reason": {
+ "name": "revoke_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "user_consents_user_type_idx": {
+ "name": "user_consents_user_type_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "consent_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_consents_consented_at_idx": {
+ "name": "user_consents_consented_at_idx",
+ "columns": [
+ {
+ "expression": "consented_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_consents_policy_version_idx": {
+ "name": "user_consents_policy_version_idx",
+ "columns": [
+ {
+ "expression": "policy_version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_consents_user_id_users_id_fk": {
+ "name": "user_consents_user_id_users_id_fk",
+ "tableFrom": "user_consents",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_companies": {
+ "name": "bidding_companies",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "invitation_status": {
+ "name": "invitation_status",
+ "type": "invitation_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "invited_at": {
+ "name": "invited_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_amount": {
+ "name": "pre_quote_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_submitted_at": {
+ "name": "pre_quote_submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote_selected": {
+ "name": "is_pre_quote_selected",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "final_quote_amount": {
+ "name": "final_quote_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_quote_submitted_at": {
+ "name": "final_quote_submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_winner": {
+ "name": "is_winner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_companies_bidding_id_biddings_id_fk": {
+ "name": "bidding_companies_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_companies",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_companies_company_id_vendors_id_fk": {
+ "name": "bidding_companies_company_id_vendors_id_fk",
+ "tableFrom": "bidding_companies",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_conditions": {
+ "name": "bidding_conditions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_conditions": {
+ "name": "tax_conditions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_delivery_date": {
+ "name": "contract_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_price_adjustment_applicable": {
+ "name": "is_price_adjustment_applicable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms": {
+ "name": "incoterms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_port": {
+ "name": "shipping_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destination_port": {
+ "name": "destination_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spare_part_options": {
+ "name": "spare_part_options",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_conditions_bidding_id_biddings_id_fk": {
+ "name": "bidding_conditions_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_conditions",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_documents": {
+ "name": "bidding_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "specification_meeting_id": {
+ "name": "specification_meeting_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "document_type": {
+ "name": "document_type",
+ "type": "document_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "uploaded_by": {
+ "name": "uploaded_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bidding_documents_bidding_id_biddings_id_fk": {
+ "name": "bidding_documents_bidding_id_biddings_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_company_id_vendors_id_fk": {
+ "name": "bidding_documents_company_id_vendors_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_pr_item_id_pr_items_for_bidding_id_fk": {
+ "name": "bidding_documents_pr_item_id_pr_items_for_bidding_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "pr_items_for_bidding",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "bidding_documents_specification_meeting_id_specification_meetings_id_fk": {
+ "name": "bidding_documents_specification_meeting_id_specification_meetings_id_fk",
+ "tableFrom": "bidding_documents",
+ "tableTo": "specification_meetings",
+ "columnsFrom": [
+ "specification_meeting_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bidding_notice_template": {
+ "name": "bidding_notice_template",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'standard'"
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'표준 입찰공고문'"
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.biddings": {
+ "name": "biddings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_number": {
+ "name": "bidding_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "contract_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bidding_type": {
+ "name": "bidding_type",
+ "type": "bidding_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "award_count": {
+ "name": "award_count",
+ "type": "award_count",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'single'"
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_date": {
+ "name": "pre_quote_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_registration_date": {
+ "name": "bidding_registration_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_start_date": {
+ "name": "submission_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_end_date": {
+ "name": "submission_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_date": {
+ "name": "evaluation_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_specification_meeting": {
+ "name": "has_specification_meeting",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "budget": {
+ "name": "budget",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_price": {
+ "name": "target_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_bid_price": {
+ "name": "final_bid_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_pr_document": {
+ "name": "has_pr_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "status": {
+ "name": "status",
+ "type": "bidding_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bidding_generated'"
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_email": {
+ "name": "manager_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_phone": {
+ "name": "manager_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "biddings_project_id_projects_id_fk": {
+ "name": "biddings_project_id_projects_id_fk",
+ "tableFrom": "biddings",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "biddings_bidding_number_unique": {
+ "name": "biddings_bidding_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "bidding_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_condition_responses": {
+ "name": "company_condition_responses",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_company_id": {
+ "name": "bidding_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms_response": {
+ "name": "payment_terms_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_conditions_response": {
+ "name": "tax_conditions_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_contract_delivery_date": {
+ "name": "proposed_contract_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "price_adjustment_response": {
+ "name": "price_adjustment_response",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_response": {
+ "name": "incoterms_response",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_shipping_port": {
+ "name": "proposed_shipping_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "proposed_destination_port": {
+ "name": "proposed_destination_port",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spare_part_response": {
+ "name": "spare_part_response",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "additional_proposals": {
+ "name": "additional_proposals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote": {
+ "name": "is_pre_quote",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "company_condition_responses_bidding_company_id_bidding_companies_id_fk": {
+ "name": "company_condition_responses_bidding_company_id_bidding_companies_id_fk",
+ "tableFrom": "company_condition_responses",
+ "tableTo": "bidding_companies",
+ "columnsFrom": [
+ "bidding_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_pr_item_bids": {
+ "name": "company_pr_item_bids",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_company_id": {
+ "name": "bidding_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pr_item_id": {
+ "name": "pr_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "proposed_delivery_date": {
+ "name": "proposed_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_unit_price": {
+ "name": "bid_unit_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bid_amount": {
+ "name": "bid_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "technical_specification": {
+ "name": "technical_specification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_pre_quote": {
+ "name": "is_pre_quote",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "company_pr_item_bids_bidding_company_id_bidding_companies_id_fk": {
+ "name": "company_pr_item_bids_bidding_company_id_bidding_companies_id_fk",
+ "tableFrom": "company_pr_item_bids",
+ "tableTo": "bidding_companies",
+ "columnsFrom": [
+ "bidding_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "company_pr_item_bids_pr_item_id_pr_items_for_bidding_id_fk": {
+ "name": "company_pr_item_bids_pr_item_id_pr_items_for_bidding_id_fk",
+ "tableFrom": "company_pr_item_bids",
+ "tableTo": "pr_items_for_bidding",
+ "columnsFrom": [
+ "pr_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_documents": {
+ "name": "pr_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "document_name": {
+ "name": "document_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "registered_by": {
+ "name": "registered_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_documents_bidding_id_biddings_id_fk": {
+ "name": "pr_documents_bidding_id_biddings_id_fk",
+ "tableFrom": "pr_documents",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pr_items_for_bidding": {
+ "name": "pr_items_for_bidding",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_info": {
+ "name": "project_info",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_info": {
+ "name": "item_info",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi": {
+ "name": "shi",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_delivery_date": {
+ "name": "requested_delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "annual_unit_price": {
+ "name": "annual_unit_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity_unit": {
+ "name": "quantity_unit",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_weight": {
+ "name": "total_weight",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "weight_unit": {
+ "name": "weight_unit",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_spec_document": {
+ "name": "has_spec_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "pr_items_for_bidding_bidding_id_biddings_id_fk": {
+ "name": "pr_items_for_bidding_bidding_id_biddings_id_fk",
+ "tableFrom": "pr_items_for_bidding",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.specification_meetings": {
+ "name": "specification_meetings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "meeting_date": {
+ "name": "meeting_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "meeting_time": {
+ "name": "meeting_time",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "location": {
+ "name": "location",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agenda": {
+ "name": "agenda",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "materials": {
+ "name": "materials",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "specification_meetings_bidding_id_biddings_id_fk": {
+ "name": "specification_meetings_bidding_id_biddings_id_fk",
+ "tableFrom": "specification_meetings",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_selection_results": {
+ "name": "vendor_selection_results",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_id": {
+ "name": "bidding_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selected_company_id": {
+ "name": "selected_company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selection_reason": {
+ "name": "selection_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_summary": {
+ "name": "evaluation_summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_result_documents": {
+ "name": "has_result_documents",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "selected_at": {
+ "name": "selected_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "selected_by": {
+ "name": "selected_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_selection_results_bidding_id_biddings_id_fk": {
+ "name": "vendor_selection_results_bidding_id_biddings_id_fk",
+ "tableFrom": "vendor_selection_results",
+ "tableTo": "biddings",
+ "columnsFrom": [
+ "bidding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "vendor_selection_results_selected_company_id_vendors_id_fk": {
+ "name": "vendor_selection_results_selected_company_id_vendors_id_fk",
+ "tableFrom": "vendor_selection_results",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "selected_company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_additional_info": {
+ "name": "vendor_additional_info",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "business_type": {
+ "name": "business_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "industry_type": {
+ "name": "industry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_size": {
+ "name": "company_size",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revenue": {
+ "name": "revenue",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "factory_established_date": {
+ "name": "factory_established_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_contract_terms": {
+ "name": "preferred_contract_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_additional_info_vendor_id_vendors_id_fk": {
+ "name": "vendor_additional_info_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_additional_info",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_business_contacts": {
+ "name": "vendor_business_contacts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_type": {
+ "name": "contact_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_name": {
+ "name": "contact_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "position": {
+ "name": "position",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department": {
+ "name": "department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "responsibility": {
+ "name": "responsibility",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_business_contacts_vendor_id_vendors_id_fk": {
+ "name": "vendor_business_contacts_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_business_contacts",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vendor_regular_registrations": {
+ "name": "vendor_regular_registrations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'audit_pass'"
+ },
+ "potential_code": {
+ "name": "potential_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_items": {
+ "name": "major_items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registration_request_date": {
+ "name": "registration_request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_department": {
+ "name": "assigned_department",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_department_code": {
+ "name": "assigned_department_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_user": {
+ "name": "assigned_user",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assigned_user_code": {
+ "name": "assigned_user_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "safety_qualification_content": {
+ "name": "safety_qualification_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_skipped": {
+ "name": "gtc_skipped",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_regular_registrations_vendor_id_vendors_id_fk": {
+ "name": "vendor_regular_registrations_vendor_id_vendors_id_fk",
+ "tableFrom": "vendor_regular_registrations",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_assignment_history": {
+ "name": "department_domain_assignment_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_assignment_history_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "assignment_id": {
+ "name": "assignment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previous_values": {
+ "name": "previous_values",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_values": {
+ "name": "new_values",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_by": {
+ "name": "changed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_assignments": {
+ "name": "department_domain_assignments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_assignments_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_domain": {
+ "name": "assigned_domain",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.department_domain_mappings": {
+ "name": "department_domain_mappings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "department_domain_mappings_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "assignment_id": {
+ "name": "assignment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_company_code": {
+ "name": "old_company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_department_code": {
+ "name": "old_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "old_department_name": {
+ "name": "old_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_company_code": {
+ "name": "new_company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_department_code": {
+ "name": "new_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "new_department_name": {
+ "name": "new_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mapping_status": {
+ "name": "mapping_status",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "mapped_by": {
+ "name": "mapped_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mapped_at": {
+ "name": "mapped_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER": {
+ "name": "CUSTOMER_MASTER_BP_HEADER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_HEADER_unique": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_HEADER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "BP_HEADER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRNO": {
+ "name": "ADDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SMTP_ADDR": {
+ "name": "SMTP_ADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "FAX_EXTENS": {
+ "name": "FAX_EXTENS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_NUMBER": {
+ "name": "FAX_NUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CITY1": {
+ "name": "CITY1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY2": {
+ "name": "CITY2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOUSE_NUM1": {
+ "name": "HOUSE_NUM1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANGU": {
+ "name": "LANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME1": {
+ "name": "NAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME2": {
+ "name": "NAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME3": {
+ "name": "NAME3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME4": {
+ "name": "NAME4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NATION": {
+ "name": "NATION",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POST_CODE1": {
+ "name": "POST_CODE1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POST_CODE2": {
+ "name": "POST_CODE2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PO_BOX": {
+ "name": "PO_BOX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGION": {
+ "name": "REGION",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SORT1": {
+ "name": "SORT1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SORT2": {
+ "name": "SORT2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STREET": {
+ "name": "STREET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAXJURCODE": {
+ "name": "TAXJURCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TIME_ZONE": {
+ "name": "TIME_ZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TITLE": {
+ "name": "TITLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANSPZONE": {
+ "name": "TRANSPZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "COUNTRY": {
+ "name": "COUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "R3_USER": {
+ "name": "R3_USER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_EXTENS": {
+ "name": "TEL_EXTENS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_NUMBER": {
+ "name": "TEL_NUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CONSNUMBER": {
+ "name": "CONSNUMBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATE_FROM": {
+ "name": "DATE_FROM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URI_ADDR": {
+ "name": "URI_ADDR",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANRED": {
+ "name": "ANRED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUFSD": {
+ "name": "AUFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAKSD": {
+ "name": "FAKSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GFORM": {
+ "name": "GFORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JMJAH": {
+ "name": "JMJAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JMZAH": {
+ "name": "JMZAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFREPRE": {
+ "name": "J_1KFREPRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFTBUS": {
+ "name": "J_1KFTBUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "J_1KFTIND": {
+ "name": "J_1KFTIND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KATR1": {
+ "name": "KATR1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KDKG1": {
+ "name": "KDKG1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTOKD": {
+ "name": "KTOKD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KUNNR": {
+ "name": "KUNNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LIFNR": {
+ "name": "LIFNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LIFSD": {
+ "name": "LIFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NIELS": {
+ "name": "NIELS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NODEL": {
+ "name": "NODEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUGRP": {
+ "name": "PUGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPERR": {
+ "name": "SPERR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD1": {
+ "name": "STCD1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD2": {
+ "name": "STCD2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD3": {
+ "name": "STCD3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCD4": {
+ "name": "STCD4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STCEG": {
+ "name": "STCEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMJAH": {
+ "name": "UMJAH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UWAER": {
+ "name": "UWAER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VBUND": {
+ "name": "VBUND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT_C": {
+ "name": "ZZAPPDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM_C": {
+ "name": "ZZAPPTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS_C": {
+ "name": "ZZAPPUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBA": {
+ "name": "ZZBA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBRSCH_C": {
+ "name": "ZZBRSCH_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCRMCD": {
+ "name": "ZZCRMCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKAR_C": {
+ "name": "ZZDOKAR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKNR_C": {
+ "name": "ZZDOKNR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKTL_C": {
+ "name": "ZZDOKTL_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKVR_C": {
+ "name": "ZZDOKVR_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDUNS": {
+ "name": "ZZDUNS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTBU": {
+ "name": "ZZFTBU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTBUNM": {
+ "name": "ZZFTBUNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTDT": {
+ "name": "ZZFTDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTDTNM": {
+ "name": "ZZFTDTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTGT": {
+ "name": "ZZFTGT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFTGTNM": {
+ "name": "ZZFTGTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZINBFLGC": {
+ "name": "ZZINBFLGC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT_C": {
+ "name": "ZZLAMDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM_C": {
+ "name": "ZZLAMTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS_C": {
+ "name": "ZZLAMUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZORT01_C": {
+ "name": "ZZORT01_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZORT02_C": {
+ "name": "ZZORT02_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREASON": {
+ "name": "ZZREASON",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT_C": {
+ "name": "ZZREGDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM_C": {
+ "name": "ZZREGTM_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS_C": {
+ "name": "ZZREGUS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTCDT_C": {
+ "name": "ZZSTCDT_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTRAS_C": {
+ "name": "ZZSTRAS_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSUBSEQ_C": {
+ "name": "ZZSUBSEQ_C",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AKONT": {
+ "name": "AKONT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BUKRS": {
+ "name": "BUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "FDGRV": {
+ "name": "FDGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPERR": {
+ "name": "SPERR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZAHLS": {
+ "name": "ZAHLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZTERM": {
+ "name": "ZTERM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZUAWA": {
+ "name": "ZUAWA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZWELS": {
+ "name": "ZWELS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZCOMPANY",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AUFSD": {
+ "name": "AUFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AWAHR": {
+ "name": "AWAHR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BZIRK": {
+ "name": "BZIRK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAKSD": {
+ "name": "FAKSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO1": {
+ "name": "INCO1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO2": {
+ "name": "INCO2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KALKS": {
+ "name": "KALKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KDGRP": {
+ "name": "KDGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KONDA": {
+ "name": "KONDA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTGRD": {
+ "name": "KTGRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KURST": {
+ "name": "KURST",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KZAZU": {
+ "name": "KZAZU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LIFSD": {
+ "name": "LIFSD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOEVM": {
+ "name": "LOEVM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LPRIO": {
+ "name": "LPRIO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLTYP": {
+ "name": "PLTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VERSG": {
+ "name": "VERSG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKBUR": {
+ "name": "VKBUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKGRP": {
+ "name": "VKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VKORG": {
+ "name": "VKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VSBED": {
+ "name": "VSBED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VTWEG": {
+ "name": "VTWEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VWERK": {
+ "name": "VWERK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS": {
+ "name": "WAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZTERM": {
+ "name": "ZTERM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEFPA": {
+ "name": "DEFPA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KUNN2": {
+ "name": "KUNN2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PARVW": {
+ "name": "PARVW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PARZA": {
+ "name": "PARZA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZSALES_ZCPFN",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ALAND": {
+ "name": "ALAND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TATYP": {
+ "name": "TATYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TAXKD": {
+ "name": "TAXKD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZTAXIND",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LAND1": {
+ "name": "LAND1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "STCEG": {
+ "name": "STCEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_CUSGEN_ZVATREG",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM",
+ "schema": "mdg",
+ "columns": {
+ "BP_HEADER": {
+ "name": "BP_HEADER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "TAXNUM": {
+ "name": "TAXNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAXTYPE": {
+ "name": "TAXTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk": {
+ "name": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM_BP_HEADER_CUSTOMER_MASTER_BP_HEADER_BP_HEADER_fk",
+ "tableFrom": "CUSTOMER_MASTER_BP_HEADER_BP_TAXNUM",
+ "tableTo": "CUSTOMER_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "BP_HEADER"
+ ],
+ "columnsTo": [
+ "BP_HEADER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BICD": {
+ "name": "BICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZAREA": {
+ "name": "BIZAREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CCCD": {
+ "name": "CCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COMPCD": {
+ "name": "COMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DEPTLVL": {
+ "name": "DEPTLVL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPTPOSNO": {
+ "name": "DEPTPOSNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHEMPID": {
+ "name": "DHEMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GNCD": {
+ "name": "GNCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PCCD": {
+ "name": "PCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDEPTCD": {
+ "name": "PDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDFROMDT": {
+ "name": "VALIDFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDTODT": {
+ "name": "VALIDTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_unique": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "DEPTCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_COMPNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_CORPNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk": {
+ "name": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM_DEPTCD_DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTCD_fk",
+ "tableFrom": "DEPARTMENT_CODE_CMCTB_DEPT_MDG_DEPTNM",
+ "tableTo": "DEPARTMENT_CODE_CMCTB_DEPT_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "DEPTCD"
+ ],
+ "columnsTo": [
+ "DEPTCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRCNTRY": {
+ "name": "ADDRCNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AEDAT": {
+ "name": "AEDAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AENAM": {
+ "name": "AENAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AEZET": {
+ "name": "AEZET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BICD": {
+ "name": "BICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZAREA": {
+ "name": "BIZAREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSCADDR": {
+ "name": "BSCADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COMPCD": {
+ "name": "COMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COUNTRYCD": {
+ "name": "COUNTRYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSFROMDT": {
+ "name": "CSFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTODT": {
+ "name": "CSTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTIROLE": {
+ "name": "CTIROLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL": {
+ "name": "DEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPENDDT": {
+ "name": "DEPENDDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEPTCD": {
+ "name": "DEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHJOBGRDCD": {
+ "name": "DHJOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHNAME": {
+ "name": "DHNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DHSINGLID": {
+ "name": "DHSINGLID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISPATCH": {
+ "name": "DISPATCH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DPSTARTDT": {
+ "name": "DPSTARTDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTLADDR": {
+ "name": "DTLADDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTLADDR2": {
+ "name": "DTLADDR2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMAIL": {
+ "name": "EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMPADR": {
+ "name": "EMPADR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMPTYPE": {
+ "name": "EMPTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ENGNAME": {
+ "name": "ENGNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EPID": {
+ "name": "EPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERDAT": {
+ "name": "ERDAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERNAM": {
+ "name": "ERNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ERZET": {
+ "name": "ERZET",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FORIGNFLG": {
+ "name": "FORIGNFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBCD": {
+ "name": "GJOBCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBDUTYCD": {
+ "name": "GJOBDUTYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GJOBGRDCD": {
+ "name": "GJOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GNCD": {
+ "name": "GNCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HRMANAGE": {
+ "name": "HRMANAGE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IDNO": {
+ "name": "IDNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBCD": {
+ "name": "JOBCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBCLASS": {
+ "name": "JOBCLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBDUTYCD": {
+ "name": "JOBDUTYCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDCD": {
+ "name": "JOBGRDCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KTL_EMP": {
+ "name": "KTL_EMP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVABSENCE": {
+ "name": "LVABSENCE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MBPHONE": {
+ "name": "MBPHONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME": {
+ "name": "NAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OKTL_EMPL": {
+ "name": "OKTL_EMPL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGBICD": {
+ "name": "ORGBICD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGCOMPCD": {
+ "name": "ORGCOMPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGCORPCD": {
+ "name": "ORGCORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGDEPTCD": {
+ "name": "ORGDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORGPDEPCD": {
+ "name": "ORGPDEPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PAYPLC": {
+ "name": "PAYPLC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDEPTCD": {
+ "name": "PDEPTCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTLCODE": {
+ "name": "PSTLCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RETIRE": {
+ "name": "RETIRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SEX": {
+ "name": "SEX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SINGLEID": {
+ "name": "SINGLEID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SINGLRQ": {
+ "name": "SINGLRQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOCIALID": {
+ "name": "SOCIALID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOCIALID_DECR": {
+ "name": "SOCIALID_DECR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SOJRNEMP": {
+ "name": "SOJRNEMP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNUM": {
+ "name": "TELNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TMPJDIV": {
+ "name": "TMPJDIV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USEDSYS": {
+ "name": "USEDSYS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALFROMDT": {
+ "name": "VALFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALTODT": {
+ "name": "VALTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WFREQUIRE": {
+ "name": "WFREQUIRE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WORKPLC": {
+ "name": "WORKPLC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZPRFLG": {
+ "name": "ZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBUKRS": {
+ "name": "ZZBUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_unique": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "EMPID"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GTEXT": {
+ "name": "GTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BANM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BINM": {
+ "name": "BINM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_BINM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COMPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_CORPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COUNTRYNM": {
+ "name": "COUNTRYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_COUNTRYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "PCCD": {
+ "name": "PCCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "KTEXT": {
+ "name": "KTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTCODE_PCCDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBGRDNM": {
+ "name": "JOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_DHJOBGDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBDUTYNM": {
+ "name": "GJOBDUTYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBDUTYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBGRDNM": {
+ "name": "GJOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ISEXECUT": {
+ "name": "ISEXECUT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDTYPE": {
+ "name": "JOBGRDTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBGRDTYPE",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GJOBNM": {
+ "name": "GJOBNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GJOBNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GNNM": {
+ "name": "GNNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_GNNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBDUTYNM": {
+ "name": "JOBDUTYNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBDUTYNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ISEXECUT": {
+ "name": "ISEXECUT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDNM": {
+ "name": "JOBGRDNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JOBGRDTYPE": {
+ "name": "JOBGRDTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBGRDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "JOBNM": {
+ "name": "JOBNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_JOBNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_KTLNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_OKTLNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BINM": {
+ "name": "BINM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGBICDNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "COMPNM": {
+ "name": "COMPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCOMPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CORPNM": {
+ "name": "CORPNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGCORPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGDEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_ORGPDEPNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM",
+ "schema": "mdg",
+ "columns": {
+ "EMPID": {
+ "name": "EMPID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DEPTNM": {
+ "name": "DEPTNM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk": {
+ "name": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM_EMPID_EMPLOYEE_MASTER_CMCTB_EMP_MDG_EMPID_fk",
+ "tableFrom": "EMPLOYEE_MASTER_CMCTB_EMP_MDG_PDEPTNM",
+ "tableTo": "EMPLOYEE_MASTER_CMCTB_EMP_MDG",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "EMPID"
+ ],
+ "columnsTo": [
+ "EMPID"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADTL_01": {
+ "name": "ADTL_01",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADTL_02": {
+ "name": "ADTL_02",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CORPCD": {
+ "name": "CORPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "GRPCD": {
+ "name": "GRPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAINCD": {
+ "name": "MAINCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VALIDFROMDT": {
+ "name": "VALIDFROMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VALIDTODT": {
+ "name": "VALIDTODT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_unique": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "GRPCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME",
+ "schema": "mdg",
+ "columns": {
+ "GRPCD": {
+ "name": "GRPCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "NAME": {
+ "name": "NAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_GRPCD_EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_fk": {
+ "name": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME_GRPCD_EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_GRPCD_fk",
+ "tableFrom": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF_NAME",
+ "tableTo": "EMPLOYEE_REFERENCE_MASTER_CMCTB_EMP_REF_MDG_IF",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "GRPCD"
+ ],
+ "columnsTo": [
+ "GRPCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL": {
+ "name": "EQUP_MASTER_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "EQUP_MASTER_MATL_MATNR_unique": {
+ "name": "EQUP_MASTER_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_CHARASGN": {
+ "name": "EQUP_MASTER_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_CHARASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_CHARASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_CHARASGN",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_CLASSASGN": {
+ "name": "EQUP_MASTER_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_CLASSASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_CLASSASGN_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_CLASSASGN",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_DESC": {
+ "name": "EQUP_MASTER_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_DESC_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_DESC_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_DESC",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_PLNT": {
+ "name": "EQUP_MASTER_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_PLNT_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_PLNT_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_PLNT",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.EQUP_MASTER_MATL_UNIT": {
+ "name": "EQUP_MASTER_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "EQUP_MASTER_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "EQUP_MASTER_MATL_UNIT_MATNR_EQUP_MASTER_MATL_MATNR_fk": {
+ "name": "EQUP_MASTER_MATL_UNIT_MATNR_EQUP_MASTER_MATL_MATNR_fk",
+ "tableFrom": "EQUP_MASTER_MATL_UNIT",
+ "tableTo": "EQUP_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL": {
+ "name": "MATERIAL_MASTER_PART_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZACT": {
+ "name": "ZZACT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCERT": {
+ "name": "ZZCERT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZINSP": {
+ "name": "ZZINSP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMMTYP": {
+ "name": "ZZMMTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMRC": {
+ "name": "ZZMRC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPJT": {
+ "name": "ZZPJT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPLMID": {
+ "name": "ZZPLMID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRCD_SCV_CTLP": {
+ "name": "ZZPRCD_SCV_CTLP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREPMAT": {
+ "name": "ZZREPMAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_DIA": {
+ "name": "ZZREP_DIA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_DIA_UOM": {
+ "name": "ZZREP_DIA_UOM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREP_ITM_MATL": {
+ "name": "ZZREP_ITM_MATL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSMID": {
+ "name": "ZZSMID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSTL": {
+ "name": "ZZSTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MATERIAL_MASTER_PART_MATL_MATNR_unique": {
+ "name": "MATERIAL_MASTER_PART_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_CHARASGN": {
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_CHARASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_CHARASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_CHARASGN",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_CLASSASGN": {
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_CLASSASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_CLASSASGN_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_CLASSASGN",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_DESC": {
+ "name": "MATERIAL_MASTER_PART_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_DESC_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_DESC_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_DESC",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_PLNT": {
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_PLNT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_PLNT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_PLNT",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_MATL_UNIT": {
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BREIT": {
+ "name": "BREIT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOEHE": {
+ "name": "HOEHE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAENG": {
+ "name": "LAENG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLUM": {
+ "name": "VOLUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MATERIAL_MASTER_PART_MATL_UNIT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk": {
+ "name": "MATERIAL_MASTER_PART_MATL_UNIT_MATNR_MATERIAL_MASTER_PART_MATL_MATNR_fk",
+ "tableFrom": "MATERIAL_MASTER_PART_MATL_UNIT",
+ "tableTo": "MATERIAL_MASTER_PART_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE": {
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_CD": {
+ "name": "MAT_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAT_ID": {
+ "name": "MAT_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_MAT_CD_unique": {
+ "name": "MATERIAL_MASTER_PART_RETURN_CMCTB_MAT_BSE_MAT_CD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MAT_CD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL": {
+ "name": "MODEL_MASTER_MATL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BISMT": {
+ "name": "BISMT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GROES": {
+ "name": "GROES",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAGRV": {
+ "name": "MAGRV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MBRSH": {
+ "name": "MBRSH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTAE": {
+ "name": "MSTAE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSTDE": {
+ "name": "MSTDE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MTART": {
+ "name": "MTART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTGEW": {
+ "name": "NTGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRDHA": {
+ "name": "PRDHA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPART": {
+ "name": "SPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VHART": {
+ "name": "VHART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPDT": {
+ "name": "ZZAPPDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPTM": {
+ "name": "ZZAPPTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZAPPUS": {
+ "name": "ZZAPPUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDESC": {
+ "name": "ZZDESC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKAR": {
+ "name": "ZZDOKAR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKNR": {
+ "name": "ZZDOKNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKTL": {
+ "name": "ZZDOKTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDOKVR": {
+ "name": "ZZDOKVR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMMTYP": {
+ "name": "ZZMMTYP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME": {
+ "name": "ZZNAME",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSPEC": {
+ "name": "ZZSPEC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "MODEL_MASTER_MATL_MATNR_unique": {
+ "name": "MODEL_MASTER_MATL_MATNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "MATNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_CHARASGN": {
+ "name": "MODEL_MASTER_MATL_CHARASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_CHARASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ATAW1": {
+ "name": "ATAW1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATAWE": {
+ "name": "ATAWE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATBEZ": {
+ "name": "ATBEZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLB": {
+ "name": "ATFLB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATFLV": {
+ "name": "ATFLV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATNAM": {
+ "name": "ATNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWRT": {
+ "name": "ATWRT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATWTB": {
+ "name": "ATWTB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_CHARASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_CHARASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_CHARASGN",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_CLASSASGN": {
+ "name": "MODEL_MASTER_MATL_CLASSASGN",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_CLASSASGN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CLASS": {
+ "name": "CLASS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KLART": {
+ "name": "KLART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_CLASSASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_CLASSASGN_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_CLASSASGN",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_DESC": {
+ "name": "MODEL_MASTER_MATL_DESC",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_DESC_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "MAKTX": {
+ "name": "MAKTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_DESC_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_DESC_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_DESC",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_PLNT": {
+ "name": "MODEL_MASTER_MATL_PLNT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_PLNT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LVORM": {
+ "name": "LVORM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTA": {
+ "name": "MMSTA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMSTD": {
+ "name": "MMSTD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMDT": {
+ "name": "ZZLAMDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMTM": {
+ "name": "ZZLAMTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAMUS": {
+ "name": "ZZLAMUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZMTARP": {
+ "name": "ZZMTARP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZPRFLG": {
+ "name": "ZZPRFLG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGDT": {
+ "name": "ZZREGDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGTM": {
+ "name": "ZZREGTM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZREGUS": {
+ "name": "ZZREGUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_PLNT_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_PLNT_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_PLNT",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.MODEL_MASTER_MATL_UNIT": {
+ "name": "MODEL_MASTER_MATL_UNIT",
+ "schema": "mdg",
+ "columns": {
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "MODEL_MASTER_MATL_UNIT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BREIT": {
+ "name": "BREIT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOEHE": {
+ "name": "HOEHE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAENG": {
+ "name": "LAENG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEABM": {
+ "name": "MEABM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINH": {
+ "name": "MEINH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREN": {
+ "name": "UMREN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UMREZ": {
+ "name": "UMREZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLEH": {
+ "name": "VOLEH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VOLUM": {
+ "name": "VOLUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "MODEL_MASTER_MATL_UNIT_MATNR_MODEL_MASTER_MATL_MATNR_fk": {
+ "name": "MODEL_MASTER_MATL_UNIT_MATNR_MODEL_MASTER_MATL_MATNR_fk",
+ "tableFrom": "MODEL_MASTER_MATL_UNIT",
+ "tableTo": "MODEL_MASTER_MATL",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "MATNR"
+ ],
+ "columnsTo": [
+ "MATNR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_CCTR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ABTEI": {
+ "name": "ABTEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ANRED": {
+ "name": "ANRED",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZER": {
+ "name": "BKZER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZKP": {
+ "name": "BKZKP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZKS": {
+ "name": "BKZKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BKZOB": {
+ "name": "BKZOB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BUKRS": {
+ "name": "BUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CCTR": {
+ "name": "CCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATAB": {
+ "name": "DATAB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATBI": {
+ "name": "DATBI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DATLT": {
+ "name": "DATLT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DRNAM": {
+ "name": "DRNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FUNC_AREA": {
+ "name": "FUNC_AREA",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GSBER": {
+ "name": "GSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KHINR": {
+ "name": "KHINR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOKRS": {
+ "name": "KOKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KOSAR": {
+ "name": "KOSAR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LAND1": {
+ "name": "LAND1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MGEFL": {
+ "name": "MGEFL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME1": {
+ "name": "NAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME2": {
+ "name": "NAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME3": {
+ "name": "NAME3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NAME4": {
+ "name": "NAME4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORT01": {
+ "name": "ORT01",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORT02": {
+ "name": "ORT02",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PFACH": {
+ "name": "PFACH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZER": {
+ "name": "PKZER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZKP": {
+ "name": "PKZKP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PKZKS": {
+ "name": "PKZKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTL2": {
+ "name": "PSTL2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSTLZ": {
+ "name": "PSTLZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGIO": {
+ "name": "REGIO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRAS": {
+ "name": "SPRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STRAS": {
+ "name": "STRAS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELBX": {
+ "name": "TELBX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELF1": {
+ "name": "TELF1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELF2": {
+ "name": "TELF2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELFX": {
+ "name": "TELFX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELTX": {
+ "name": "TELTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELX1": {
+ "name": "TELX1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXJCD": {
+ "name": "TXJCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK": {
+ "name": "VERAK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK_USE": {
+ "name": "VERAK_USE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VMETH": {
+ "name": "VMETH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS": {
+ "name": "WAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZBRANCH": {
+ "name": "ZZBRANCH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFCTRI": {
+ "name": "ZZFCTRI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSECCODE": {
+ "name": "ZZSECCODE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSEGMENT": {
+ "name": "ZZSEGMENT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "CCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT",
+ "schema": "mdg",
+ "columns": {
+ "CCTR": {
+ "name": "CCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "KTEXT": {
+ "name": "KTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTEXT": {
+ "name": "LTEXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_fk": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_ORGANIZATION_MASTER_HRHMTB_CCTR_CCTR_fk",
+ "tableFrom": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT",
+ "tableTo": "ORGANIZATION_MASTER_HRHMTB_CCTR",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "CCTR"
+ ],
+ "columnsTo": [
+ "CCTR"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_CCTR_TEXT_CCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "CCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_PCTR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ABTEI": {
+ "name": "ABTEI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATAB": {
+ "name": "DATAB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATBI": {
+ "name": "DATBI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "KHINR": {
+ "name": "KHINR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOKRS": {
+ "name": "KOKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LOCK_IND": {
+ "name": "LOCK_IND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PCTR": {
+ "name": "PCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SEGMENT": {
+ "name": "SEGMENT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXJCD": {
+ "name": "TXJCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK": {
+ "name": "VERAK",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VERAK_USE": {
+ "name": "VERAK_USE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_PCTR_PCTR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_PCTR_PCTR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "PCTR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZBUKRS": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CURR_BUKR": {
+ "name": "CURR_BUKR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBUKRS": {
+ "name": "ZBUKRS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZBUTXT": {
+ "name": "ZZBUTXT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCITY": {
+ "name": "ZZCITY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZCOUNTRY": {
+ "name": "ZZCOUNTRY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLANGU": {
+ "name": "ZZLANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_ZBUKRS_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZBUKRS_ZBUKRS_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZBUKRS"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZEKGRP": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZEKGRP": {
+ "name": "ZEKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKNAM": {
+ "name": "ZZEKNAM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKTEL": {
+ "name": "ZZEKTEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEMPNUM": {
+ "name": "ZZEMPNUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZSINGLE": {
+ "name": "ZZSINGLE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZTELFX": {
+ "name": "ZZTELFX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZTEL_NUM": {
+ "name": "ZZTEL_NUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_ZEKGRP_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKGRP_ZEKGRP_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZEKGRP"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZEKORG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZEKORG": {
+ "name": "ZEKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZEKOTX": {
+ "name": "ZZEKOTX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZEKORG_ZEKORG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZEKORG_ZEKORG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZEKORG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZGSBER": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZGSBER": {
+ "name": "ZGSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZGSBER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT",
+ "schema": "mdg",
+ "columns": {
+ "ZGSBER": {
+ "name": "ZGSBER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "LANGU": {
+ "name": "LANGU",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TXTMI": {
+ "name": "TXTMI",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_fk": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_ORGANIZATION_MASTER_HRHMTB_ZGSBER_ZGSBER_fk",
+ "tableFrom": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT",
+ "tableTo": "ORGANIZATION_MASTER_HRHMTB_ZGSBER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "ZGSBER"
+ ],
+ "columnsTo": [
+ "ZGSBER"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZGSBER_TEXT_ZGSBER_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZGSBER"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZLGORT": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZLGORT": {
+ "name": "ZLGORT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZWERKS": {
+ "name": "ZWERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLGOBE": {
+ "name": "ZZLGOBE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZLGORT_ZLGORT_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZLGORT_ZLGORT_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZLGORT"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZSPART": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZSPART": {
+ "name": "ZSPART",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZSPART_ZSPART_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZSPART_ZSPART_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZSPART"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKBUR": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CTRY_SOFF": {
+ "name": "CTRY_SOFF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_SOFF": {
+ "name": "LANG_SOFF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZVKBUR": {
+ "name": "ZVKBUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_ZVKBUR_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKBUR_ZVKBUR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKBUR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKGRP": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVKGRP": {
+ "name": "ZVKGRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_ZVKGRP_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKGRP_ZVKGRP_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKGRP"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVKORG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVKORG": {
+ "name": "ZVKORG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZBOAVO": {
+ "name": "ZZBOAVO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZKUNNR": {
+ "name": "ZZKUNNR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZVKOKL": {
+ "name": "ZZVKOKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZWAERS": {
+ "name": "ZZWAERS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVKORG_ZVKORG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVKORG_ZVKORG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVKORG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVSTEL": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ALAN_VSTE": {
+ "name": "ALAN_VSTE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AZON_VSTE": {
+ "name": "AZON_VSTE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTRY_SHPT": {
+ "name": "CTRY_SHPT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_SHPT": {
+ "name": "LANG_SHPT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZVSTEL": {
+ "name": "ZVSTEL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFABKL": {
+ "name": "ZZFABKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZLAZBS": {
+ "name": "ZZLAZBS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZRIZBS": {
+ "name": "ZZRIZBS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_ZVSTEL_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVSTEL_ZVSTEL_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVSTEL"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZVTWEG": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ZVTWEG": {
+ "name": "ZVTWEG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_ZVTWEG_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZVTWEG_ZVTWEG_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZVTWEG"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.ORGANIZATION_MASTER_HRHMTB_ZWERKS": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "CTRY_PLNT": {
+ "name": "CTRY_PLNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_PLNT": {
+ "name": "LANG_PLNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZWERKS": {
+ "name": "ZWERKS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZZDELETE": {
+ "name": "ZZDELETE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZFABKL": {
+ "name": "ZZFABKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME1": {
+ "name": "ZZNAME1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZZNAME2": {
+ "name": "ZZNAME2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ORGANIZATION_MASTER_HRHMTB_ZWERKS_ZWERKS_unique": {
+ "name": "ORGANIZATION_MASTER_HRHMTB_ZWERKS_ZWERKS_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ZWERKS"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.PROJECT_MASTER_CMCTB_PROJ_MAST": {
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AS_GRNT_PRD": {
+ "name": "AS_GRNT_PRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZLOC_CD": {
+ "name": "BIZLOC_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_DMN": {
+ "name": "BIZ_DMN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BP_DL_DT": {
+ "name": "BP_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHN_PROJ_TP": {
+ "name": "CHN_PROJ_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_CNTN_YN": {
+ "name": "CNRT_CNTN_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DL_DT": {
+ "name": "CNRT_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DT": {
+ "name": "CNRT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_RESV_YN": {
+ "name": "CNRT_RESV_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_PO_NO": {
+ "name": "CSTM_PO_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIGT_PDT_GRP": {
+ "name": "DIGT_PDT_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_BF_PROJ_NM": {
+ "name": "DL_BF_PROJ_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_CSTM_CD": {
+ "name": "DL_CSTM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_CD": {
+ "name": "DOCK_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_CHRGR": {
+ "name": "DSN_CHRGR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_GRNT_FN_DT": {
+ "name": "FIN_GRNT_FN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GENT_CNT": {
+ "name": "GENT_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOV": {
+ "name": "GOV",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRNT_STDT": {
+ "name": "GRNT_STDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IMO_NO": {
+ "name": "IMO_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_NO": {
+ "name": "INQY_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_SEQ": {
+ "name": "INQY_SEQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IO_GB": {
+ "name": "IO_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNG_ACOT_DMN": {
+ "name": "MNG_ACOT_DMN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_ENGN_TP_CD": {
+ "name": "MN_ENGN_TP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MSHIP_NO": {
+ "name": "MSHIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTTP": {
+ "name": "NTTP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_FN_DT": {
+ "name": "ORDR_GRNT_FN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_PRD": {
+ "name": "ORDR_GRNT_PRD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_1": {
+ "name": "OWN_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_AB": {
+ "name": "OWN_AB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_NM": {
+ "name": "OWN_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_LVL_4": {
+ "name": "PDT_LVL_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRGS_STAT": {
+ "name": "PRGS_STAT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_DT": {
+ "name": "PROJ_CRTE_REQ_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_EMPNO": {
+ "name": "PROJ_CRTE_REQ_EMPNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_PLN_DT": {
+ "name": "PROJ_DL_PLN_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_RT_DT": {
+ "name": "PROJ_DL_RT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DSC": {
+ "name": "PROJ_DSC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DTL_TP": {
+ "name": "PROJ_DTL_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_ETC_TP": {
+ "name": "PROJ_ETC_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_GB": {
+ "name": "PROJ_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PROJ_PRGS_YN": {
+ "name": "PROJ_PRGS_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PROF": {
+ "name": "PROJ_PROF",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_SCP": {
+ "name": "PROJ_SCP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_WBS_TP": {
+ "name": "PROJ_WBS_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRO_PROJ_NO": {
+ "name": "PRO_PROJ_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REF_NO": {
+ "name": "REF_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RLTD_PROJ": {
+ "name": "RLTD_PROJ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RL_DL_DT": {
+ "name": "RL_DL_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SA_DT": {
+ "name": "SA_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_NO": {
+ "name": "SERS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_YN": {
+ "name": "SERS_YN",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE": {
+ "name": "SHTYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_GRP": {
+ "name": "SHTYPE_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND": {
+ "name": "SKND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRC_SYS_ID": {
+ "name": "SRC_SYS_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STDT": {
+ "name": "STDT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_ACOT_CLSD_DT": {
+ "name": "SYS_ACOT_CLSD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_CNRT_CNT": {
+ "name": "TOT_CNRT_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WP_PROJ_TP": {
+ "name": "WP_PROJ_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "PROJECT_MASTER_CMCTB_PROJ_MAST_PROJ_NO_unique": {
+ "name": "PROJECT_MASTER_CMCTB_PROJ_MAST_PROJ_NO_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "PROJ_NO"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER": {
+ "name": "VENDOR_MASTER_BP_HEADER",
+ "schema": "mdg",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "VENDOR_MASTER_BP_HEADER_VNDRCD_unique": {
+ "name": "VENDOR_MASTER_BP_HEADER_VNDRCD_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "VNDRCD"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADDRNO": {
+ "name": "ADDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_EMAIL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_FAX",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_TMZ": {
+ "name": "ADR_TMZ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAX_JRDT_ZONE_CD": {
+ "name": "TAX_JRDT_ZONE_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_POSTAL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_TEL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_ADDRESS_AD_URL",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_TAXNUM": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_TAXNUM",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP_TP": {
+ "name": "ACNT_GRP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZR_NO": {
+ "name": "BIZR_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_CD": {
+ "name": "BIZ_UOM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_NM": {
+ "name": "BIZ_UOM_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_REG_NO": {
+ "name": "CO_REG_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_VLM": {
+ "name": "CO_VLM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_HOLD_ORDR": {
+ "name": "DEL_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_CD": {
+ "name": "DMST_TOP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_NM": {
+ "name": "DMST_TOP_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DNS_NO": {
+ "name": "DNS_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_TP": {
+ "name": "DOC_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_VER": {
+ "name": "DOC_VER",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIR_NM": {
+ "name": "FIR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_CD": {
+ "name": "GBL_TOP_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_NM": {
+ "name": "GBL_TOP_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GIRO_VNDR_ORDR": {
+ "name": "GIRO_VNDR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INB_FLAG": {
+ "name": "INB_FLAG",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_LCTN_CHK_NUM": {
+ "name": "INTL_LCTN_CHK_NUM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS_CD": {
+ "name": "OVLAP_CAUS_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNT_VNDRCD": {
+ "name": "PTNT_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTN_DOC": {
+ "name": "PTN_DOC",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_EMAIL": {
+ "name": "QLT_CHRGR_EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_NM": {
+ "name": "QLT_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_TELNO": {
+ "name": "QLT_CHRGR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_TM": {
+ "name": "REG_TM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_RESNO": {
+ "name": "REPR_RESNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TEL_NO": {
+ "name": "REP_TEL_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SB_WKA_SEQ": {
+ "name": "SB_WKA_SEQ",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCETX_RP_SEX_KEY": {
+ "name": "SRCETX_RP_SEX_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_CD_4": {
+ "name": "TX_CD_4",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VAT_REG_NO": {
+ "name": "VAT_REG_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNO": {
+ "name": "VNDRNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ACOT_CHRGR_FAXNO": {
+ "name": "ACOT_CHRGR_FAXNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_TELNO": {
+ "name": "ACOT_CHRGR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUTH_GRP": {
+ "name": "AUTH_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BF_VNDRCD": {
+ "name": "BF_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CSTM_VNDR_CLR_ORDR": {
+ "name": "CSTM_VNDR_CLR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTL_ACNT": {
+ "name": "CTL_ACNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_ACT_DT": {
+ "name": "FIN_IR_ACT_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_CALC_DT": {
+ "name": "FIN_IR_CALC_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IATA_BIC_GB": {
+ "name": "IATA_BIC_GB",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOGST_VNDR_TP": {
+ "name": "LOGST_VNDR_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEMO": {
+ "name": "MEMO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MIN_ORDR": {
+ "name": "MIN_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_CHRGR_EMAIL": {
+ "name": "MK_CHRGR_EMAIL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MOFFC_ACNT_NO": {
+ "name": "MOFFC_ACNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_INVC_ORDR": {
+ "name": "OVLAP_INVC_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLN_GRP": {
+ "name": "PLN_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TP": {
+ "name": "REP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_HOLD_ORDR": {
+ "name": "SPLY_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_MTHD": {
+ "name": "SPLY_MTHD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRT_SPLY_ORDR": {
+ "name": "SPRT_SPLY_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_CD": {
+ "name": "SRCE_TX_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NTN_CD": {
+ "name": "SRCE_TX_NTN_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_BANK_SHRT_KEY": {
+ "name": "TRD_BANK_SHRT_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_ACNT_NO": {
+ "name": "VNDR_ACNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CHRGR_NM": {
+ "name": "VNDR_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "DCHAG_CAUS": {
+ "name": "DCHAG_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CERT_NO": {
+ "name": "DCHAG_CERT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ED_DT": {
+ "name": "DCHAG_ED_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ST_DT": {
+ "name": "DCHAG_ST_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RECIP_TP": {
+ "name": "RECIP_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_IDENT_NO": {
+ "name": "SRCE_TX_IDENT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NO": {
+ "name": "SRCE_TX_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_REL_ORDR": {
+ "name": "SRCE_TX_REL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_TP": {
+ "name": "SRCE_TX_TP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_COMPNY_BP_WHTAX",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "AT_PUR_ORD_ORDR": {
+ "name": "AT_PUR_ORD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CALC_SHM_GRP": {
+ "name": "CALC_SHM_GRP",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNFM_CTL_KEY": {
+ "name": "CNFM_CTL_KEY",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GR_BSE_INVC_VR": {
+ "name": "GR_BSE_INVC_VR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORD_CNFM_REQ_ORDR": {
+ "name": "ORD_CNFM_REQ_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_CAUS": {
+ "name": "PUR_HOLD_CAUS",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_ORD_CUR": {
+ "name": "PUR_ORD_CUR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_CHRGR_NM": {
+ "name": "SALE_CHRGR_NM",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TELNO": {
+ "name": "VNDR_TELNO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mdg.VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN",
+ "schema": "mdg",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_id_seq",
+ "schema": "mdg",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_REF_VNDRCD": {
+ "name": "ETC_REF_VNDRCD",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_NO": {
+ "name": "PLNT_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDR_SUB_NO": {
+ "name": "VNDR_SUB_NO",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk": {
+ "name": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN_VNDRCD_VENDOR_MASTER_BP_HEADER_VNDRCD_fk",
+ "tableFrom": "VENDOR_MASTER_BP_HEADER_BP_VENGEN_BP_PORG_ZVPFN",
+ "tableTo": "VENDOR_MASTER_BP_HEADER",
+ "schemaTo": "mdg",
+ "columnsFrom": [
+ "VNDRCD"
+ ],
+ "columnsTo": [
+ "VNDRCD"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "soap.soap_logs": {
+ "name": "soap_logs",
+ "schema": "soap",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "direction": {
+ "name": "direction",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "system": {
+ "name": "system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interface": {
+ "name": "interface",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endedAt": {
+ "name": "endedAt",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isSuccess": {
+ "name": "isSuccess",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "requestData": {
+ "name": "requestData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responseData": {
+ "name": "responseData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd": {
+ "name": "cmctb_cd",
+ "schema": "nonsap",
+ "columns": {
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD": {
+ "name": "CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD2": {
+ "name": "CD2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD3": {
+ "name": "CD3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "USR_DF_CHAR_1": {
+ "name": "USR_DF_CHAR_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_2": {
+ "name": "USR_DF_CHAR_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_3": {
+ "name": "USR_DF_CHAR_3",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_4": {
+ "name": "USR_DF_CHAR_4",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_5": {
+ "name": "USR_DF_CHAR_5",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_6": {
+ "name": "USR_DF_CHAR_6",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_7": {
+ "name": "USR_DF_CHAR_7",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_8": {
+ "name": "USR_DF_CHAR_8",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_9": {
+ "name": "USR_DF_CHAR_9",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_10": {
+ "name": "USR_DF_CHAR_10",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_11": {
+ "name": "USR_DF_CHAR_11",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_12": {
+ "name": "USR_DF_CHAR_12",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_13": {
+ "name": "USR_DF_CHAR_13",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_14": {
+ "name": "USR_DF_CHAR_14",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_15": {
+ "name": "USR_DF_CHAR_15",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_16": {
+ "name": "USR_DF_CHAR_16",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_17": {
+ "name": "USR_DF_CHAR_17",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_18": {
+ "name": "USR_DF_CHAR_18",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_19": {
+ "name": "USR_DF_CHAR_19",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR_20": {
+ "name": "USR_DF_CHAR_20",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_1": {
+ "name": "USR_DF_CHK_1",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_2": {
+ "name": "USR_DF_CHK_2",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_3": {
+ "name": "USR_DF_CHK_3",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_4": {
+ "name": "USR_DF_CHK_4",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_5": {
+ "name": "USR_DF_CHK_5",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_6": {
+ "name": "USR_DF_CHK_6",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_7": {
+ "name": "USR_DF_CHK_7",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHK_8": {
+ "name": "USR_DF_CHK_8",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_1": {
+ "name": "USR_DF_DT_1",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_2": {
+ "name": "USR_DF_DT_2",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_3": {
+ "name": "USR_DF_DT_3",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_DT_4": {
+ "name": "USR_DF_DT_4",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_1": {
+ "name": "USR_DF_TM_1",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_2": {
+ "name": "USR_DF_TM_2",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_3": {
+ "name": "USR_DF_TM_3",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_TM_4": {
+ "name": "USR_DF_TM_4",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd_clf": {
+ "name": "cmctb_cd_clf",
+ "schema": "nonsap",
+ "columns": {
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cd_clf_nm": {
+ "name": "cmctb_cd_clf_nm",
+ "schema": "nonsap",
+ "columns": {
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF_NM": {
+ "name": "CD_CLF_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRP_DSC": {
+ "name": "GRP_DSC",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_cdnm": {
+ "name": "cmctb_cdnm",
+ "schema": "nonsap",
+ "columns": {
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD_CLF": {
+ "name": "CD_CLF",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD": {
+ "name": "CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD2": {
+ "name": "CD2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CD3": {
+ "name": "CD3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CDNM": {
+ "name": "CDNM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRP_DSC": {
+ "name": "GRP_DSC",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER": {
+ "name": "CRTER",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR": {
+ "name": "CHGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_addr": {
+ "name": "cmctb_customer_addr",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOUSE_NR1": {
+ "name": "HOUSE_NR1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_cfpn": {
+ "name": "cmctb_customer_cfpn",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_compny": {
+ "name": "cmctb_customer_compny",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AR_ACNT_HDL_GB": {
+ "name": "AR_ACNT_HDL_GB",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AMT_RNE_GB": {
+ "name": "AMT_RNE_GB",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_PAY_FRM": {
+ "name": "VNDR_PAY_FRM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BILL_PAY_COND_CD": {
+ "name": "BILL_PAY_COND_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BILL_PAY_BLOC_CD": {
+ "name": "BILL_PAY_BLOC_CD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_general": {
+ "name": "cmctb_customer_general",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS": {
+ "name": "OVLAP_CAUS",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_TP": {
+ "name": "CSTM_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_BLOCK": {
+ "name": "DEL_BLOCK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "COND_GRP_1": {
+ "name": "COND_GRP_1",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_GRP_NM": {
+ "name": "CSTM_GRP_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_2": {
+ "name": "TX_NO_2",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_3": {
+ "name": "TX_NO_3",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_4": {
+ "name": "TX_NO_4",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_REG_NO": {
+ "name": "TX_REG_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BA_CD": {
+ "name": "BA_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCH_COND_1": {
+ "name": "SRCH_COND_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCH_COND_2": {
+ "name": "SRCH_COND_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CITY_DISP_NM": {
+ "name": "CITY_DISP_NM",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRM_CD": {
+ "name": "CRM_CD",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IN_FLAG": {
+ "name": "IN_FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDST_CD": {
+ "name": "INDST_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_NO_TP": {
+ "name": "TX_NO_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DTM": {
+ "name": "REG_DTM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTGT_CD": {
+ "name": "FTGT_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTGT_NM": {
+ "name": "FTGT_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTDT_CD": {
+ "name": "FTDT_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTDT_NM": {
+ "name": "FTDT_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTBU_CD": {
+ "name": "FTBU_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FTBU_NM": {
+ "name": "FTBU_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_repremail": {
+ "name": "cmctb_customer_repremail",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprfax": {
+ "name": "cmctb_customer_reprfax",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprtel": {
+ "name": "cmctb_customer_reprtel",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_reprurl": {
+ "name": "cmctb_customer_reprurl",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_sorg": {
+ "name": "cmctb_customer_sorg",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SALE_REGN": {
+ "name": "SALE_REGN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_OFC": {
+ "name": "SALE_OFC",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_GRP": {
+ "name": "CSTM_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSBL": {
+ "name": "PSBL",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_CUR": {
+ "name": "TRD_CUR",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXRAT_TP": {
+ "name": "EXRAT_TP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRC_PRCS_DSC_CD": {
+ "name": "PRC_PRCS_DSC_CD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_STAT_GRP": {
+ "name": "CSTM_STAT_GRP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHIPMT_COND": {
+ "name": "SHIPMT_COND",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAX_TRD_QTY": {
+ "name": "MAX_TRD_QTY",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(84)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_ASGN_GRP": {
+ "name": "ACNT_ASGN_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_taxcd": {
+ "name": "cmctb_customer_taxcd",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DPRT_NTN": {
+ "name": "DPRT_NTN",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_CTG": {
+ "name": "TX_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CSTM_TX_CLF": {
+ "name": "CSTM_TX_CLF",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_customer_taxnum": {
+ "name": "cmctb_customer_taxnum",
+ "schema": "nonsap",
+ "columns": {
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_bse": {
+ "name": "cmctb_mat_bse",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SM_CD": {
+ "name": "SM_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_ID": {
+ "name": "MAT_ID",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_TP": {
+ "name": "MAT_TP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_GB": {
+ "name": "MAT_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_DTL": {
+ "name": "MAT_DTL",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_DTL_SPEC": {
+ "name": "MAT_DTL_SPEC",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATL": {
+ "name": "MATL",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OLD_MAT_NO": {
+ "name": "OLD_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SBST_MAT_NO": {
+ "name": "SBST_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UOM": {
+ "name": "UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_GRP": {
+ "name": "PDT_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MRC": {
+ "name": "MRC",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STOR_MAT_ORDR": {
+ "name": "STOR_MAT_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STYPE": {
+ "name": "STYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS": {
+ "name": "CLS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGT": {
+ "name": "WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NET_WGT": {
+ "name": "NET_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGT_UOM": {
+ "name": "WGT_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH": {
+ "name": "LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH_2": {
+ "name": "LTH_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH": {
+ "name": "WTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH_2": {
+ "name": "WTH_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "THK": {
+ "name": "THK",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STD": {
+ "name": "STD",
+ "type": "varchar(70)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROF_STD": {
+ "name": "PROF_STD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CBL_OUT_DIA": {
+ "name": "CBL_OUT_DIA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTRM_MAT_YN": {
+ "name": "LTRM_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNT_AREA": {
+ "name": "PNT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTIN_AREA": {
+ "name": "PNTIN_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTIN_SPEC": {
+ "name": "PNTIN_SPEC",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_AREA": {
+ "name": "PNTOUT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_1": {
+ "name": "PNTOUT_SPEC_1",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_2": {
+ "name": "PNTOUT_SPEC_2",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_3": {
+ "name": "PNTOUT_SPEC_3",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RT_INSPEC": {
+ "name": "RT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UT_INSPEC": {
+ "name": "UT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MT_INSPEC": {
+ "name": "MT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PT_INSPEC": {
+ "name": "PT_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_DWG_NO": {
+ "name": "MK_DWG_NO",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CUT_DWG_NO": {
+ "name": "CUT_DWG_NO",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_SPL_NO": {
+ "name": "PIPE_SPL_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_LINE_NO": {
+ "name": "PIPE_LINE_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_CLAS": {
+ "name": "PIPE_CLAS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FLUID_KND": {
+ "name": "FLUID_KND",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_ITM_MATL": {
+ "name": "REP_ITM_MATL",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA": {
+ "name": "REP_DIA",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA_UOM": {
+ "name": "REP_DIA_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_SCH": {
+ "name": "REP_SCH",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_DIA_LTH": {
+ "name": "REP_DIA_LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DBLN_GB": {
+ "name": "DBLN_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PIPE_GRD": {
+ "name": "PIPE_GRD",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HTRET_YN": {
+ "name": "HTRET_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BA_GALV_SPEC": {
+ "name": "BA_GALV_SPEC",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SSIDE_YN": {
+ "name": "SSIDE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTR_PIPE_YN": {
+ "name": "PNTR_PIPE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UBOLT_YN": {
+ "name": "UBOLT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CTLP_PRCD_PNT": {
+ "name": "CTLP_PRCD_PNT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCD_SCV_CTLP": {
+ "name": "PRCD_SCV_CTLP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PMI_INSPEC": {
+ "name": "PMI_INSPEC",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTRPRS": {
+ "name": "WTRPRS",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLV_FIT_NO": {
+ "name": "VLV_FIT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_NO": {
+ "name": "TAG_NO",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_SB_NO": {
+ "name": "TAG_SB_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NM_PLATE_TP": {
+ "name": "NM_PLATE_TP",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NM_PLATE_SVC_NM": {
+ "name": "NM_PLATE_SVC_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VRCS_MAT_NO": {
+ "name": "VRCS_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRSM_FIT_NO": {
+ "name": "TRSM_FIT_NO",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VLV_OPT_CD_LIST": {
+ "name": "VLV_OPT_CD_LIST",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_REQ_NO": {
+ "name": "PUR_REQ_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ITM_NO": {
+ "name": "ITM_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MDL_NO": {
+ "name": "MDL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BL_NO": {
+ "name": "BL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_EQP_NO": {
+ "name": "VNDR_EQP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BOX_NO": {
+ "name": "BOX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MMT_NO": {
+ "name": "MMT_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INSTL_LOC": {
+ "name": "INSTL_LOC",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_EQP_YN": {
+ "name": "MN_EQP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIXED_MAT_YN": {
+ "name": "FIXED_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRE_YN": {
+ "name": "SPRE_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOOL_YN": {
+ "name": "TOOL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CBL_YN": {
+ "name": "CBL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_INSTL_MAT_YN": {
+ "name": "OWN_INSTL_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NONINSTL_MAT_YN": {
+ "name": "NONINSTL_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BLK_NO": {
+ "name": "BLK_NO",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GYEL": {
+ "name": "GYEL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LNK_PTLST_NO": {
+ "name": "LNK_PTLST_NO",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AREA": {
+ "name": "AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STOR_LOC": {
+ "name": "STOR_LOC",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SGUB_WGT": {
+ "name": "SGUB_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DGUB_WGT": {
+ "name": "DGUB_WGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_SKL": {
+ "name": "DSN_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RMK": {
+ "name": "RMK",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_DT": {
+ "name": "DEL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_STAT": {
+ "name": "MAT_STAT",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_SYS_NO": {
+ "name": "IF_SYS_NO",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_1": {
+ "name": "GLAND_SPEC_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_2": {
+ "name": "GLAND_SPEC_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GLAND_SPEC_3": {
+ "name": "GLAND_SPEC_3",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MCT_MDLE_STD_1": {
+ "name": "MCT_MDLE_STD_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MCT_MDLE_STD_2": {
+ "name": "MCT_MDLE_STD_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BEELE_RISE": {
+ "name": "BEELE_RISE",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAX_DRUM_LTH": {
+ "name": "MAX_DRUM_LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DTM": {
+ "name": "AGR_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISPLN": {
+ "name": "DISPLN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LRG_KWK": {
+ "name": "LRG_KWK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DTL_KWK": {
+ "name": "DTL_KWK",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SP_INSP_GB": {
+ "name": "SP_INSP_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PNTOUT_SPEC_4": {
+ "name": "PNTOUT_SPEC_4",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFE_MAT_NO": {
+ "name": "OFE_MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFE_CAB_YN": {
+ "name": "OFE_CAB_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INSTL_PSB_CNT": {
+ "name": "INSTL_PSB_CNT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CUTL_ML_GB": {
+ "name": "CUTL_ML_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FCM_INSP": {
+ "name": "FCM_INSP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_DT": {
+ "name": "HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_LIFT_DT": {
+ "name": "HOLD_LIFT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_KND_GB": {
+ "name": "MAT_KND_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BATCH_MNG_ORDR": {
+ "name": "BATCH_MNG_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INPR_ID": {
+ "name": "FS_INPR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INP_DTM": {
+ "name": "FS_INP_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHGR_ID": {
+ "name": "FIN_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHG_DTM": {
+ "name": "FIN_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DWG_FILE_NM": {
+ "name": "DWG_FILE_NM",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAG_NO_CHG_DT": {
+ "name": "TAG_NO_CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SUB_EQP_YN": {
+ "name": "SUB_EQP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ATT_MAT_YN": {
+ "name": "ATT_MAT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_REV_NO": {
+ "name": "DSN_REV_NO",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR1": {
+ "name": "USR_DF_CHAR1",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR2": {
+ "name": "USR_DF_CHAR2",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR3": {
+ "name": "USR_DF_CHAR3",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR4": {
+ "name": "USR_DF_CHAR4",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "USR_DF_CHAR5": {
+ "name": "USR_DF_CHAR5",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_clas": {
+ "name": "cmctb_mat_clas",
+ "schema": "nonsap",
+ "columns": {
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CLAS_NM": {
+ "name": "CLAS_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_DTL": {
+ "name": "CLAS_DTL",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRNT_CLAS_CD": {
+ "name": "PRNT_CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLAS_LVL": {
+ "name": "CLAS_LVL",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UOM": {
+ "name": "UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STYPE": {
+ "name": "STYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRD_MATL": {
+ "name": "GRD_MATL",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSE_UOM": {
+ "name": "BSE_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_clas_spchar": {
+ "name": "cmctb_mat_clas_spchar",
+ "schema": "nonsap",
+ "columns": {
+ "CLAS_CD": {
+ "name": "CLAS_CD",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_SEQ": {
+ "name": "SPCHAR_SEQ",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNDT_YN": {
+ "name": "MNDT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_clas_spchar_CLAS_CD_SPCHAR_CD_pk": {
+ "name": "cmctb_mat_clas_spchar_CLAS_CD_SPCHAR_CD_pk",
+ "columns": [
+ "CLAS_CD",
+ "SPCHAR_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_dsc": {
+ "name": "cmctb_mat_dsc",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MAT_DTL": {
+ "name": "MAT_DTL",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_plnt": {
+ "name": "cmctb_mat_plnt",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PLNT": {
+ "name": "PLNT",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "DELV_UOM": {
+ "name": "DELV_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EA_BTCH_ND_GB": {
+ "name": "EA_BTCH_ND_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_CLF": {
+ "name": "PRCR_CLF",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_CHRGR_CD": {
+ "name": "PUR_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_CHRGR_CD": {
+ "name": "PRCR_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOODS_CHRGR_CD": {
+ "name": "GOODS_CHRGR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_LT": {
+ "name": "PUR_LT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MRP_TP": {
+ "name": "MRP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MAT_STAT": {
+ "name": "MAT_STAT",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BULK_MAT_ORDR": {
+ "name": "BULK_MAT_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCR_TP": {
+ "name": "PRCR_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SFTY_STCK_QTY": {
+ "name": "SFTY_STCK_QTY",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SER_PROF": {
+ "name": "SER_PROF",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BATCH_MNG_ORDR": {
+ "name": "BATCH_MNG_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SP_PRCR_TP": {
+ "name": "SP_PRCR_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar": {
+ "name": "cmctb_mat_spchar",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_DTL": {
+ "name": "SPCHAR_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_CD": {
+ "name": "SPCHAR_VAL_CD",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_DTL": {
+ "name": "SPCHAR_VAL_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_NUM": {
+ "name": "SPCHAR_VAL_NUM",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_UOM": {
+ "name": "SPCHAR_VAL_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar_mast": {
+ "name": "cmctb_mat_spchar_mast",
+ "schema": "nonsap",
+ "columns": {
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_DTL": {
+ "name": "SPCHAR_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_TP": {
+ "name": "SPCHAR_TP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_UOM": {
+ "name": "SPCHAR_VAL_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_VAL_YN": {
+ "name": "SPCHAR_VAL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPCHAR_GRP": {
+ "name": "SPCHAR_GRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_spchar_mast_SPCHAR_CD_pk": {
+ "name": "cmctb_mat_spchar_mast_SPCHAR_CD_pk",
+ "columns": [
+ "SPCHAR_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_spchar_val": {
+ "name": "cmctb_mat_spchar_val",
+ "schema": "nonsap",
+ "columns": {
+ "SPCHAR_CD": {
+ "name": "SPCHAR_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_VAL_CD": {
+ "name": "SPCHAR_VAL_CD",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SPCHAR_VAL_DTL": {
+ "name": "SPCHAR_VAL_DTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_mat_spchar_val_SPCHAR_CD_SPCHAR_VAL_CD_pk": {
+ "name": "cmctb_mat_spchar_val_SPCHAR_CD_SPCHAR_VAL_CD_pk",
+ "columns": [
+ "SPCHAR_CD",
+ "SPCHAR_VAL_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_mat_uom": {
+ "name": "cmctb_mat_uom",
+ "schema": "nonsap",
+ "columns": {
+ "MAT_NO": {
+ "name": "MAT_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SBST_UOM": {
+ "name": "SBST_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CNVRT_FCTR_1": {
+ "name": "CNVRT_FCTR_1",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNVRT_FCTR_2": {
+ "name": "CNVRT_FCTR_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LTH": {
+ "name": "LTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WTH": {
+ "name": "WTH",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HGT": {
+ "name": "HGT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SZ_UOM": {
+ "name": "SZ_UOM",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_bizcls": {
+ "name": "cmctb_proj_bizcls",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_mast": {
+ "name": "cmctb_proj_mast",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "MSHIP_NO": {
+ "name": "MSHIP_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_NO": {
+ "name": "SERS_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REF_NO": {
+ "name": "REF_NO",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND": {
+ "name": "SKND",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE": {
+ "name": "SHTYPE",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_CD": {
+ "name": "DOCK_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_1": {
+ "name": "OWN_1",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DT": {
+ "name": "CNRT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_DL_DT": {
+ "name": "CNRT_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DSC": {
+ "name": "PROJ_DSC",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_GB": {
+ "name": "PROJ_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_NM": {
+ "name": "OWN_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_SKND2": {
+ "name": "NEW_SKND2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWN_AB": {
+ "name": "OWN_AB",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHINA_YN": {
+ "name": "CHINA_YN",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DTL_TP": {
+ "name": "PROJ_DTL_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PROF": {
+ "name": "PROJ_PROF",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_NO": {
+ "name": "INQY_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INQY_SEQ": {
+ "name": "INQY_SEQ",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTTP": {
+ "name": "NTTP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RLTD_PROJ": {
+ "name": "RLTD_PROJ",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIGT_PDT_GRP": {
+ "name": "DIGT_PDT_GRP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WP_PROJ_TP": {
+ "name": "WP_PROJ_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_CNRT_CNT": {
+ "name": "TOT_CNRT_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_ETC_TP": {
+ "name": "PROJ_ETC_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRC_SYS_ID": {
+ "name": "SRC_SYS_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRGS_STAT": {
+ "name": "PRGS_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_YN": {
+ "name": "DEL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_CSTM_CD": {
+ "name": "DL_CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PDT_LVL_4": {
+ "name": "PDT_LVL_4",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AS_GRNT_PRD": {
+ "name": "AS_GRNT_PRD",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RL_DL_DT": {
+ "name": "RL_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SA_DT": {
+ "name": "SA_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GOV": {
+ "name": "GOV",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_BF_PROJ_NM": {
+ "name": "DL_BF_PROJ_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IMO_NO": {
+ "name": "IMO_NO",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DIST_PATH": {
+ "name": "DIST_PATH",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_ORG_CD": {
+ "name": "SALE_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_GRP": {
+ "name": "SALE_GRP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZLOC_CD": {
+ "name": "BIZLOC_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MNG_ACOT_DMN": {
+ "name": "MNG_ACOT_DMN",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_DMN": {
+ "name": "BIZ_DMN",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRCTR": {
+ "name": "PRCTR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_CNTN_YN": {
+ "name": "CNRT_CNTN_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_RESV_YN": {
+ "name": "CNRT_RESV_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_PRGS_YN": {
+ "name": "PROJ_PRGS_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_ACOT_CLSD_DT": {
+ "name": "SYS_ACOT_CLSD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_SCP": {
+ "name": "PROJ_SCP",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOA": {
+ "name": "LOA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MN_ENGN_TP_CD": {
+ "name": "MN_ENGN_TP_CD",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPD": {
+ "name": "SPD",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GT": {
+ "name": "GT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BP_DL_DT": {
+ "name": "BP_DL_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_GRP": {
+ "name": "SHTYPE_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_EMPNO": {
+ "name": "PROJ_CRTE_REQ_EMPNO",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_CRTE_REQ_DT": {
+ "name": "PROJ_CRTE_REQ_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IO_GB": {
+ "name": "IO_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_PO_NO": {
+ "name": "CSTM_PO_NO",
+ "type": "varchar(35)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GENT_CNT": {
+ "name": "GENT_CNT",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_PRD": {
+ "name": "ORDR_GRNT_PRD",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORDR_GRNT_FN_DT": {
+ "name": "ORDR_GRNT_FN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSN_CHRGR": {
+ "name": "DSN_CHRGR",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_PROJ_NM": {
+ "name": "DL_AF_PROJ_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_RL_CLNT": {
+ "name": "DL_AF_RL_CLNT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_SHPSRV_SCP": {
+ "name": "DL_AF_SHPSRV_SCP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_NTTP": {
+ "name": "DL_AF_NTTP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_CLS": {
+ "name": "DL_AF_CLS",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_CALL_SIGN": {
+ "name": "DL_AF_CALL_SIGN",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_TEL_NO": {
+ "name": "DL_AF_TEL_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_FAX_NO": {
+ "name": "DL_AF_FAX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_AF_EMAIL_ADR": {
+ "name": "DL_AF_EMAIL_ADR",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_WBS_TP": {
+ "name": "PROJ_WBS_TP",
+ "type": "varchar(7)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHN_PROJ_TP": {
+ "name": "CHN_PROJ_TP",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_GRNT_FN_DT": {
+ "name": "FIN_GRNT_FN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "STDT": {
+ "name": "STDT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_YN": {
+ "name": "SERS_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TYPE": {
+ "name": "TYPE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRO_PROJ_NO": {
+ "name": "PRO_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PBSD_PROJ_NO": {
+ "name": "PBSD_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PBSD_SHIP_NM": {
+ "name": "PBSD_SHIP_NM",
+ "type": "varchar(150)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCLS": {
+ "name": "BIZCLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_PLN_DT": {
+ "name": "PROJ_DL_PLN_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PROJ_DL_RT_DT": {
+ "name": "PROJ_DL_RT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TOT_AREA": {
+ "name": "TOT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXMPT_AREA": {
+ "name": "EXMPT_AREA",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXMPT_RAT": {
+ "name": "EXMPT_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QM_CLS": {
+ "name": "QM_CLS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNCT_PROJ_NO": {
+ "name": "CNCT_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EQP_DTL_YN": {
+ "name": "EQP_DTL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EXP_YN": {
+ "name": "EXP_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACT_MH_YN": {
+ "name": "ACT_MH_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPEC": {
+ "name": "SPEC",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DSGN_LIFE": {
+ "name": "DSGN_LIFE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NEW_MC_YN": {
+ "name": "NEW_MC_YN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WK_ENV_WT_VAL_YN": {
+ "name": "WK_ENV_WT_VAL_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GRNT_STDT": {
+ "name": "GRNT_STDT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TMH_ADPT_YN": {
+ "name": "TMH_ADPT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZV_YN": {
+ "name": "ZV_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SEC_YN": {
+ "name": "SEC_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_proj_wbs": {
+ "name": "cmctb_proj_wbs",
+ "schema": "nonsap",
+ "columns": {
+ "PROJ_NO": {
+ "name": "PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "WBS_ELMT": {
+ "name": "WBS_ELMT",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "WBS_ELMT_NM": {
+ "name": "WBS_ELMT_NM",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_LVL": {
+ "name": "WBS_LVL",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FLAG": {
+ "name": "FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_INSD_ELMT": {
+ "name": "WBS_INSD_ELMT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HGRK_WBS_ELMT": {
+ "name": "HGRK_WBS_ELMT",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XSTAT": {
+ "name": "XSTAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XMSGS": {
+ "name": "XMSGS",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XDATS": {
+ "name": "XDATS",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "XTIMS": {
+ "name": "XTIMS",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SYS_STAT": {
+ "name": "SYS_STAT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_1": {
+ "name": "WBS_ELMT_1",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_2": {
+ "name": "WBS_ELMT_2",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_3": {
+ "name": "WBS_ELMT_3",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_4": {
+ "name": "WBS_ELMT_4",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_5": {
+ "name": "WBS_ELMT_5",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_6": {
+ "name": "WBS_ELMT_6",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_7": {
+ "name": "WBS_ELMT_7",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_8": {
+ "name": "WBS_ELMT_8",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_9": {
+ "name": "WBS_ELMT_9",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WBS_ELMT_10": {
+ "name": "WBS_ELMT_10",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_addr": {
+ "name": "cmctb_vendor_addr",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_ADR_VER_ID": {
+ "name": "INTL_ADR_VER_ID",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CITY_ZIP_NO": {
+ "name": "CITY_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX_ZIP_NO": {
+ "name": "POBX_ZIP_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGN_CD": {
+ "name": "REGN_CD",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LANG_KEY": {
+ "name": "LANG_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_1": {
+ "name": "ETC_ADR_1",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETC_ADR_2": {
+ "name": "ETC_ADR_2",
+ "type": "varchar(180)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRANS_ZONE": {
+ "name": "TRANS_ZONE",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TAX_JRDT_ZONE_CD": {
+ "name": "TAX_JRDT_ZONE_CD",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_TMZ": {
+ "name": "ADR_TMZ",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_compny": {
+ "name": "cmctb_vendor_compny",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CTL_ACNT": {
+ "name": "CTL_ACNT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRT_KEY": {
+ "name": "SRT_KEY",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PLN_GRP": {
+ "name": "PLN_GRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BF_VNDRCD": {
+ "name": "BF_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_INVC_ORDR": {
+ "name": "OVLAP_INVC_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_MTHD": {
+ "name": "SPLY_MTHD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_HOLD_ORDR": {
+ "name": "SPLY_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TRD_BANK_SHRT_KEY": {
+ "name": "TRD_BANK_SHRT_KEY",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NTN_CD": {
+ "name": "SRCE_TX_NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MIN_ORDR": {
+ "name": "MIN_ORDR",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPRT_SPLY_ORDR": {
+ "name": "SPRT_SPLY_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_VNDR_CLR_ORDR": {
+ "name": "CSTM_VNDR_CLR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_CD": {
+ "name": "SRCE_TX_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IATA_BIC_GB": {
+ "name": "IATA_BIC_GB",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TP": {
+ "name": "REP_TP",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LOGST_VNDR_TP": {
+ "name": "LOGST_VNDR_TP",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_ACNT_NO": {
+ "name": "VNDR_ACNT_NO",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CHRGR_NM": {
+ "name": "VNDR_CHRGR_NM",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_TELNO": {
+ "name": "ACOT_CHRGR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AUTH_GRP": {
+ "name": "AUTH_GRP",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_CALC_DT": {
+ "name": "FIN_IR_CALC_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_IR_ACT_DT": {
+ "name": "FIN_IR_ACT_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACOT_CHRGR_FAXNO": {
+ "name": "ACOT_CHRGR_FAXNO",
+ "type": "varchar(31)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MK_CHRGR_EMAIL": {
+ "name": "MK_CHRGR_EMAIL",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEMO": {
+ "name": "MEMO",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MOFFC_ACNT_NO": {
+ "name": "MOFFC_ACNT_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "cmctb_vendor_compny_VNDRCD_CO_CD_pk": {
+ "name": "cmctb_vendor_compny_VNDRCD_CO_CD_pk",
+ "columns": [
+ "VNDRCD",
+ "CO_CD"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_general": {
+ "name": "cmctb_vendor_general",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ACNT_GRP": {
+ "name": "ACNT_GRP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ACNT_GRP_TP": {
+ "name": "ACNT_GRP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CSTM_CD": {
+ "name": "CSTM_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PST_HOLD_ORDR": {
+ "name": "PST_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HOLD_CAUS": {
+ "name": "HOLD_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_ID": {
+ "name": "CO_ID",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZTP": {
+ "name": "BIZTP",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZCON": {
+ "name": "BIZCON",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DT": {
+ "name": "REG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REG_DTM": {
+ "name": "REG_DTM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REGR_ID": {
+ "name": "REGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_DT": {
+ "name": "AGR_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_TM": {
+ "name": "AGR_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AGR_R_ID": {
+ "name": "AGR_R_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_TEL_NO": {
+ "name": "REP_TEL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_FAX_NO": {
+ "name": "REP_FAX_NO",
+ "type": "varchar(31)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZR_NO": {
+ "name": "BIZR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_REG_NO": {
+ "name": "CO_REG_NO",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TX_CD_4": {
+ "name": "TX_CD_4",
+ "type": "varchar(54)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_INST_DT": {
+ "name": "CO_INST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TP": {
+ "name": "VNDR_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_CD": {
+ "name": "GBL_TOP_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GBL_TOP_NM": {
+ "name": "GBL_TOP_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_CD": {
+ "name": "DMST_TOP_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DMST_TOP_NM": {
+ "name": "DMST_TOP_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_CD": {
+ "name": "BIZ_UOM_CD",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_UOM_NM": {
+ "name": "BIZ_UOM_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DNS_NO": {
+ "name": "DNS_NO",
+ "type": "varchar(11)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TTL": {
+ "name": "TTL",
+ "type": "varchar(45)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VAT_REG_NO": {
+ "name": "VAT_REG_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GIRO_VNDR_ORDR": {
+ "name": "GIRO_VNDR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_1": {
+ "name": "VNDRNM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_2": {
+ "name": "VNDRNM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_3": {
+ "name": "VNDRNM_3",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_4": {
+ "name": "VNDRNM_4",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_1": {
+ "name": "VNDRNM_ABRV_1",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDRNM_ABRV_2": {
+ "name": "VNDRNM_ABRV_2",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTNT_VNDRCD": {
+ "name": "PTNT_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_1": {
+ "name": "ADR_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR_2": {
+ "name": "ADR_2",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_NM": {
+ "name": "QLT_CHRGR_NM",
+ "type": "varchar(60)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_TELNO": {
+ "name": "QLT_CHRGR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "QLT_CHRGR_EMAIL": {
+ "name": "QLT_CHRGR_EMAIL",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SB_WKA_SEQ": {
+ "name": "SB_WKA_SEQ",
+ "type": "varchar(16)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OVLAP_CAUS_CD": {
+ "name": "OVLAP_CAUS_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_TP": {
+ "name": "DOC_TP",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_NO": {
+ "name": "DOC_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PTN_DOC": {
+ "name": "PTN_DOC",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOC_VER": {
+ "name": "DOC_VER",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INB_FLAG": {
+ "name": "INB_FLAG",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_HOLD_ORDR": {
+ "name": "DEL_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POBX": {
+ "name": "POBX",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INTL_LCTN_CHK_NUM": {
+ "name": "INTL_LCTN_CHK_NUM",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCETX_RP_SEX_KEY": {
+ "name": "SRCETX_RP_SEX_KEY",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CNRT_CHRGR_1": {
+ "name": "VNDR_CNRT_CHRGR_1",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_CNRT_CHRGR_2": {
+ "name": "VNDR_CNRT_CHRGR_2",
+ "type": "varchar(105)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_RESNO": {
+ "name": "REPR_RESNO",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CO_VLM": {
+ "name": "CO_VLM",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_grp": {
+ "name": "cmctb_vendor_grp",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_GRP_CD": {
+ "name": "BIZ_GRP_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTER_ID": {
+ "name": "CRTER_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHGR_ID": {
+ "name": "CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_inco": {
+ "name": "cmctb_vendor_inco",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDRNM": {
+ "name": "VNDRNM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_NM": {
+ "name": "REPR_NM",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PRTNR_GB": {
+ "name": "PRTNR_GB",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_CD": {
+ "name": "INCO_PRTNR_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_1": {
+ "name": "INCO_PRTNR_WKA_1",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_2": {
+ "name": "INCO_PRTNR_WKA_2",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_WKA_3": {
+ "name": "INCO_PRTNR_WKA_3",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JBTYPE_CD": {
+ "name": "JBTYPE_CD",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "JBTYPE_CD_2": {
+ "name": "JBTYPE_CD_2",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDV_CO_GB": {
+ "name": "INDV_CO_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_FOND_YN": {
+ "name": "INCO_FOND_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DOCK_NO": {
+ "name": "DOCK_NO",
+ "type": "varchar(25)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OCMP_INP_DT": {
+ "name": "OCMP_INP_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_DUSE_DT": {
+ "name": "INCO_DUSE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INDST_INS_PMRAT": {
+ "name": "INDST_INS_PMRAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNRT_PFRM_GRAMT": {
+ "name": "CNRT_PFRM_GRAMT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGE_RAT": {
+ "name": "WGE_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_DEPTCD_1": {
+ "name": "CRSPD_DEPTCD_1",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_DEPTCD_2": {
+ "name": "CRSPD_DEPTCD_2",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRSPD_TEAM_BLNG": {
+ "name": "CRSPD_TEAM_BLNG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_ITM_1": {
+ "name": "INCO_PRTNR_ITM_1",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_PRTNR_ITM_2": {
+ "name": "INCO_PRTNR_ITM_2",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OFC_LOC": {
+ "name": "OFC_LOC",
+ "type": "varchar(240)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REP_OCMP_CARR": {
+ "name": "REP_OCMP_CARR",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "INCO_DUSE_CAUS": {
+ "name": "INCO_DUSE_CAUS",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TEL_NO": {
+ "name": "TEL_NO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR1": {
+ "name": "ADR1",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ADR2": {
+ "name": "ADR2",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OLD_VNDRCD": {
+ "name": "OLD_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TREE_NUM": {
+ "name": "TREE_NUM",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_DT": {
+ "name": "CRTE_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_TM": {
+ "name": "CRTE_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CRTE_USR_ID": {
+ "name": "CRTE_USR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_DT": {
+ "name": "CHG_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_TM": {
+ "name": "CHG_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHG_USR_ID": {
+ "name": "CHG_USR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "UPR_JBTYPE": {
+ "name": "UPR_JBTYPE",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBYBP": {
+ "name": "ZBYBP",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RMK": {
+ "name": "RMK",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WDL_PLN_YN": {
+ "name": "WDL_PLN_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WGE_DELY_DVL": {
+ "name": "WGE_DELY_DVL",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESCROW_YN": {
+ "name": "ESCROW_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_porg": {
+ "name": "cmctb_vendor_porg",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORD_CUR": {
+ "name": "PUR_ORD_CUR",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SPLY_COND": {
+ "name": "SPLY_COND",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_1": {
+ "name": "DL_COND_1",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DL_COND_2": {
+ "name": "DL_COND_2",
+ "type": "varchar(90)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CALC_SHM_GRP": {
+ "name": "CALC_SHM_GRP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GR_BSE_INVC_VR": {
+ "name": "GR_BSE_INVC_VR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "AT_PUR_ORD_ORDR": {
+ "name": "AT_PUR_ORD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_ORDR": {
+ "name": "PUR_HOLD_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DEL_ORDR": {
+ "name": "DEL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ORD_CNFM_REQ_ORDR": {
+ "name": "ORD_CNFM_REQ_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SALE_CHRGR_NM": {
+ "name": "SALE_CHRGR_NM",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VNDR_TELNO": {
+ "name": "VNDR_TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CNFM_CTL_KEY": {
+ "name": "CNFM_CTL_KEY",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_DT": {
+ "name": "PUR_HOLD_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PUR_HOLD_CAUS": {
+ "name": "PUR_HOLD_CAUS",
+ "type": "varchar(120)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_repremail": {
+ "name": "cmctb_vendor_repremail",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EMAIL_ADR": {
+ "name": "EMAIL_ADR",
+ "type": "varchar(241)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprfax": {
+ "name": "cmctb_vendor_reprfax",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAXNO": {
+ "name": "FAXNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FAX_ETS_NO": {
+ "name": "FAX_ETS_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprtel": {
+ "name": "cmctb_vendor_reprtel",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "NTN_CD": {
+ "name": "NTN_CD",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TELNO": {
+ "name": "TELNO",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ETX_NO": {
+ "name": "ETX_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "HP_ORDR": {
+ "name": "HP_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_reprurl": {
+ "name": "cmctb_vendor_reprurl",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ADR_NO": {
+ "name": "ADR_NO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REPR_SER": {
+ "name": "REPR_SER",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VLD_ST_DT": {
+ "name": "VLD_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "URL": {
+ "name": "URL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_taxnum": {
+ "name": "cmctb_vendor_taxnum",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "TX_NO_CTG": {
+ "name": "TX_NO_CTG",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BIZ_PTNR_TX_NO": {
+ "name": "BIZ_PTNR_TX_NO",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_vfpn": {
+ "name": "cmctb_vendor_vfpn",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PUR_ORG_CD": {
+ "name": "PUR_ORG_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "VNDR_SUB_NO": {
+ "name": "VNDR_SUB_NO",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PLNT_CD": {
+ "name": "PLNT_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_SKL": {
+ "name": "PTNR_SKL",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "PTNR_CNT": {
+ "name": "PTNR_CNT",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ETC_REF_VNDRCD": {
+ "name": "ETC_REF_VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BSE_PTNR_ORDR": {
+ "name": "BSE_PTNR_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.cmctb_vendor_whthx": {
+ "name": "cmctb_vendor_whthx",
+ "schema": "nonsap",
+ "columns": {
+ "VNDRCD": {
+ "name": "VNDRCD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "CO_CD": {
+ "name": "CO_CD",
+ "type": "varchar(4)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SRCE_TX_TP": {
+ "name": "SRCE_TX_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "SRCE_TX_REL_ORDR": {
+ "name": "SRCE_TX_REL_ORDR",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "RECIP_TP": {
+ "name": "RECIP_TP",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_IDENT_NO": {
+ "name": "SRCE_TX_IDENT_NO",
+ "type": "varchar(16)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SRCE_TX_NO": {
+ "name": "SRCE_TX_NO",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CERT_NO": {
+ "name": "DCHAG_CERT_NO",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_RAT": {
+ "name": "DCHAG_RAT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ST_DT": {
+ "name": "DCHAG_ST_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_ED_DT": {
+ "name": "DCHAG_ED_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DCHAG_CAUS": {
+ "name": "DCHAG_CAUS",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_DT": {
+ "name": "IF_DT",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TM": {
+ "name": "IF_TM",
+ "type": "varchar(6)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_STAT": {
+ "name": "IF_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_MSG": {
+ "name": "IF_MSG",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "nonsap.plftb_estm_proj_mast": {
+ "name": "plftb_estm_proj_mast",
+ "schema": "nonsap",
+ "columns": {
+ "ESTM_PROJ_NO": {
+ "name": "ESTM_PROJ_NO",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AGND_NO": {
+ "name": "AGND_NO",
+ "type": "varchar(8)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_PROJ_NM": {
+ "name": "ESTM_PROJ_NM",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BIZ_CLS": {
+ "name": "BIZ_CLS",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "REV_NO": {
+ "name": "REV_NO",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_TYPE": {
+ "name": "ESTM_TYPE",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "OWNER_CD": {
+ "name": "OWNER_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SERS_CNT": {
+ "name": "SERS_CNT",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SKND_CD": {
+ "name": "SKND_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_CD": {
+ "name": "SHTYPE_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_SIZE": {
+ "name": "SHTYPE_SIZE",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SHTYPE_UOM": {
+ "name": "SHTYPE_UOM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CHRTR_CD": {
+ "name": "CHRTR_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "NATN_CD": {
+ "name": "NATN_CD",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_1": {
+ "name": "CLS_1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_2": {
+ "name": "CLS_2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "CLS_3": {
+ "name": "CLS_3",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DATA_CRTE_GB": {
+ "name": "DATA_CRTE_GB",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INPR_ID": {
+ "name": "FS_INPR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FS_INP_DTM": {
+ "name": "FS_INP_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHGR_ID": {
+ "name": "FIN_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "FIN_CHG_DTM": {
+ "name": "FIN_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_1": {
+ "name": "VSL_VAG_1",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_2": {
+ "name": "VSL_VAG_2",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_3": {
+ "name": "VSL_VAG_3",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "VSL_VAG_4": {
+ "name": "VSL_VAG_4",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_APP_ID": {
+ "name": "ESTM_AOM_APP_ID",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT": {
+ "name": "ESTM_AOM_STAT",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT_CHGR_ID": {
+ "name": "ESTM_AOM_STAT_CHGR_ID",
+ "type": "varchar(13)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ESTM_AOM_STAT_CHG_DTM": {
+ "name": "ESTM_AOM_STAT_CHG_DTM",
+ "type": "varchar(14)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "IF_TRGT_YN": {
+ "name": "IF_TRGT_YN",
+ "type": "varchar(1)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "plftb_estm_proj_mast_ESTM_PROJ_NO_pk": {
+ "name": "plftb_estm_proj_mast_ESTM_PROJ_NO_pk",
+ "columns": [
+ "ESTM_PROJ_NO"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "ecc.PR_INFORMATION_T_BID_HEADER": {
+ "name": "PR_INFORMATION_T_BID_HEADER",
+ "schema": "ecc",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PR_INFORMATION_T_BID_HEADER_id_seq",
+ "schema": "ecc",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANFNR": {
+ "name": "ANFNR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "EKGRP": {
+ "name": "EKGRP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EKORG": {
+ "name": "EKORG",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WERKS": {
+ "name": "WERKS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZBSART": {
+ "name": "ZBSART",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ZRFQ_TRS_DT": {
+ "name": "ZRFQ_TRS_DT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZRFQ_TRS_TM": {
+ "name": "ZRFQ_TRS_TM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "PR_INFORMATION_T_BID_HEADER_ANFNR_unique": {
+ "name": "PR_INFORMATION_T_BID_HEADER_ANFNR_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "ANFNR"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "ecc.PR_INFORMATION_T_BID_ITEM": {
+ "name": "PR_INFORMATION_T_BID_ITEM",
+ "schema": "ecc",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "byDefault",
+ "name": "PR_INFORMATION_T_BID_ITEM_id_seq",
+ "schema": "ecc",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "ANFNR": {
+ "name": "ANFNR",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ANFPS": {
+ "name": "ANFPS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "AUFNR": {
+ "name": "AUFNR",
+ "type": "varchar(12)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BANFN": {
+ "name": "BANFN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BANPO": {
+ "name": "BANPO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "BPRME": {
+ "name": "BPRME",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "BRGEW": {
+ "name": "BRGEW",
+ "type": "numeric(15, 3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "DISMM": {
+ "name": "DISMM",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "EBELP": {
+ "name": "EBELP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "GEWEI": {
+ "name": "GEWEI",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KNTTP": {
+ "name": "KNTTP",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "KOSTL": {
+ "name": "KOSTL",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "LFDAT": {
+ "name": "LFDAT",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATKL": {
+ "name": "MATKL",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MATNR": {
+ "name": "MATNR",
+ "type": "varchar(18)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MEINS": {
+ "name": "MEINS",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "MENGE": {
+ "name": "MENGE",
+ "type": "numeric(15, 3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PEINH": {
+ "name": "PEINH",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PERNR": {
+ "name": "PERNR",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "POSID": {
+ "name": "POSID",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PREIS": {
+ "name": "PREIS",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "PSPID": {
+ "name": "PSPID",
+ "type": "varchar(24)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "SAKTO": {
+ "name": "SAKTO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "TXZ01": {
+ "name": "TXZ01",
+ "type": "varchar(40)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS1": {
+ "name": "WAERS1",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "WAERS2": {
+ "name": "WAERS2",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZCON_NO_PO": {
+ "name": "ZCON_NO_PO",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZREQ_FN": {
+ "name": "ZREQ_FN",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZREQ_PO": {
+ "name": "ZREQ_PO",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ZRSLT_AMT": {
+ "name": "ZRSLT_AMT",
+ "type": "numeric(17, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.employee": {
+ "name": "employee",
+ "schema": "knox",
+ "columns": {
+ "ep_id": {
+ "name": "ep_id",
+ "type": "varchar(25)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "employee_number": {
+ "name": "employee_number",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "given_name": {
+ "name": "given_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sir_name": {
+ "name": "sir_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_code": {
+ "name": "title_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_name": {
+ "name": "title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email_address": {
+ "name": "email_address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "employee_status": {
+ "name": "employee_status",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "employee_type": {
+ "name": "employee_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "account_status": {
+ "name": "account_status",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security_level": {
+ "name": "security_level",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_language": {
+ "name": "preferred_language",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "en_company_name": {
+ "name": "en_company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_department_name": {
+ "name": "en_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_discription": {
+ "name": "en_discription",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_full_name": {
+ "name": "en_full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_given_name": {
+ "name": "en_given_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_grade_name": {
+ "name": "en_grade_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_sir_name": {
+ "name": "en_sir_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_title_name": {
+ "name": "en_title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_name": {
+ "name": "grade_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_title_indi_code": {
+ "name": "grade_title_indi_code",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "job_name": {
+ "name": "job_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "real_name_yn": {
+ "name": "real_name_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "server_location": {
+ "name": "server_location",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title_sort_order": {
+ "name": "title_sort_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "knox_employee_company_department_idx": {
+ "name": "knox_employee_company_department_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "department_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_number_idx": {
+ "name": "knox_employee_number_idx",
+ "columns": [
+ {
+ "expression": "employee_number",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_user_id_idx": {
+ "name": "knox_employee_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "knox_employee_email_idx": {
+ "name": "knox_employee_email_idx",
+ "columns": [
+ {
+ "expression": "email_address",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.organization": {
+ "name": "organization",
+ "schema": "knox",
+ "columns": {
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_level": {
+ "name": "department_level",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_name": {
+ "name": "department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "department_order": {
+ "name": "department_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_company_name": {
+ "name": "en_company_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_department_name": {
+ "name": "en_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_manager_title": {
+ "name": "en_manager_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_sub_org_code": {
+ "name": "en_sub_org_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "in_department_code": {
+ "name": "in_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "low_department_yn": {
+ "name": "low_department_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_id": {
+ "name": "manager_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_title": {
+ "name": "manager_title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "preferred_language": {
+ "name": "preferred_language",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_org_code": {
+ "name": "sub_org_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub_org_name": {
+ "name": "sub_org_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upr_department_code": {
+ "name": "upr_department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_upr_department_name": {
+ "name": "en_upr_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "upr_department_name": {
+ "name": "upr_department_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_department_yn": {
+ "name": "hidden_department_yn",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corp_code": {
+ "name": "corp_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corp_name": {
+ "name": "corp_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_corp_name": {
+ "name": "en_corp_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "knox_org_company_idx": {
+ "name": "knox_org_company_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "organization_company_code_department_code_pk": {
+ "name": "organization_company_code_department_code_pk",
+ "columns": [
+ "company_code",
+ "department_code"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.title": {
+ "name": "title",
+ "schema": "knox",
+ "columns": {
+ "company_code": {
+ "name": "company_code",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title_code": {
+ "name": "title_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title_name": {
+ "name": "title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "en_title_name": {
+ "name": "en_title_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "raw": {
+ "name": "raw",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "knox_title_company_idx": {
+ "name": "knox_title_company_idx",
+ "columns": [
+ {
+ "expression": "company_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "title_company_code_title_code_pk": {
+ "name": "title_company_code_title_code_pk",
+ "columns": [
+ "company_code",
+ "title_code"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_lines": {
+ "name": "approval_lines",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "aplns": {
+ "name": "aplns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_lines_createdBy_users_id_fk": {
+ "name": "approval_lines_createdBy_users_id_fk",
+ "tableFrom": "approval_lines",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_logs": {
+ "name": "approval_logs",
+ "schema": "knox",
+ "columns": {
+ "ap_inf_id": {
+ "name": "ap_inf_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ep_id": {
+ "name": "ep_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_address": {
+ "name": "email_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "aplns": {
+ "name": "aplns",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_template_history": {
+ "name": "approval_template_history",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "templateId": {
+ "name": "templateId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "changeDescription": {
+ "name": "changeDescription",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changedBy": {
+ "name": "changedBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_template_history_templateId_approval_templates_id_fk": {
+ "name": "approval_template_history_templateId_approval_templates_id_fk",
+ "tableFrom": "approval_template_history",
+ "tableTo": "approval_templates",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "templateId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "approval_template_history_changedBy_users_id_fk": {
+ "name": "approval_template_history_changedBy_users_id_fk",
+ "tableFrom": "approval_template_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "changedBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_template_variables": {
+ "name": "approval_template_variables",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "approvalTemplateId": {
+ "name": "approvalTemplateId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variableName": {
+ "name": "variableName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "variableType": {
+ "name": "variableType",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "defaultValue": {
+ "name": "defaultValue",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_template_variables_approvalTemplateId_approval_templates_id_fk": {
+ "name": "approval_template_variables_approvalTemplateId_approval_templates_id_fk",
+ "tableFrom": "approval_template_variables",
+ "tableTo": "approval_templates",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "approvalTemplateId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "approval_template_variables_createdBy_users_id_fk": {
+ "name": "approval_template_variables_createdBy_users_id_fk",
+ "tableFrom": "approval_template_variables",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "knox.approval_templates": {
+ "name": "approval_templates",
+ "schema": "knox",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approvalLineId": {
+ "name": "approvalLineId",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdBy": {
+ "name": "createdBy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "approval_templates_approvalLineId_approval_lines_id_fk": {
+ "name": "approval_templates_approvalLineId_approval_lines_id_fk",
+ "tableFrom": "approval_templates",
+ "tableTo": "approval_lines",
+ "schemaTo": "knox",
+ "columnsFrom": [
+ "approvalLineId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "approval_templates_createdBy_users_id_fk": {
+ "name": "approval_templates_createdBy_users_id_fk",
+ "tableFrom": "approval_templates",
+ "tableTo": "users",
+ "columnsFrom": [
+ "createdBy"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "risks.risk_events": {
+ "name": "risk_events",
+ "schema": "risks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "event_type": {
+ "name": "event_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "event_status": {
+ "name": "event_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "manager_id": {
+ "name": "manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occurred_at": {
+ "name": "occurred_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "risk_events_vendor_id_vendors_id_fk": {
+ "name": "risk_events_vendor_id_vendors_id_fk",
+ "tableFrom": "risk_events",
+ "tableTo": "vendors",
+ "columnsFrom": [
+ "vendor_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "risk_events_manager_id_users_id_fk": {
+ "name": "risk_events_manager_id_users_id_fk",
+ "tableFrom": "risk_events",
+ "tableTo": "users",
+ "columnsFrom": [
+ "manager_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "risk_events_created_by_users_id_fk": {
+ "name": "risk_events_created_by_users_id_fk",
+ "tableFrom": "risk_events",
+ "tableTo": "users",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "risk_events_updated_by_users_id_fk": {
+ "name": "risk_events_updated_by_users_id_fk",
+ "tableFrom": "risk_events",
+ "tableTo": "users",
+ "columnsFrom": [
+ "updated_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.user_domain": {
+ "name": "user_domain",
+ "schema": "public",
+ "values": [
+ "pending",
+ "evcp",
+ "procurement",
+ "sales",
+ "engineering",
+ "partners"
+ ]
+ },
+ "public.score_type": {
+ "name": "score_type",
+ "schema": "public",
+ "values": [
+ "fixed",
+ "variable"
+ ]
+ },
+ "public.qna_category": {
+ "name": "qna_category",
+ "schema": "public",
+ "values": [
+ "engineering",
+ "procurement",
+ "technical_sales"
+ ]
+ },
+ "public.gtc_type": {
+ "name": "gtc_type",
+ "schema": "public",
+ "values": [
+ "standard",
+ "project"
+ ]
+ },
+ "public.review_status": {
+ "name": "review_status",
+ "schema": "public",
+ "values": [
+ "draft",
+ "pending",
+ "reviewing",
+ "approved",
+ "rejected",
+ "revised"
+ ]
+ },
+ "public.consent_action": {
+ "name": "consent_action",
+ "schema": "public",
+ "values": [
+ "consent",
+ "revoke",
+ "update"
+ ]
+ },
+ "public.consent_type": {
+ "name": "consent_type",
+ "schema": "public",
+ "values": [
+ "privacy_policy",
+ "terms_of_service",
+ "marketing",
+ "optional"
+ ]
+ },
+ "public.policy_type": {
+ "name": "policy_type",
+ "schema": "public",
+ "values": [
+ "privacy_policy",
+ "terms_of_service"
+ ]
+ },
+ "public.award_count": {
+ "name": "award_count",
+ "schema": "public",
+ "values": [
+ "single",
+ "multiple"
+ ]
+ },
+ "public.bidding_status": {
+ "name": "bidding_status",
+ "schema": "public",
+ "values": [
+ "bidding_generated",
+ "request_for_quotation",
+ "received_quotation",
+ "set_target_price",
+ "bidding_opened",
+ "bidding_closed",
+ "evaluation_of_bidding",
+ "bidding_disposal",
+ "vendor_selected"
+ ]
+ },
+ "public.bidding_type": {
+ "name": "bidding_type",
+ "schema": "public",
+ "values": [
+ "equipment",
+ "construction",
+ "service",
+ "lease",
+ "steel_stock",
+ "piping",
+ "transport",
+ "waste",
+ "sale"
+ ]
+ },
+ "public.contract_type": {
+ "name": "contract_type",
+ "schema": "public",
+ "values": [
+ "unit_price",
+ "general",
+ "sale"
+ ]
+ },
+ "public.document_type": {
+ "name": "document_type",
+ "schema": "public",
+ "values": [
+ "notice",
+ "specification",
+ "specification_meeting",
+ "contract_draft",
+ "company_proposal",
+ "financial_doc",
+ "technical_doc",
+ "certificate",
+ "pr_document",
+ "spec_document",
+ "evaluation_doc",
+ "bid_attachment",
+ "other"
+ ]
+ },
+ "public.invitation_status": {
+ "name": "invitation_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "sent",
+ "accepted",
+ "declined",
+ "submitted"
+ ]
+ },
+ "public.quantity_unit": {
+ "name": "quantity_unit",
+ "schema": "public",
+ "values": [
+ "ea",
+ "set",
+ "kg",
+ "ton",
+ "m",
+ "m2",
+ "m3",
+ "lot",
+ "other"
+ ]
+ },
+ "public.weight_unit": {
+ "name": "weight_unit",
+ "schema": "public",
+ "values": [
+ "kg",
+ "ton",
+ "lb",
+ "g"
+ ]
+ }
+ },
+ "schemas": {
+ "mdg": "mdg",
+ "soap": "soap",
+ "nonsap": "nonsap",
+ "ecc": "ecc",
+ "knox": "knox",
+ "risks": "risks"
+ },
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {
+ "public.contracts_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "contracts_detail_view_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_name": {
+ "name": "contract_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "end_date": {
+ "name": "end_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payment_terms": {
+ "name": "payment_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "partial_shipping_allowed": {
+ "name": "partial_shipping_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "partial_payment_allowed": {
+ "name": "partial_payment_allowed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"contracts\".\"id\", \"contracts\".\"contract_no\", \"contracts\".\"contract_name\", \"contracts\".\"status\", \"contracts\".\"start_date\", \"contracts\".\"end_date\", \"contracts\".\"project_id\", \"projects\".\"code\", \"projects\".\"name\", \"contracts\".\"vendor_id\", \"vendors\".\"vendor_name\", \"contracts\".\"payment_terms\", \"contracts\".\"delivery_terms\", \"contracts\".\"delivery_date\", \"contracts\".\"delivery_location\", \"contracts\".\"currency\", \"contracts\".\"total_amount\", \"contracts\".\"discount\", \"contracts\".\"tax\", \"contracts\".\"shipping_fee\", \"contracts\".\"net_total\", \"contracts\".\"partial_shipping_allowed\", \"contracts\".\"partial_payment_allowed\", \"contracts\".\"remarks\", \"contracts\".\"version\", \"contracts\".\"created_at\", \"contracts\".\"updated_at\", EXISTS (\n SELECT 1 \n FROM \"contract_envelopes\" \n WHERE \"contract_envelopes\".\"contract_id\" = \"contracts\".\"id\"\n ) as \"has_signature\", COALESCE((\n SELECT json_agg(\n json_build_object(\n 'id', ci.id,\n 'itemId', ci.item_id,\n 'description', ci.description,\n 'quantity', ci.quantity,\n 'unitPrice', ci.unit_price,\n 'taxRate', ci.tax_rate,\n 'taxAmount', ci.tax_amount,\n 'totalLineAmount', ci.total_line_amount,\n 'remark', ci.remark,\n 'createdAt', ci.created_at,\n 'updatedAt', ci.updated_at\n )\n )\n FROM \"contract_items\" AS ci\n WHERE ci.contract_id = \"contracts\".\"id\"\n ), '[]') as \"items\", COALESCE((\n SELECT json_agg(\n json_build_object(\n 'id', ce.id,\n 'envelopeId', ce.envelope_id,\n 'documentId', ce.document_id,\n 'envelopeStatus', ce.envelope_status,\n 'fileName', ce.file_name,\n 'filePath', ce.file_path,\n 'createdAt', ce.created_at,\n 'updatedAt', ce.updated_at,\n 'signers', (\n SELECT json_agg(\n json_build_object(\n 'id', cs.id,\n 'vendorContactId', cs.vendor_contact_id,\n 'signerType', cs.signer_type,\n 'signerEmail', cs.signer_email,\n 'signerName', cs.signer_name,\n 'signerPosition', cs.signer_position,\n 'signerStatus', cs.signer_status,\n 'signedAt', cs.signed_at\n )\n )\n FROM \"contract_signers\" AS cs\n WHERE cs.envelope_id = ce.id\n )\n )\n )\n FROM \"contract_envelopes\" AS ce\n WHERE ce.contract_id = \"contracts\".\"id\"\n ), '[]') as \"envelopes\" from \"contracts\" left join \"projects\" on \"contracts\".\"project_id\" = \"projects\".\"id\" left join \"vendors\" on \"contracts\".\"vendor_id\" = \"vendors\".\"id\"",
+ "name": "contracts_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.poa_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "poa_detail_view_id_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "contract_no": {
+ "name": "contract_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "change_reason": {
+ "name": "change_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approval_status": {
+ "name": "approval_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'PENDING'"
+ },
+ "delivery_terms": {
+ "name": "delivery_terms",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_location": {
+ "name": "delivery_location",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discount": {
+ "name": "discount",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax": {
+ "name": "tax",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shipping_fee": {
+ "name": "shipping_fee",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_total": {
+ "name": "net_total",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"poa\".\"id\", \"poa\".\"contract_no\", \"contracts\".\"project_id\", \"contracts\".\"vendor_id\", \"poa\".\"change_reason\", \"poa\".\"approval_status\", \"contracts\".\"contract_name\" as \"original_contract_name\", \"contracts\".\"status\" as \"original_status\", \"contracts\".\"start_date\" as \"original_start_date\", \"contracts\".\"end_date\" as \"original_end_date\", \"poa\".\"delivery_terms\", \"poa\".\"delivery_date\", \"poa\".\"delivery_location\", \"poa\".\"currency\", \"poa\".\"total_amount\", \"poa\".\"discount\", \"poa\".\"tax\", \"poa\".\"shipping_fee\", \"poa\".\"net_total\", \"poa\".\"created_at\", \"poa\".\"updated_at\", EXISTS (\n SELECT 1 \n FROM \"contract_envelopes\" \n WHERE \"contract_envelopes\".\"contract_id\" = \"poa\".\"id\"\n ) as \"has_signature\" from \"poa\" left join \"contracts\" on \"poa\".\"contract_no\" = \"contracts\".\"contract_no\"",
+ "name": "poa_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.project_approved_vendors": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "name_ko": {
+ "name": "name_ko",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name_en": {
+ "name": "name_en",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ship'"
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "approved_at": {
+ "name": "approved_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendors\".\"id\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendors\".\"tax_id\", \"vendors\".\"email\", \"vendors\".\"phone\", \"vendors\".\"status\", \"vendor_types\".\"name_ko\", \"vendor_types\".\"name_en\", \"projects\".\"code\", \"projects\".\"name\", \"projects\".\"type\", \"vendor_pq_submissions\".\"submitted_at\", \"vendor_pq_submissions\".\"approved_at\" from \"vendors\" inner join \"vendor_pq_submissions\" on \"vendor_pq_submissions\".\"vendor_id\" = \"vendors\".\"id\" inner join \"projects\" on \"vendor_pq_submissions\".\"project_id\" = \"projects\".\"id\" left join \"vendor_types\" on \"vendors\".\"vendor_type_id\" = \"vendor_types\".\"id\" where \"vendor_pq_submissions\".\"status\" = 'APPROVED'",
+ "name": "project_approved_vendors",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_investigations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pq_submission_id": {
+ "name": "pq_submission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requester_id": {
+ "name": "requester_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "qm_manager_id": {
+ "name": "qm_manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_status": {
+ "name": "investigation_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PLANNED'"
+ },
+ "investigation_address": {
+ "name": "investigation_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_method": {
+ "name": "investigation_method",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_start_at": {
+ "name": "scheduled_start_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduled_end_at": {
+ "name": "scheduled_end_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "forecasted_at": {
+ "name": "forecasted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_result": {
+ "name": "evaluation_result",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "investigation_notes": {
+ "name": "investigation_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pq_items": {
+ "name": "pq_items",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendor_investigations\".\"id\", \"vendor_investigations\".\"vendor_id\", \"vendor_investigations\".\"pq_submission_id\", \"vendor_investigations\".\"requester_id\", \"vendor_investigations\".\"qm_manager_id\", \"vendor_investigations\".\"investigation_status\", \"vendor_investigations\".\"investigation_address\", \"vendor_investigations\".\"investigation_method\", \"vendor_investigations\".\"scheduled_start_at\", \"vendor_investigations\".\"scheduled_end_at\", \"vendor_investigations\".\"forecasted_at\", \"vendor_investigations\".\"requested_at\", \"vendor_investigations\".\"confirmed_at\", \"vendor_investigations\".\"completed_at\", \"vendor_investigations\".\"evaluation_score\", \"vendor_investigations\".\"evaluation_result\", \"vendor_investigations\".\"investigation_notes\", \"vendor_investigations\".\"created_at\", \"vendor_investigations\".\"updated_at\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendor_pq_submissions\".\"pq_items\", requester.name as \"requesterName\", requester.email as \"requesterEmail\", qm_manager.name as \"qmManagerName\", qm_manager.email as \"qmManagerEmail\", (\n CASE \n WHEN EXISTS (\n SELECT 1 FROM vendor_investigation_attachments via \n WHERE via.investigation_id = \"vendor_investigations\".\"id\"\n ) \n THEN true \n ELSE false \n END\n ) as \"hasAttachments\" from \"vendor_investigations\" left join \"vendors\" on \"vendor_investigations\".\"vendor_id\" = \"vendors\".\"id\" left join users AS requester on \"vendor_investigations\".\"requester_id\" = requester.id left join users AS qm_manager on \"vendor_investigations\".\"qm_manager_id\" = qm_manager.id left join \"vendor_pq_submissions\" on \"vendor_investigations\".\"pq_submission_id\" = \"vendor_pq_submissions\".\"id\"",
+ "name": "vendor_investigations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.cbe_view": {
+ "columns": {},
+ "definition": "select \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"rfq_id\" as \"rfq_id\", \"cbe_evaluations\".\"vendor_id\" as \"vendor_id\", \"cbe_evaluations\".\"total_cost\" as \"total_cost\", \"cbe_evaluations\".\"currency\" as \"currency\", \"cbe_evaluations\".\"payment_terms\" as \"payment_terms\", \"cbe_evaluations\".\"incoterms\" as \"incoterms\", \"cbe_evaluations\".\"result\" as \"result\", \"cbe_evaluations\".\"notes\" as \"notes\", \"cbe_evaluations\".\"evaluated_by\" as \"evaluated_by\", \"cbe_evaluations\".\"evaluated_at\" as \"evaluated_at\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"users\".\"name\" as \"evaluator_name\", \"users\".\"email\" as \"evaluator_email\" from \"cbe_evaluations\" inner join \"rfqs\" on \"cbe_evaluations\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"cbe_evaluations\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" on \"cbe_evaluations\".\"evaluated_by\" = \"users\".\"id\"",
+ "name": "cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfqs_view": {
+ "columns": {},
+ "definition": "select \"rfqs\".\"id\" as \"rfq_id\", \"rfqs\".\"status\" as \"status\", \"rfqs\".\"created_at\" as \"created_at\", \"rfqs\".\"updated_at\" as \"updated_at\", \"rfqs\".\"created_by\" as \"created_by\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"rfqs\".\"parent_rfq_id\" as \"parent_rfq_id\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"users\".\"email\" as \"user_email\", \"users\".\"name\" as \"user_name\", (\n SELECT COUNT(*) \n FROM \"rfq_items\" \n WHERE \"rfq_items\".\"rfq_id\" = \"rfqs\".\"id\"\n ) as \"item_count\", (\n SELECT COUNT(*) \n FROM \"rfq_attachments\" \n WHERE \"rfq_attachments\".\"rfq_id\" = \"rfqs\".\"id\"\n ) as \"attachment_count\" from \"rfqs\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" on \"rfqs\".\"created_by\" = \"users\".\"id\"",
+ "name": "rfqs_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_cbe_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"id\" as \"vendor_response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"result\" as \"cbe_result\", \"cbe_evaluations\".\"notes\" as \"cbe_note\", \"cbe_evaluations\".\"updated_at\" as \"cbe_updated\", \"cbe_evaluations\".\"total_cost\" as \"total_cost\", \"cbe_evaluations\".\"currency\" as \"currency\", \"cbe_evaluations\".\"payment_terms\" as \"payment_terms\", \"cbe_evaluations\".\"incoterms\" as \"incoterms\", \"cbe_evaluations\".\"delivery_schedule\" as \"delivery_schedule\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"cbe_evaluations\" on (\"cbe_evaluations\".\"vendor_id\" = \"vendors\".\"id\" and \"cbe_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\")",
+ "name": "vendor_cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_cbe_view": {
+ "columns": {},
+ "definition": "select \"vendor_responses\".\"id\" as \"response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"vendor_id\" as \"vendor_id\", \"vendor_responses\".\"response_status\" as \"response_status\", \"vendor_responses\".\"notes\" as \"response_notes\", \"vendor_responses\".\"responded_by\" as \"responded_by\", \"vendor_responses\".\"responded_at\" as \"responded_at\", \"vendor_responses\".\"updated_at\" as \"response_updated_at\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"rfqs\".\"due_date\" as \"rfq_due_date\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"status\" as \"vendor_status\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"vendor_commercial_responses\".\"id\" as \"commercial_response_id\", \"vendor_commercial_responses\".\"response_status\" as \"commercial_response_status\", \"vendor_commercial_responses\".\"total_price\" as \"total_price\", \"vendor_commercial_responses\".\"currency\" as \"currency\", \"vendor_commercial_responses\".\"payment_terms\" as \"payment_terms\", \"vendor_commercial_responses\".\"incoterms\" as \"incoterms\", \"vendor_commercial_responses\".\"delivery_period\" as \"delivery_period\", \"vendor_commercial_responses\".\"warranty_period\" as \"warranty_period\", \"vendor_commercial_responses\".\"validity_period\" as \"validity_period\", \"vendor_commercial_responses\".\"price_breakdown\" as \"price_breakdown\", \"vendor_commercial_responses\".\"commercial_notes\" as \"commercial_notes\", \"vendor_commercial_responses\".\"created_at\" as \"commercial_created_at\", \"vendor_commercial_responses\".\"updated_at\" as \"commercial_updated_at\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"attachment_count\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"commercial_response_id\" = \"vendor_commercial_responses\".\"id\"\n ) as \"commercial_attachment_count\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n AND \"vendor_response_attachments\".\"attachment_type\" = 'TECHNICAL_SPEC'\n ) as \"technical_attachment_count\", (\n SELECT MAX(\"uploaded_at\") \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"latest_attachment_date\" from \"vendor_responses\" inner join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_commercial_responses\" on \"vendor_commercial_responses\".\"response_id\" = \"vendor_responses\".\"id\"",
+ "name": "vendor_response_cbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_responses_view": {
+ "columns": {},
+ "definition": "select \"vendor_responses\".\"id\" as \"response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"vendor_id\" as \"vendor_id\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"rfq_description\", \"rfqs\".\"due_date\" as \"rfq_due_date\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"created_at\" as \"rfq_created_at\", \"rfqs\".\"updated_at\" as \"rfq_updated_at\", \"rfqs\".\"created_by\" as \"rfq_created_by\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendor_responses\".\"response_status\" as \"response_status\", \"vendor_responses\".\"responded_at\" as \"responded_at\", CASE WHEN \"vendor_technical_responses\".\"id\" IS NOT NULL THEN TRUE ELSE FALSE END as \"has_technical_response\", \"vendor_technical_responses\".\"id\" as \"technical_response_id\", CASE WHEN \"vendor_commercial_responses\".\"id\" IS NOT NULL THEN TRUE ELSE FALSE END as \"has_commercial_response\", \"vendor_commercial_responses\".\"id\" as \"commercial_response_id\", \"vendor_commercial_responses\".\"total_price\" as \"total_price\", \"vendor_commercial_responses\".\"currency\" as \"currency\", \"rfq_evaluations\".\"id\" as \"tbe_id\", \"rfq_evaluations\".\"result\" as \"tbe_result\", \"cbe_evaluations\".\"id\" as \"cbe_id\", \"cbe_evaluations\".\"result\" as \"cbe_result\", (\n SELECT COUNT(*) \n FROM \"vendor_response_attachments\" \n WHERE \"vendor_response_attachments\".\"response_id\" = \"vendor_responses\".\"id\"\n ) as \"attachment_count\" from \"vendor_responses\" inner join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" inner join \"vendors\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_technical_responses\" on \"vendor_technical_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"vendor_commercial_responses\" on \"vendor_commercial_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"rfq_evaluations\" on (\"rfq_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\" and \"rfq_evaluations\".\"vendor_id\" = \"vendor_responses\".\"vendor_id\" and \"rfq_evaluations\".\"eval_type\" = 'TBE') left join \"cbe_evaluations\" on (\"cbe_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\" and \"cbe_evaluations\".\"vendor_id\" = \"vendor_responses\".\"vendor_id\")",
+ "name": "vendor_responses_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_rfq_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\"",
+ "name": "vendor_rfq_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_tbe_view": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"email\" as \"email\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"vendor_status\", \"vendor_responses\".\"id\" as \"vendor_response_id\", \"vendor_responses\".\"rfq_id\" as \"rfq_id\", \"vendor_responses\".\"response_status\" as \"rfq_vendor_status\", \"vendor_responses\".\"updated_at\" as \"rfq_vendor_updated\", \"vendor_technical_responses\".\"id\" as \"technical_response_id\", \"vendor_technical_responses\".\"response_status\" as \"technical_response_status\", \"vendor_technical_responses\".\"summary\" as \"technical_summary\", \"vendor_technical_responses\".\"notes\" as \"technical_notes\", \"vendor_technical_responses\".\"updated_at\" as \"technical_updated\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"rfqs\".\"rfq_type\" as \"rfq_type\", \"rfqs\".\"status\" as \"rfq_status\", \"rfqs\".\"description\" as \"description\", \"rfqs\".\"due_date\" as \"due_date\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"rfq_evaluations\".\"id\" as \"tbe_id\", \"rfq_evaluations\".\"result\" as \"tbe_result\", \"rfq_evaluations\".\"notes\" as \"tbe_note\", \"rfq_evaluations\".\"updated_at\" as \"tbe_updated\" from \"vendors\" left join \"vendor_responses\" on \"vendor_responses\".\"vendor_id\" = \"vendors\".\"id\" left join \"rfqs\" on \"vendor_responses\".\"rfq_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendor_technical_responses\" on \"vendor_technical_responses\".\"response_id\" = \"vendor_responses\".\"id\" left join \"rfq_evaluations\" on (\"rfq_evaluations\".\"vendor_id\" = \"vendors\".\"id\" and \"rfq_evaluations\".\"eval_type\" = 'TBE' and \"rfq_evaluations\".\"rfq_id\" = \"vendor_responses\".\"rfq_id\")",
+ "name": "vendor_tbe_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.role_view": {
+ "columns": {},
+ "definition": "select \"roles\".\"id\" as \"id\", \"roles\".\"name\" as \"name\", \"roles\".\"description\" as \"description\", \"roles\".\"domain\" as \"domain\", \"roles\".\"created_at\" as \"created_at\", \"vendors\".\"id\" as \"company_id\", \"vendors\".\"vendor_name\" as \"company_name\", COUNT(\"users\".\"id\") as \"user_count\" from \"roles\" left join \"user_roles\" on \"user_roles\".\"role_id\" = \"roles\".\"id\" left join \"users\" on \"users\".\"id\" = \"user_roles\".\"user_id\" left join \"vendors\" on \"roles\".\"company_id\" = \"vendors\".\"id\" group by \"roles\".\"id\", \"vendors\".\"id\"",
+ "name": "role_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.user_view": {
+ "columns": {},
+ "definition": "select \"users\".\"id\" as \"user_id\", \"users\".\"name\" as \"user_name\", \"users\".\"phone\" as \"user_phone\", \"users\".\"email\" as \"user_email\", \"users\".\"domain\" as \"user_domain\", \"users\".\"image_url\" as \"user_image\", \"vendors\".\"id\" as \"company_id\", \"vendors\".\"vendor_name\" as \"company_name\", \n array_agg(\"roles\".\"name\")\n as \"roles\", \"users\".\"created_at\" as \"created_at\" from \"users\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"user_roles\" on \"users\".\"id\" = \"user_roles\".\"user_id\" left join \"roles\" on \"user_roles\".\"role_id\" = \"roles\".\"id\" group by \"users\".\"id\", \"vendors\".\"id\"",
+ "name": "user_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.form_lists_view": {
+ "columns": {},
+ "definition": "select \"tag_type_class_form_mappings\".\"id\" as \"id\", \"tag_type_class_form_mappings\".\"project_id\" as \"project_id\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"tag_type_class_form_mappings\".\"tag_type_label\" as \"tag_type_label\", \"tag_type_class_form_mappings\".\"class_label\" as \"class_label\", \"tag_type_class_form_mappings\".\"form_code\" as \"form_code\", \"tag_type_class_form_mappings\".\"form_name\" as \"form_name\", \"tag_type_class_form_mappings\".\"ep\" as \"ep\", \"tag_type_class_form_mappings\".\"remark\" as \"remark\", \"tag_type_class_form_mappings\".\"created_at\" as \"created_at\", \"tag_type_class_form_mappings\".\"updated_at\" as \"updated_at\" from \"tag_type_class_form_mappings\" inner join \"projects\" on \"tag_type_class_form_mappings\".\"project_id\" = \"projects\".\"id\"",
+ "name": "form_lists_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.view_tag_subfields": {
+ "columns": {
+ "tag_type_code": {
+ "name": "tag_type_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_id": {
+ "name": "attributes_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attributes_description": {
+ "name": "attributes_description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expression": {
+ "name": "expression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delimiter": {
+ "name": "delimiter",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"tag_subfields\".\"id\" as \"id\", \"tag_subfields\".\"tag_type_code\", \"tag_types\".\"description\", \"tag_subfields\".\"attributes_id\", \"tag_subfields\".\"attributes_description\", \"tag_subfields\".\"expression\", \"tag_subfields\".\"delimiter\", \"tag_subfields\".\"sort_order\", \"tag_subfields\".\"created_at\", \"tag_subfields\".\"updated_at\", \"projects\".\"id\" as \"project_id\", \"projects\".\"code\", \"projects\".\"name\" from \"tag_subfields\" inner join \"tag_types\" on (\"tag_subfields\".\"tag_type_code\" = \"tag_types\".\"code\" and \"tag_subfields\".\"project_id\" = \"tag_types\".\"project_id\") inner join \"projects\" on \"tag_subfields\".\"project_id\" = \"projects\".\"id\"",
+ "name": "view_tag_subfields",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.document_stages_only_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n d.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM documents d\n LEFT JOIN issue_stages ist ON d.id = ist.document_id\n GROUP BY d.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n -- 문서별 스테이지 집계 (리비전 제외)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'description', ist.description,\n 'notes', ist.notes,\n 'reminderDays', ist.reminder_days\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.doc_number,\n d.drawing_kind,\n d.vendor_doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n -- 프로젝트 및 벤더 정보\n p.code as project_code,\n v.vendor_name as vendor_name,\n v.vendor_code as vendor_code,\n c.vendor_id as vendor_id,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 전체 스테이지 (리비전 제외)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 메타 정보\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- 프로젝트 및 벤더 정보 JOIN\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN projects p ON c.project_id = p.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n -- 스테이지 관련 정보 JOIN\n LEFT JOIN document_stats ds ON d.id = ds.document_id\n LEFT JOIN current_stage_info csi ON d.id = csi.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "document_stages_only_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.document_stages_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_count": {
+ "name": "stage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "stage_list": {
+ "name": "stage_list",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT\n d.id AS document_id,\n d.doc_number,\n d.title,\n d.status,\n d.issued_date,\n d.contract_id,\n (SELECT COUNT(*) FROM issue_stages WHERE document_id = d.id) AS stage_count,\n COALESCE( \n (SELECT json_agg(i.stage_name) FROM issue_stages i WHERE i.document_id = d.id), \n '[]'\n ) AS stage_list,\n d.created_at,\n d.updated_at\n FROM documents d\n",
+ "name": "document_stages_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.enhanced_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision": {
+ "name": "latest_revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_status": {
+ "name": "latest_revision_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_name": {
+ "name": "latest_revision_uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_submitted_date": {
+ "name": "latest_submitted_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n d.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM documents d\n LEFT JOIN issue_stages ist ON d.id = ist.document_id\n GROUP BY d.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n latest_revision_info AS (\n SELECT DISTINCT ON (ist.document_id)\n ist.document_id,\n r.id as latest_revision_id,\n r.revision as latest_revision,\n r.revision_status as latest_revision_status,\n r.uploader_name as latest_revision_uploader_name,\n r.submitted_date as latest_submitted_date\n FROM revisions r\n JOIN issue_stages ist ON r.issue_stage_id = ist.id\n ORDER BY ist.document_id, r.created_at DESC\n ),\n -- 리비전별 첨부파일 집계\n revision_attachments AS (\n SELECT \n r.id as revision_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', da.id,\n 'revisionId', da.revision_id,\n 'fileName', da.file_name,\n 'filePath', da.file_path,\n 'fileSize', da.file_size,\n 'fileType', da.file_type,\n 'createdAt', da.created_at,\n 'updatedAt', da.updated_at\n ) ORDER BY da.created_at\n ) FILTER (WHERE da.id IS NOT NULL),\n '[]'::json\n ) as attachments\n FROM revisions r\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY r.id\n ),\n -- 스테이지별 리비전 집계 (첨부파일 포함)\n stage_revisions AS (\n SELECT \n ist.id as stage_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', r.id,\n 'issueStageId', r.issue_stage_id,\n 'revision', r.revision,\n 'uploaderType', r.uploader_type,\n 'uploaderId', r.uploader_id,\n 'uploaderName', r.uploader_name,\n 'comment', r.comment,\n 'usage', r.usage,\n 'revisionStatus', r.revision_status,\n 'submittedDate', r.submitted_date,\n 'uploadedAt', r.uploaded_at,\n 'approvedDate', r.approved_date,\n 'reviewStartDate', r.review_start_date,\n 'rejectedDate', r.rejected_date,\n 'reviewerId', r.reviewer_id,\n 'reviewerName', r.reviewer_name,\n 'reviewComments', r.review_comments,\n 'createdAt', r.created_at,\n 'updatedAt', r.updated_at,\n 'attachments', ra.attachments\n ) ORDER BY r.created_at\n ) FILTER (WHERE r.id IS NOT NULL),\n '[]'::json\n ) as revisions\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN revision_attachments ra ON r.id = ra.revision_id\n GROUP BY ist.id\n ),\n -- 문서별 스테이지 집계 (리비전 포함)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'revisions', sr.revisions\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n LEFT JOIN stage_revisions sr ON ist.id = sr.stage_id\n GROUP BY ist.document_id\n ),\n attachment_counts AS (\n SELECT \n ist.document_id,\n COUNT(da.id) as attachment_count\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.doc_number,\n d.drawing_kind,\n d.vendor_doc_number, -- ✅ 벤더 문서 번호 추가\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n\n d.c_gbn,\n d.d_gbn,\n d.degree_gbn,\n d.dept_gbn,\n d.s_gbn,\n d.j_gbn,\n\n\n \n -- ✅ 프로젝트 및 벤더 정보 추가\n c.project_id as project_id,\n p.code as project_code,\n v.vendor_name as vendor_name,\n v.vendor_code as vendor_code,\n c.vendor_id as vendor_id,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 최신 리비전 정보\n lri.latest_revision_id,\n lri.latest_revision,\n lri.latest_revision_status,\n lri.latest_revision_uploader_name,\n lri.latest_submitted_date,\n \n -- 전체 스테이지 (리비전 및 첨부파일 포함)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 기타\n COALESCE(ac.attachment_count, 0) as attachment_count,\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- ✅ contracts, projects, vendors 테이블 JOIN 추가\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN projects p ON c.project_id = p.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n LEFT JOIN document_stats ds ON d.id = ds.document_id\n LEFT JOIN current_stage_info csi ON d.id = csi.document_id\n LEFT JOIN latest_revision_info lri ON d.id = lri.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n LEFT JOIN attachment_counts ac ON d.id = ac.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "enhanced_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.simplified_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "drawing_kind": {
+ "name": "drawing_kind",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "drawing_move_gbn": {
+ "name": "drawing_move_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discipline": {
+ "name": "discipline",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_document_id": {
+ "name": "external_document_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_system_type": {
+ "name": "external_system_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_synced_at": {
+ "name": "external_synced_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shi_drawing_no": {
+ "name": "shi_drawing_no",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager": {
+ "name": "manager",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_enm": {
+ "name": "manager_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_no": {
+ "name": "manager_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group": {
+ "name": "register_group",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "register_group_id": {
+ "name": "register_group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_no": {
+ "name": "create_user_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_id": {
+ "name": "create_user_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "create_user_enm": {
+ "name": "create_user_enm",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "c_gbn": {
+ "name": "c_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "d_gbn": {
+ "name": "d_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "degree_gbn": {
+ "name": "degree_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dept_gbn": {
+ "name": "dept_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "j_gbn": {
+ "name": "j_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s_gbn": {
+ "name": "s_gbn",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_id": {
+ "name": "first_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_name": {
+ "name": "first_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_plan_date": {
+ "name": "first_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_stage_actual_date": {
+ "name": "first_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_id": {
+ "name": "second_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_name": {
+ "name": "second_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_plan_date": {
+ "name": "second_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "second_stage_actual_date": {
+ "name": "second_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH \n -- 리비전별 첨부파일 집계\n revision_attachments AS (\n SELECT \n r.id as revision_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', da.id,\n 'revisionId', da.revision_id,\n 'fileName', da.file_name,\n 'filePath', da.file_path,\n 'fileSize', da.file_size,\n 'fileType', da.file_type,\n 'dolceFilePath', da.dolce_file_path,\n 'createdAt', da.created_at,\n 'updatedAt', da.updated_at\n ) ORDER BY da.created_at\n ) FILTER (WHERE da.id IS NOT NULL),\n '[]'::json\n ) as attachments\n FROM revisions r\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY r.id\n ),\n \n -- 스테이지별 리비전 집계 (첨부파일 포함)\n stage_revisions AS (\n SELECT \n ist.id as stage_id,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', r.id,\n 'issueStageId', r.issue_stage_id,\n 'revision', r.revision,\n 'uploaderType', r.uploader_type,\n 'uploaderId', r.uploader_id,\n 'uploaderName', r.uploader_name,\n 'comment', r.comment,\n 'usage', r.usage,\n 'usageType', r.usage_type,\n 'revisionStatus', r.revision_status,\n 'submittedDate', r.submitted_date,\n 'uploadedAt', r.uploaded_at,\n 'approvedDate', r.approved_date,\n 'reviewStartDate', r.review_start_date,\n 'rejectedDate', r.rejected_date,\n 'reviewerId', r.reviewer_id,\n 'reviewerName', r.reviewer_name,\n 'reviewComments', r.review_comments,\n 'createdAt', r.created_at,\n 'updatedAt', r.updated_at,\n 'attachments', COALESCE(ra.attachments, '[]'::json)\n ) ORDER BY r.created_at\n ) FILTER (WHERE r.id IS NOT NULL),\n '[]'::json\n ) as revisions\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN revision_attachments ra ON r.id = ra.revision_id\n GROUP BY ist.id\n ),\n \n -- 문서별 스테이지 집계 (리비전 포함)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'revisions', COALESCE(sr.revisions, '[]'::json)\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM issue_stages ist\n LEFT JOIN stage_revisions sr ON ist.id = sr.stage_id\n GROUP BY ist.document_id\n ),\n \n -- 첫 번째 스테이지 정보 (drawingKind에 따라 다른 조건)\n first_stage_info AS (\n SELECT \n document_id,\n first_stage_id,\n first_stage_name,\n first_stage_plan_date,\n first_stage_actual_date\n FROM (\n SELECT \n ist.document_id,\n ist.id as first_stage_id,\n ist.stage_name as first_stage_name,\n ist.plan_date as first_stage_plan_date,\n ist.actual_date as first_stage_actual_date,\n ROW_NUMBER() OVER (PARTITION BY ist.document_id ORDER BY ist.stage_order ASC) as rn\n FROM issue_stages ist\n JOIN documents d ON ist.document_id = d.id\n WHERE \n (d.drawing_kind = 'B4' AND LOWER(ist.stage_name) LIKE '%pre%') OR\n (d.drawing_kind = 'B3' AND LOWER(ist.stage_name) LIKE '%approval%') OR\n (d.drawing_kind = 'B5' AND LOWER(ist.stage_name) LIKE '%first%')\n ) ranked\n WHERE rn = 1\n ),\n \n -- 두 번째 스테이지 정보 (drawingKind에 따라 다른 조건)\n second_stage_info AS (\n SELECT \n document_id,\n second_stage_id,\n second_stage_name,\n second_stage_plan_date,\n second_stage_actual_date\n FROM (\n SELECT \n ist.document_id,\n ist.id as second_stage_id,\n ist.stage_name as second_stage_name,\n ist.plan_date as second_stage_plan_date,\n ist.actual_date as second_stage_actual_date,\n ROW_NUMBER() OVER (PARTITION BY ist.document_id ORDER BY ist.stage_order ASC) as rn\n FROM issue_stages ist\n JOIN documents d ON ist.document_id = d.id\n WHERE \n (d.drawing_kind = 'B4' AND LOWER(ist.stage_name) LIKE '%work%') OR\n (d.drawing_kind = 'B3' AND LOWER(ist.stage_name) LIKE '%work%') OR\n (d.drawing_kind = 'B5' AND LOWER(ist.stage_name) LIKE '%second%')\n ) ranked\n WHERE rn = 1\n ),\n \n -- 첨부파일 수 집계\n attachment_counts AS (\n SELECT \n ist.document_id,\n COUNT(da.id) as attachment_count\n FROM issue_stages ist\n LEFT JOIN revisions r ON ist.id = r.issue_stage_id\n LEFT JOIN document_attachments da ON r.id = da.revision_id\n GROUP BY ist.document_id\n )\n \n SELECT \n d.id as document_id,\n d.project_id,\n d.vendor_id,\n d.doc_number,\n d.drawing_kind,\n d.drawing_move_gbn,\n d.discipline,\n d.vendor_doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n -- 외부 시스템 연동 정보\n d.external_document_id,\n d.external_system_type,\n d.external_synced_at,\n \n -- DOLCE 응답의 추가 정보들\n d.shi_drawing_no,\n d.manager,\n d.manager_enm,\n d.manager_no,\n d.register_group,\n d.register_group_id,\n \n -- 생성자 정보\n d.create_user_no,\n d.create_user_id,\n d.create_user_enm,\n \n -- 프로젝트 및 벤더 정보\n p.code as project_code,\n v.vendor_name,\n v.vendor_code,\n \n -- B4 전용 필드들\n d.c_gbn,\n d.d_gbn,\n d.degree_gbn,\n d.dept_gbn,\n d.s_gbn,\n d.j_gbn,\n \n -- 첫 번째 스테이지 정보\n fsi.first_stage_id,\n fsi.first_stage_name,\n fsi.first_stage_plan_date,\n fsi.first_stage_actual_date,\n \n -- 두 번째 스테이지 정보\n ssi.second_stage_id,\n ssi.second_stage_name,\n ssi.second_stage_plan_date,\n ssi.second_stage_actual_date,\n \n -- 전체 스테이지 (리비전 및 첨부파일 포함)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 기타\n COALESCE(ac.attachment_count, 0) as attachment_count,\n d.created_at,\n d.updated_at\n \n FROM documents d\n -- projects, vendors 테이블 JOIN (projectId가 이제 documents에 직접 있음)\n LEFT JOIN projects p ON d.project_id = p.id AND p.type = 'ship'\n LEFT JOIN contracts c ON d.contract_id = c.id\n LEFT JOIN vendors v ON c.vendor_id = v.id\n \n -- 스테이지 정보 JOIN\n LEFT JOIN first_stage_info fsi ON d.id = fsi.document_id\n LEFT JOIN second_stage_info ssi ON d.id = ssi.document_id\n LEFT JOIN stage_aggregation sa ON d.id = sa.document_id\n LEFT JOIN attachment_counts ac ON d.id = ac.document_id\n \n ORDER BY d.created_at DESC\n",
+ "name": "simplified_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.stage_documents_view": {
+ "columns": {
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_doc_number": {
+ "name": "vendor_doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_id": {
+ "name": "current_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_name": {
+ "name": "current_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_status": {
+ "name": "current_stage_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_order": {
+ "name": "current_stage_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_plan_date": {
+ "name": "current_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_actual_date": {
+ "name": "current_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_assignee_name": {
+ "name": "current_stage_assignee_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_stage_priority": {
+ "name": "current_stage_priority",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_until_due": {
+ "name": "days_until_due",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_overdue": {
+ "name": "is_overdue",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_difference": {
+ "name": "days_difference",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_stages": {
+ "name": "total_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completed_stages": {
+ "name": "completed_stages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "progress_percentage": {
+ "name": "progress_percentage",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "all_stages": {
+ "name": "all_stages",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n WITH document_stats AS (\n SELECT \n sd.id as document_id,\n COUNT(ist.id) as total_stages,\n COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages,\n CASE \n WHEN COUNT(ist.id) > 0 \n THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id))\n ELSE 0 \n END as progress_percentage\n FROM stage_documents sd\n LEFT JOIN stage_issue_stages ist ON sd.id = ist.document_id\n GROUP BY sd.id\n ),\n current_stage_info AS (\n SELECT DISTINCT ON (document_id)\n document_id,\n id as current_stage_id,\n stage_name as current_stage_name,\n stage_status as current_stage_status,\n stage_order as current_stage_order,\n plan_date as current_stage_plan_date,\n actual_date as current_stage_actual_date,\n assignee_name as current_stage_assignee_name,\n priority as current_stage_priority,\n CASE \n WHEN actual_date IS NULL AND plan_date IS NOT NULL \n THEN plan_date - CURRENT_DATE\n ELSE NULL \n END as days_until_due,\n CASE \n WHEN actual_date IS NULL AND plan_date < CURRENT_DATE \n THEN true\n WHEN actual_date IS NOT NULL AND actual_date > plan_date \n THEN true\n ELSE false \n END as is_overdue,\n CASE \n WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL \n THEN actual_date - plan_date\n ELSE NULL \n END as days_difference\n FROM stage_issue_stages\n WHERE stage_status NOT IN ('COMPLETED', 'APPROVED')\n ORDER BY document_id, stage_order ASC, priority DESC\n ),\n -- 문서별 스테이지 집계 (리비전 제외)\n stage_aggregation AS (\n SELECT \n ist.document_id,\n json_agg(\n json_build_object(\n 'id', ist.id,\n 'stageName', ist.stage_name,\n 'stageStatus', ist.stage_status,\n 'stageOrder', ist.stage_order,\n 'planDate', ist.plan_date,\n 'actualDate', ist.actual_date,\n 'assigneeName', ist.assignee_name,\n 'priority', ist.priority,\n 'description', ist.description,\n 'notes', ist.notes,\n 'reminderDays', ist.reminder_days\n ) ORDER BY ist.stage_order\n ) as all_stages\n FROM stage_issue_stages ist\n GROUP BY ist.document_id\n )\n \n SELECT \n sd.id as document_id,\n sd.doc_number,\n sd.vendor_doc_number,\n sd.title,\n sd.status,\n sd.issued_date,\n \n -- 프로젝트 및 벤더 정보 (직접 참조로 간소화)\n sd.project_id,\n sd.contract_id,\n p.code as project_code,\n sd.vendor_id,\n v.vendor_name,\n v.vendor_code,\n \n -- 현재 스테이지 정보\n csi.current_stage_id,\n csi.current_stage_name,\n csi.current_stage_status,\n csi.current_stage_order,\n csi.current_stage_plan_date,\n csi.current_stage_actual_date,\n csi.current_stage_assignee_name,\n csi.current_stage_priority,\n \n -- 계산 필드\n csi.days_until_due,\n csi.is_overdue,\n csi.days_difference,\n \n -- 진행률 정보\n ds.total_stages,\n ds.completed_stages,\n ds.progress_percentage,\n \n -- 전체 스테이지 (리비전 제외)\n COALESCE(sa.all_stages, '[]'::json) as all_stages,\n \n -- 메타 정보\n sd.created_at,\n sd.updated_at\n \n FROM stage_documents sd\n -- 간소화된 JOIN (vendors는 vendor_id로 직접 조인)\n LEFT JOIN projects p ON sd.project_id = p.id\n LEFT JOIN vendors v ON sd.vendor_id = v.id\n \n -- 스테이지 관련 정보 JOIN\n LEFT JOIN document_stats ds ON sd.id = ds.document_id\n LEFT JOIN current_stage_info csi ON sd.id = csi.document_id\n LEFT JOIN stage_aggregation sa ON sd.id = sa.document_id\n \n ORDER BY sd.created_at DESC\n",
+ "name": "stage_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.sync_status_view": {
+ "columns": {
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_system": {
+ "name": "target_system",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_changes": {
+ "name": "total_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pending_changes": {
+ "name": "pending_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "synced_changes": {
+ "name": "synced_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "failed_changes": {
+ "name": "failed_changes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_sync_at": {
+ "name": "last_sync_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "next_sync_at": {
+ "name": "next_sync_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_enabled": {
+ "name": "sync_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n WITH change_stats AS (\n SELECT \n cl.vendor_id,\n sc.target_system,\n COUNT(*) as total_changes,\n COUNT(CASE WHEN cl.is_synced = false AND cl.sync_attempts < sc.retry_max_attempts THEN 1 END) as pending_changes,\n COUNT(CASE WHEN cl.is_synced = true THEN 1 END) as synced_changes,\n COUNT(CASE WHEN cl.sync_attempts >= sc.retry_max_attempts AND cl.is_synced = false THEN 1 END) as failed_changes,\n MAX(cl.synced_at) as last_sync_at\n FROM change_logs cl\n CROSS JOIN sync_configs sc \n WHERE cl.vendor_id = sc.vendor_id\n AND (cl.target_systems IS NULL OR cl.target_systems @> to_jsonb(ARRAY[sc.target_system]))\n GROUP BY cl.vendor_id, sc.target_system\n )\n SELECT \n cs.vendor_id,\n cs.target_system,\n COALESCE(cs.total_changes, 0) as total_changes,\n COALESCE(cs.pending_changes, 0) as pending_changes,\n COALESCE(cs.synced_changes, 0) as synced_changes,\n COALESCE(cs.failed_changes, 0) as failed_changes,\n cs.last_sync_at,\n CASE \n WHEN sc.sync_enabled = true AND sc.last_successful_sync IS NOT NULL \n THEN sc.last_successful_sync + (sc.sync_interval_minutes || ' minutes')::interval\n ELSE NULL\n END as next_sync_at,\n sc.sync_enabled\n FROM sync_configs sc\n LEFT JOIN change_stats cs ON sc.vendor_id = cs.vendor_id AND sc.target_system = cs.target_system\n",
+ "name": "sync_status_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_documents_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "doc_number": {
+ "name": "doc_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pic": {
+ "name": "pic",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issued_date": {
+ "name": "issued_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_id": {
+ "name": "contract_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latest_stage_id": {
+ "name": "latest_stage_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_name": {
+ "name": "latest_stage_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_plan_date": {
+ "name": "latest_stage_plan_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_stage_actual_date": {
+ "name": "latest_stage_actual_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_id": {
+ "name": "latest_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision": {
+ "name": "latest_revision",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_type": {
+ "name": "latest_revision_uploader_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_revision_uploader_name": {
+ "name": "latest_revision_uploader_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_count": {
+ "name": "attachment_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT \n d.id, \n d.doc_number,\n d.title,\n d.pic,\n d.status,\n d.issued_date,\n d.contract_id,\n \n (SELECT id FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_id,\n (SELECT stage_name FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_name,\n (SELECT plan_date FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_plan_date,\n (SELECT actual_date FROM issue_stages WHERE document_id = d.id ORDER BY created_at DESC LIMIT 1) AS latest_stage_actual_date,\n \n (SELECT r.id FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_id,\n (SELECT r.revision FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision,\n (SELECT r.uploader_type FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_uploader_type,\n (SELECT r.uploader_name FROM revisions r JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id ORDER BY r.created_at DESC LIMIT 1) AS latest_revision_uploader_name,\n \n (SELECT COUNT(*) FROM document_attachments a JOIN revisions r ON a.revision_id = r.id JOIN issue_stages i ON r.issue_stage_id = i.id WHERE i.document_id = d.id) AS attachment_count,\n \n d.created_at,\n d.updated_at\n FROM documents d\n JOIN contracts c ON d.contract_id = c.id\n ",
+ "name": "vendor_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_candidates_with_vendor_info": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "company_name": {
+ "name": "company_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "contact_email": {
+ "name": "contact_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_phone": {
+ "name": "contact_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'COLLECTED'"
+ },
+ "items": {
+ "name": "items",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"vendor_candidates\".\"id\", \"vendor_candidates\".\"company_name\", \"vendor_candidates\".\"contact_email\", \"vendor_candidates\".\"contact_phone\", \"vendor_candidates\".\"tax_id\", \"vendor_candidates\".\"address\", \"vendor_candidates\".\"country\", \"vendor_candidates\".\"source\", \"vendor_candidates\".\"status\", \"vendor_candidates\".\"items\", \"vendor_candidates\".\"remark\", \"vendor_candidates\".\"created_at\", \"vendor_candidates\".\"updated_at\", \"vendors\".\"vendor_name\", \"vendors\".\"vendor_code\", \"vendors\".\"created_at\" as \"vendor_created_at\", (\n SELECT l2.\"created_at\"\n FROM \"vendor_candidate_logs\" l2\n WHERE l2.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l2.\"action\" = 'status_change'\n ORDER BY l2.\"created_at\" DESC\n LIMIT 1\n ) as \"last_status_change_at\", (\n SELECT u.\"name\"\n FROM \"users\" u\n JOIN \"vendor_candidate_logs\" l3\n ON l3.\"user_id\" = u.\"id\"\n WHERE l3.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l3.\"action\" = 'status_change'\n ORDER BY l3.\"created_at\" DESC\n LIMIT 1\n ) as \"last_status_change_by\", (\n SELECT l4.\"created_at\"\n FROM \"vendor_candidate_logs\" l4\n WHERE l4.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l4.\"action\" = 'invite_sent'\n ORDER BY l4.\"created_at\" DESC\n LIMIT 1\n ) as \"last_invitation_at\", (\n SELECT u2.\"name\"\n FROM \"users\" u2\n JOIN \"vendor_candidate_logs\" l5\n ON l5.\"user_id\" = u2.\"id\"\n WHERE l5.\"vendor_candidate_id\" = \"vendor_candidates\".\"id\"\n AND l5.\"action\" = 'invite_sent'\n ORDER BY l5.\"created_at\" DESC\n LIMIT 1\n ) as \"last_invitation_by\" from \"vendor_candidates\" left join \"vendors\" on \"vendor_candidates\".\"vendor_id\" = \"vendors\".\"id\"",
+ "name": "vendor_candidates_with_vendor_info",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "business_size": {
+ "name": "business_size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING_REVIEW'"
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "corporate_registration_number": {
+ "name": "corporate_registration_number",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_agency": {
+ "name": "credit_agency",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credit_rating": {
+ "name": "credit_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cash_flow_rating": {
+ "name": "cash_flow_rating",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"id\", \"vendor_name\", \"vendor_code\", \"tax_id\", \"address\", \"business_size\", \"country\", \"phone\", \"email\", \"website\", \"status\", \"representative_name\", \"representative_birth\", \"representative_email\", \"representative_phone\", \"corporate_registration_number\", \"credit_agency\", \"credit_rating\", \"cash_flow_rating\", \"created_at\", \"updated_at\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', c.id,\n 'contactName', c.contact_name,\n 'contactPosition', c.contact_position,\n 'contactEmail', c.contact_email,\n 'contactPhone', c.contact_phone,\n 'isPrimary', c.is_primary\n )\n ),\n '[]'::json\n )\n FROM vendor_contacts c\n WHERE c.vendor_id = vendors.id)\n as \"contacts\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', a.id,\n 'fileName', a.file_name,\n 'filePath', a.file_path,\n 'attachmentType', a.attachment_type,\n 'createdAt', a.created_at\n )\n ORDER BY a.attachment_type, a.created_at DESC\n ),\n '[]'::json\n )\n FROM vendor_attachments a\n WHERE a.vendor_id = vendors.id)\n as \"attachments\", \n (SELECT COUNT(*)\n FROM vendor_attachments a\n WHERE a.vendor_id = vendors.id)\n as \"attachment_count\", \n (SELECT COUNT(*) \n FROM vendor_contacts c\n WHERE c.vendor_id = vendors.id)\n as \"contact_count\" from \"vendors\"",
+ "name": "vendor_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_items_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"vendor_possible_items\".\"id\", \"vendor_possible_items\".\"vendor_id\", \"items\".\"item_name\", \"items\".\"item_code\", \"items\".\"description\", \"vendor_possible_items\".\"created_at\", \"vendor_possible_items\".\"updated_at\" from \"vendor_possible_items\" left join \"items\" on \"vendor_possible_items\".\"item_code\" = \"items\".\"item_code\"",
+ "name": "vendor_items_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_materials_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_of_measure": {
+ "name": "unit_of_measure",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "steel_type": {
+ "name": "steel_type",
+ "type": "varchar(2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grade_material": {
+ "name": "grade_material",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"vendor_possible_materials\".\"id\", \"vendor_possible_materials\".\"vendor_id\", \"materials\".\"item_name\", \"materials\".\"item_code\", \"materials\".\"description\", \"materials\".\"unit_of_measure\", \"materials\".\"steel_type\", \"materials\".\"grade_material\", \"vendor_possible_materials\".\"created_at\", \"vendor_possible_materials\".\"updated_at\" from \"vendor_possible_materials\" left join \"materials\" on \"vendor_possible_materials\".\"item_code\" = \"materials\".\"item_code\"",
+ "name": "vendor_materials_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendors_with_types": {
+ "columns": {},
+ "definition": "select \"vendors\".\"id\" as \"id\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"tax_id\" as \"tax_id\", \"vendors\".\"address\" as \"address\", \"vendors\".\"country\" as \"country\", \"vendors\".\"phone\" as \"phone\", \"vendors\".\"email\" as \"email\", \"vendors\".\"business_size\" as \"business_size\", \"vendors\".\"website\" as \"website\", \"vendors\".\"status\" as \"status\", \"vendors\".\"vendor_type_id\" as \"vendor_type_id\", \"vendors\".\"representative_name\" as \"representative_name\", \"vendors\".\"representative_birth\" as \"representative_birth\", \"vendors\".\"representative_email\" as \"representative_email\", \"vendors\".\"representative_phone\" as \"representative_phone\", \"vendors\".\"corporate_registration_number\" as \"corporate_registration_number\", \"vendors\".\"items\" as \"items\", \"vendors\".\"credit_agency\" as \"credit_agency\", \"vendors\".\"credit_rating\" as \"credit_rating\", \"vendors\".\"cash_flow_rating\" as \"cash_flow_rating\", \"vendors\".\"created_at\" as \"created_at\", \"vendors\".\"updated_at\" as \"updated_at\", \"vendor_types\".\"name_ko\" as \"vendor_type_name\", \"vendor_types\".\"name_en\" as \"vendor_type_name_en\", \"vendor_types\".\"code\" as \"vendor_type_code\", \n CASE\n WHEN \"vendors\".\"status\" = 'ACTIVE' THEN '정규업체'\n WHEN \"vendors\".\"status\" IN ('INACTIVE', 'BLACKLISTED', 'REJECTED') THEN ''\n ELSE '잠재업체'\n END\n as \"vendor_category\" from \"vendors\" left join \"vendor_types\" on \"vendors\".\"vendor_type_id\" = \"vendor_types\".\"id\"",
+ "name": "vendors_with_types",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.basic_contract_view": {
+ "columns": {},
+ "definition": "select \"basic_contract\".\"id\" as \"id\", \"basic_contract\".\"template_id\" as \"template_id\", \"basic_contract\".\"vendor_id\" as \"vendor_id\", \"basic_contract\".\"requested_by\" as \"requested_by\", \"basic_contract\".\"status\" as \"basic_contract_status\", \"basic_contract\".\"created_at\" as \"created_at\", \"basic_contract\".\"updated_at\" as \"updated_at\", \"basic_contract\".\"completed_at\" as \"completed_at\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"email\" as \"vendor_email\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"users\".\"name\" as \"requested_by_name\", \"basic_contract_templates\".\"template_name\" as \"template_name\", \"basic_contract_templates\".\"revision\" as \"template_revision\", \"basic_contract_templates\".\"status\" as \"template_status\", \"basic_contract_templates\".\"validity_period\" as \"validity_period\", \"basic_contract_templates\".\"legal_review_required\" as \"legal_review_required\", \"basic_contract_templates\".\"shipbuilding_applicable\" as \"shipbuilding_applicable\", \"basic_contract_templates\".\"wind_applicable\" as \"wind_applicable\", \"basic_contract_templates\".\"pc_applicable\" as \"pc_applicable\", \"basic_contract_templates\".\"nb_applicable\" as \"nb_applicable\", \"basic_contract_templates\".\"rc_applicable\" as \"rc_applicable\", \"basic_contract_templates\".\"gy_applicable\" as \"gy_applicable\", \"basic_contract_templates\".\"sys_applicable\" as \"sys_applicable\", \"basic_contract_templates\".\"infra_applicable\" as \"infra_applicable\", \"basic_contract_templates\".\"file_path\" as \"template_file_path\", \"basic_contract_templates\".\"file_name\" as \"template_file_name\", \"basic_contract\".\"file_path\" as \"signed_file_path\", \"basic_contract\".\"file_name\" as \"signed_file_name\", \"basic_contract_templates\".\"created_at\" as \"template_created_at\", \"basic_contract_templates\".\"created_by\" as \"template_created_by\", \"basic_contract_templates\".\"updated_at\" as \"template_updated_at\", \"basic_contract_templates\".\"updated_by\" as \"template_updated_by\", \"basic_contract_templates\".\"disposed_at\" as \"template_disposed_at\", \"basic_contract_templates\".\"restored_at\" as \"template_restored_at\" from \"basic_contract\" left join \"vendors\" on \"basic_contract\".\"vendor_id\" = \"vendors\".\"id\" left join \"users\" on \"basic_contract\".\"requested_by\" = \"users\".\"id\" left join \"basic_contract_templates\" on \"basic_contract\".\"template_id\" = \"basic_contract_templates\".\"id\"",
+ "name": "basic_contract_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.pr_items_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "procurement_rfqs_id": {
+ "name": "procurement_rfqs_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_item": {
+ "name": "rfq_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_item": {
+ "name": "pr_item",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pr_no": {
+ "name": "pr_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_code": {
+ "name": "material_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_category": {
+ "name": "material_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "acc": {
+ "name": "acc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_description": {
+ "name": "material_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "size": {
+ "name": "size",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "uom": {
+ "name": "uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gross_weight": {
+ "name": "gross_weight",
+ "type": "numeric(12, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "gw_uom": {
+ "name": "gw_uom",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_no": {
+ "name": "spec_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "spec_url": {
+ "name": "spec_url",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tracking_no": {
+ "name": "tracking_no",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "major_yn": {
+ "name": "major_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "project_def": {
+ "name": "project_def",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_sc": {
+ "name": "project_sc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_kl": {
+ "name": "project_kl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_lc": {
+ "name": "project_lc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_dl": {
+ "name": "project_dl",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_code": {
+ "name": "item_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"pr_items\".\"id\", \"pr_items\".\"procurement_rfqs_id\", \"pr_items\".\"rfq_item\", \"pr_items\".\"pr_item\", \"pr_items\".\"pr_no\", \"pr_items\".\"material_code\", \"pr_items\".\"material_category\", \"pr_items\".\"acc\", \"pr_items\".\"material_description\", \"pr_items\".\"size\", \"pr_items\".\"delivery_date\", \"pr_items\".\"quantity\", \"pr_items\".\"uom\", \"pr_items\".\"gross_weight\", \"pr_items\".\"gw_uom\", \"pr_items\".\"spec_no\", \"pr_items\".\"spec_url\", \"pr_items\".\"tracking_no\", \"pr_items\".\"major_yn\", \"pr_items\".\"project_def\", \"pr_items\".\"project_sc\", \"pr_items\".\"project_kl\", \"pr_items\".\"project_lc\", \"pr_items\".\"project_dl\", \"pr_items\".\"remark\", \"procurement_rfqs\".\"rfq_code\", \"procurement_rfqs\".\"item_code\", \"procurement_rfqs\".\"item_name\" from \"pr_items\" left join \"procurement_rfqs\" on \"pr_items\".\"procurement_rfqs_id\" = \"procurement_rfqs\".\"id\"",
+ "name": "pr_items_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.procurement_rfq_details_view": {
+ "columns": {},
+ "definition": "select \"rfq_details\".\"id\" as \"detail_id\", \"rfqs\".\"id\" as \"rfq_id\", \"rfqs\".\"rfq_code\" as \"rfq_code\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"rfqs\".\"item_code\" as \"item_code\", \"rfqs\".\"item_name\" as \"item_name\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"id\" as \"vendor_id\", \"vendors\".\"country\" as \"vendor_country\", \"rfq_details\".\"currency\" as \"currency\", \"payment_terms\".\"code\" as \"payment_terms_code\", \"payment_terms\".\"description\" as \"payment_terms_description\", \"incoterms\".\"code\" as \"incoterms_code\", \"incoterms\".\"description\" as \"incoterms_description\", \"rfq_details\".\"incoterms_detail\" as \"incoterms_detail\", \"rfq_details\".\"delivery_date\" as \"delivery_date\", \"rfq_details\".\"tax_code\" as \"tax_code\", \"rfq_details\".\"place_of_shipping\" as \"place_of_shipping\", \"rfq_details\".\"place_of_destination\" as \"place_of_destination\", \"rfq_details\".\"material_price_related_yn\" as \"material_price_related_yn\", \"updated_by_user\".\"name\" as \"updated_by_user_name\", \"rfq_details\".\"updated_at\" as \"updated_at\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"rfqs\".\"id\"\n ) as \"pr_items_count\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"rfqs\".\"id\" \n AND major_yn = true\n ) as \"major_items_count\", (\n SELECT COUNT(*) \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"comment_count\", (\n SELECT created_at \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"last_comment_date\", (\n SELECT created_at \n FROM procurement_rfq_comments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\" AND is_vendor_comment = true\n ORDER BY created_at DESC LIMIT 1\n ) as \"last_vendor_comment_date\", (\n SELECT COUNT(*) \n FROM procurement_rfq_attachments \n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"attachment_count\", (\n SELECT COUNT(*) > 0\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"has_quotation\", (\n SELECT status\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"quotation_status\", (\n SELECT total_price\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY created_at DESC LIMIT 1\n ) as \"quotation_total_price\", (\n SELECT quotation_version\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY quotation_version DESC LIMIT 1\n ) as \"quotation_version\", (\n SELECT COUNT(DISTINCT quotation_version)\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ) as \"quotation_version_count\", (\n SELECT created_at\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"rfqs\".\"id\" AND vendor_id = \"rfq_details\".\"vendors_id\"\n ORDER BY quotation_version DESC LIMIT 1\n ) as \"last_quotation_date\" from \"procurement_rfq_details\" \"rfq_details\" left join \"procurement_rfqs\" \"rfqs\" on \"rfq_details\".\"procurement_rfqs_id\" = \"rfqs\".\"id\" left join \"projects\" on \"rfqs\".\"project_id\" = \"projects\".\"id\" left join \"vendors\" on \"rfq_details\".\"vendors_id\" = \"vendors\".\"id\" left join \"payment_terms\" on \"rfq_details\".\"payment_terms_code\" = \"payment_terms\".\"code\" left join \"incoterms\" on \"rfq_details\".\"incoterms_code\" = \"incoterms\".\"code\" left join \"users\" \"updated_by_user\" on \"rfq_details\".\"updated_by\" = \"updated_by_user\".\"id\"",
+ "name": "procurement_rfq_details_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.procurement_rfqs_view": {
+ "columns": {},
+ "definition": "select \"procurement_rfqs\".\"id\" as \"id\", \"procurement_rfqs\".\"rfq_code\" as \"rfq_code\", \"procurement_rfqs\".\"series\" as \"series\", \"procurement_rfqs\".\"rfq_sealed_yn\" as \"rfq_sealed_yn\", \"projects\".\"code\" as \"project_code\", \"projects\".\"name\" as \"project_name\", \"procurement_rfqs\".\"item_code\" as \"item_code\", \"procurement_rfqs\".\"item_name\" as \"item_name\", \"procurement_rfqs\".\"status\" as \"status\", \"procurement_rfqs\".\"pic_code\" as \"pic_code\", \"procurement_rfqs\".\"rfq_send_date\" as \"rfq_send_date\", \"procurement_rfqs\".\"due_date\" as \"due_date\", (\n SELECT MIN(submitted_at)\n FROM procurement_vendor_quotations\n WHERE rfq_id = \"procurement_rfqs\".\"id\"\n AND submitted_at IS NOT NULL\n ) as \"earliest_quotation_submitted_at\", \"created_by_user\".\"name\" as \"created_by_user_name\", \"sent_by_user\".\"name\" as \"sent_by_user_name\", \"procurement_rfqs\".\"updated_at\" as \"updated_at\", \"updated_by_user\".\"name\" as \"updated_by_user_name\", \"procurement_rfqs\".\"remark\" as \"remark\", (\n SELECT material_code \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n AND major_yn = true\n LIMIT 1\n ) as \"major_item_material_code\", (\n SELECT pr_no \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n AND major_yn = true\n LIMIT 1\n ) as \"po_no\", (\n SELECT COUNT(*) \n FROM pr_items \n WHERE procurement_rfqs_id = \"procurement_rfqs\".\"id\"\n ) as \"pr_items_count\" from \"procurement_rfqs\" left join \"projects\" on \"procurement_rfqs\".\"project_id\" = \"projects\".\"id\" left join \"users\" \"created_by_user\" on \"procurement_rfqs\".\"created_by\" = \"created_by_user\".\"id\" left join \"users\" \"updated_by_user\" on \"procurement_rfqs\".\"updated_by\" = \"updated_by_user\".\"id\" left join \"users\" \"sent_by_user\" on \"procurement_rfqs\".\"sent_by\" = \"sent_by_user\".\"id\"",
+ "name": "procurement_rfqs_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.attachment_revision_history": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_id": {
+ "name": "client_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_no": {
+ "name": "client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_name": {
+ "name": "client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_path": {
+ "name": "client_file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_file_size": {
+ "name": "client_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_comment": {
+ "name": "client_revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_revision_created_at": {
+ "name": "client_revision_created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest_client_revision": {
+ "name": "is_latest_client_revision",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_vendor_responses": {
+ "name": "total_vendor_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_vendors": {
+ "name": "responded_vendors",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pending_vendors": {
+ "name": "pending_vendors",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n ba.id as attachment_id,\n ba.attachment_type,\n ba.serial_no,\n \n -- 발주처 리비전 정보\n rev.id as client_revision_id,\n rev.revision_no as client_revision_no,\n rev.original_file_name as client_file_name,\n rev.file_size as client_file_size,\n rev.file_path as client_file_path,\n rev.revision_comment as client_revision_comment,\n rev.created_at as client_revision_created_at,\n rev.is_latest as is_latest_client_revision,\n \n -- 벤더 응답 통계\n COALESCE(response_stats.total_responses, 0) as total_vendor_responses,\n COALESCE(response_stats.responded_count, 0) as responded_vendors,\n COALESCE(response_stats.pending_count, 0) as pending_vendors,\n COALESCE(response_stats.total_files, 0) as total_response_files\n \n FROM b_rfqs br\n JOIN b_rfq_attachments ba ON br.id = ba.rfq_id\n JOIN b_rfq_attachment_revisions rev ON ba.id = rev.attachment_id\n LEFT JOIN (\n SELECT \n var.attachment_id,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN var.response_status = 'NOT_RESPONDED' THEN 1 END) as pending_count,\n COUNT(vra.id) as total_files\n FROM vendor_attachment_responses var\n LEFT JOIN vendor_response_attachments_b vra ON var.id = vra.vendor_response_id\n GROUP BY var.attachment_id\n ) response_stats ON ba.id = response_stats.attachment_id\n \n ORDER BY ba.id, rev.created_at DESC\n",
+ "name": "attachment_revision_history",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.attachments_with_latest_revision": {
+ "columns": {
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_id": {
+ "name": "revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_comment": {
+ "name": "revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n a.id as attachment_id,\n a.attachment_type,\n a.serial_no,\n a.rfq_id,\n a.description,\n a.current_revision,\n \n r.id as revision_id,\n r.file_name,\n r.original_file_name,\n r.file_path,\n r.file_size,\n r.file_type,\n r.revision_comment,\n \n a.created_by,\n u.name as created_by_name,\n a.created_at,\n a.updated_at\n FROM b_rfq_attachments a\n LEFT JOIN b_rfq_attachment_revisions r ON a.latest_revision_id = r.id\n LEFT JOIN users u ON a.created_by = u.id\n ",
+ "name": "attachments_with_latest_revision",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.b_rfqs_master": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_type": {
+ "name": "project_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.description,\n br.status,\n br.due_date,\n br.pic_code,\n br.pic_name,\n br.eng_pic_name,\n br.package_no,\n br.package_name,\n br.project_id,\n p.code as project_code,\n p.name as project_name,\n p.type as project_type,\n br.project_company,\n br.project_flag,\n br.project_site,\n COALESCE(att_count.total_attachments, 0) as total_attachments,\n br.created_at,\n br.updated_at\n FROM b_rfqs br\n LEFT JOIN projects p ON br.project_id = p.id\n LEFT JOIN (\n SELECT rfq_id, COUNT(*) as total_attachments\n FROM b_rfq_attachments\n GROUP BY rfq_id\n ) att_count ON br.id = att_count.rfq_id\n",
+ "name": "b_rfqs_master",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.final_rfq_detail": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_rfq_id": {
+ "name": "final_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_rfq_status": {
+ "name": "final_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delivery_date": {
+ "name": "delivery_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_description": {
+ "name": "incoterms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_code": {
+ "name": "payment_terms_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_terms_description": {
+ "name": "payment_terms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_code": {
+ "name": "tax_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_shipping": {
+ "name": "place_of_shipping",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "place_of_destination": {
+ "name": "place_of_destination",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "firsttime_yn": {
+ "name": "firsttime_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "material_price_related_yn": {
+ "name": "material_price_related_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_remark": {
+ "name": "vendor_remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n fr.id as final_rfq_id,\n fr.final_rfq_status,\n fr.vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n fr.due_date,\n fr.valid_date,\n fr.delivery_date,\n fr.incoterms_code,\n inc.description as incoterms_description,\n fr.payment_terms_code,\n pt.description as payment_terms_description,\n fr.currency,\n fr.tax_code,\n fr.place_of_shipping,\n fr.place_of_destination,\n fr.short_list,\n fr.return_yn,\n fr.cp_request_yn,\n fr.prject_gtc_yn,\n fr.firsttime_yn,\n fr.material_price_related_yn,\n fr.return_revision,\n fr.gtc,\n fr.gtc_valid_date,\n fr.classification,\n fr.sparepart,\n fr.remark,\n fr.vendor_remark,\n fr.created_at,\n fr.updated_at\n FROM b_rfqs br\n JOIN final_rfq fr ON br.id = fr.rfq_id\n LEFT JOIN vendors v ON fr.vendor_id = v.id\n LEFT JOIN incoterms inc ON fr.incoterms_code = inc.code\n LEFT JOIN payment_terms pt ON fr.payment_terms_code = pt.code\n",
+ "name": "final_rfq_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.initial_rfq_detail": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_rfq_id": {
+ "name": "initial_rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_rfq_status": {
+ "name": "initial_rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_category": {
+ "name": "vendor_category",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_date": {
+ "name": "valid_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_code": {
+ "name": "incoterms_code",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "incoterms_description": {
+ "name": "incoterms_description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "short_list": {
+ "name": "short_list",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_yn": {
+ "name": "return_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cp_request_yn": {
+ "name": "cp_request_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prject_gtc_yn": {
+ "name": "prject_gtc_yn",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "return_revision": {
+ "name": "return_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_revision": {
+ "name": "rfq_revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc": {
+ "name": "gtc",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gtc_valid_date": {
+ "name": "gtc_valid_date",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sparepart": {
+ "name": "sparepart",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n ir.id as initial_rfq_id,\n ir.initial_rfq_status,\n ir.vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n v.vendor_category as vendor_category,\n ir.due_date,\n ir.valid_date,\n ir.incoterms_code,\n inc.description as incoterms_description,\n ir.short_list,\n ir.return_yn,\n ir.cp_request_yn,\n ir.prject_gtc_yn,\n ir.return_revision,\n ir.rfq_revision,\n ir.gtc,\n ir.gtc_valid_date,\n ir.classification,\n ir.sparepart,\n ir.created_at,\n ir.updated_at\n FROM b_rfqs br\n JOIN initial_rfq ir ON br.id = ir.rfq_id\n LEFT JOIN vendors_with_types v ON ir.vendor_id = v.id\n LEFT JOIN incoterms inc ON ir.incoterms_code = inc.code\n",
+ "name": "initial_rfq_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfq_dashboard": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_code": {
+ "name": "project_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_no": {
+ "name": "package_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_name": {
+ "name": "package_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_code": {
+ "name": "pic_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pic_name": {
+ "name": "pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "eng_pic_name": {
+ "name": "eng_pic_name",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_company": {
+ "name": "project_company",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_flag": {
+ "name": "project_flag",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_site": {
+ "name": "project_site",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_vendor_count": {
+ "name": "initial_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_vendor_count": {
+ "name": "final_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_response_rate": {
+ "name": "initial_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_response_rate": {
+ "name": "final_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "overall_progress": {
+ "name": "overall_progress",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_to_deadline": {
+ "name": "days_to_deadline",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remark": {
+ "name": "remark",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by_name": {
+ "name": "updated_by_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_by_email": {
+ "name": "updated_by_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n -- ② SELECT 절 확장 -------------------------------------------\n SELECT\n br.id AS rfq_id,\n br.rfq_code,\n br.description,\n br.status,\n br.due_date,\n p.code AS project_code,\n p.name AS project_name,\n br.package_no,\n br.package_name,\n br.pic_code,\n br.pic_name,\n br.eng_pic_name,\n br.project_company,\n br.project_flag,\n br.project_site,\n br.remark,\n \n -- 첨부/벤더 요약 -----------------------\n COALESCE(att_count.total_attachments, 0) AS total_attachments,\n COALESCE(init_summary.vendor_count, 0) AS initial_vendor_count,\n COALESCE(final_summary.vendor_count, 0) AS final_vendor_count,\n COALESCE(init_summary.avg_response_rate, 0) AS initial_response_rate,\n COALESCE(final_summary.avg_response_rate, 0) AS final_response_rate,\n \n -- 진행률·마감까지 일수 --------------\n CASE \n WHEN br.status = 'DRAFT' THEN 0\n WHEN br.status = 'Doc. Received' THEN 10\n WHEN br.status = 'PIC Assigned' THEN 20\n WHEN br.status = 'Doc. Confirmed' THEN 30\n WHEN br.status = 'Init. RFQ Sent' THEN 40\n WHEN br.status = 'Init. RFQ Answered' THEN 50\n WHEN br.status = 'TBE started' THEN 60\n WHEN br.status = 'TBE finished' THEN 70\n WHEN br.status = 'Final RFQ Sent' THEN 80\n WHEN br.status = 'Quotation Received' THEN 90\n WHEN br.status = 'Vendor Selected' THEN 100\n ELSE 0\n END AS overall_progress,\n (br.due_date - CURRENT_DATE) AS days_to_deadline,\n \n br.created_at,\n br.updated_at,\n \n -- 💡 추가되는 컬럼 -------------------\n upd.name AS updated_by_name,\n upd.email AS updated_by_email\n FROM b_rfqs br\n LEFT JOIN projects p ON br.project_id = p.id\n \n -- ③ 사용자 정보 조인 --------------------\n LEFT JOIN users upd ON br.updated_by = upd.id\n \n -- (나머지 이미 있던 JOIN 들은 그대로) -----\n LEFT JOIN (\n SELECT rfq_id, COUNT(*) AS total_attachments\n FROM b_rfq_attachments\n GROUP BY rfq_id\n ) att_count ON br.id = att_count.rfq_id\n \n LEFT JOIN (\n SELECT \n rfq_id, \n COUNT(DISTINCT vendor_id) AS vendor_count,\n AVG(response_rate) AS avg_response_rate\n FROM vendor_response_summary\n WHERE rfq_type = 'INITIAL'\n GROUP BY rfq_id\n ) init_summary ON br.id = init_summary.rfq_id\n \n LEFT JOIN (\n SELECT \n rfq_id, \n COUNT(DISTINCT vendor_id) AS vendor_count,\n AVG(response_rate) AS avg_response_rate\n FROM vendor_response_summary\n WHERE rfq_type = 'FINAL'\n GROUP BY rfq_id\n ) final_summary ON br.id = final_summary.rfq_id\n ",
+ "name": "rfq_dashboard",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.rfq_progress_summary": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "days_to_deadline": {
+ "name": "days_to_deadline",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachments_with_multiple_revisions": {
+ "name": "attachments_with_multiple_revisions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_client_revisions": {
+ "name": "total_client_revisions",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_vendor_count": {
+ "name": "initial_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_total_responses": {
+ "name": "initial_total_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_responded_count": {
+ "name": "initial_responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_up_to_date_count": {
+ "name": "initial_up_to_date_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_version_mismatch_count": {
+ "name": "initial_version_mismatch_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_response_rate": {
+ "name": "initial_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initial_version_match_rate": {
+ "name": "initial_version_match_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_vendor_count": {
+ "name": "final_vendor_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_total_responses": {
+ "name": "final_total_responses",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_responded_count": {
+ "name": "final_responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_up_to_date_count": {
+ "name": "final_up_to_date_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_version_mismatch_count": {
+ "name": "final_version_mismatch_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_response_rate": {
+ "name": "final_response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_version_match_rate": {
+ "name": "final_version_match_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n br.due_date,\n (br.due_date - CURRENT_DATE) as days_to_deadline,\n \n -- 첨부파일 통계\n attachment_stats.total_attachments,\n attachment_stats.attachments_with_multiple_revisions,\n attachment_stats.total_client_revisions,\n \n -- Initial RFQ 통계\n COALESCE(initial_stats.vendor_count, 0) as initial_vendor_count,\n COALESCE(initial_stats.total_responses, 0) as initial_total_responses,\n COALESCE(initial_stats.responded_count, 0) as initial_responded_count,\n COALESCE(initial_stats.up_to_date_count, 0) as initial_up_to_date_count,\n COALESCE(initial_stats.version_mismatch_count, 0) as initial_version_mismatch_count,\n COALESCE(initial_stats.response_rate, 0) as initial_response_rate,\n COALESCE(initial_stats.version_match_rate, 0) as initial_version_match_rate,\n \n -- Final RFQ 통계\n COALESCE(final_stats.vendor_count, 0) as final_vendor_count,\n COALESCE(final_stats.total_responses, 0) as final_total_responses,\n COALESCE(final_stats.responded_count, 0) as final_responded_count,\n COALESCE(final_stats.up_to_date_count, 0) as final_up_to_date_count,\n COALESCE(final_stats.version_mismatch_count, 0) as final_version_mismatch_count,\n COALESCE(final_stats.response_rate, 0) as final_response_rate,\n COALESCE(final_stats.version_match_rate, 0) as final_version_match_rate,\n \n COALESCE(file_stats.total_files, 0) as total_response_files\n \n FROM b_rfqs br\n LEFT JOIN (\n SELECT \n ba.rfq_id,\n COUNT(*) as total_attachments,\n COUNT(CASE WHEN rev_count.total_revisions > 1 THEN 1 END) as attachments_with_multiple_revisions,\n SUM(rev_count.total_revisions) as total_client_revisions\n FROM b_rfq_attachments ba\n LEFT JOIN (\n SELECT \n attachment_id,\n COUNT(*) as total_revisions\n FROM b_rfq_attachment_revisions\n GROUP BY attachment_id\n ) rev_count ON ba.id = rev_count.attachment_id\n GROUP BY ba.rfq_id\n ) attachment_stats ON br.id = attachment_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(DISTINCT var.vendor_id) as vendor_count,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) as up_to_date_count,\n COUNT(CASE WHEN vrd.effective_status = 'VERSION_MISMATCH' THEN 1 END) as version_mismatch_count,\n ROUND(\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(*), 0), 2\n ) as response_rate,\n ROUND(\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END), 0), 2\n ) as version_match_rate\n FROM b_rfqs br\n JOIN vendor_response_detail vrd ON br.id = vrd.rfq_id\n JOIN vendor_attachment_responses var ON vrd.response_id = var.id\n WHERE var.rfq_type = 'INITIAL'\n GROUP BY br.id\n ) initial_stats ON br.id = initial_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(DISTINCT var.vendor_id) as vendor_count,\n COUNT(*) as total_responses,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) as up_to_date_count,\n COUNT(CASE WHEN vrd.effective_status = 'VERSION_MISMATCH' THEN 1 END) as version_mismatch_count,\n ROUND(\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(*), 0), 2\n ) as response_rate,\n ROUND(\n COUNT(CASE WHEN vrd.effective_status = 'UP_TO_DATE' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END), 0), 2\n ) as version_match_rate\n FROM b_rfqs br\n JOIN vendor_response_detail vrd ON br.id = vrd.rfq_id\n JOIN vendor_attachment_responses var ON vrd.response_id = var.id\n WHERE var.rfq_type = 'FINAL'\n GROUP BY br.id\n ) final_stats ON br.id = final_stats.rfq_id\n \n LEFT JOIN (\n SELECT \n br.id as rfq_id,\n COUNT(vra.id) as total_files\n FROM b_rfqs br\n JOIN b_rfq_attachments ba ON br.id = ba.rfq_id\n JOIN vendor_attachment_responses var ON ba.id = var.attachment_id\n LEFT JOIN vendor_response_attachments_b vra ON var.id = vra.vendor_response_id\n GROUP BY br.id\n ) file_stats ON br.id = file_stats.rfq_id\n",
+ "name": "rfq_progress_summary",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_attachments_enhanced": {
+ "columns": {
+ "response_attachment_id": {
+ "name": "response_attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_response_id": {
+ "name": "vendor_response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "original_file_name": {
+ "name": "original_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_type": {
+ "name": "file_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uploaded_at": {
+ "name": "uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_id": {
+ "name": "latest_client_revision_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_no": {
+ "name": "latest_client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_name": {
+ "name": "latest_client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_version_matched": {
+ "name": "is_version_matched",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version_lag": {
+ "name": "version_lag",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "needs_update": {
+ "name": "needs_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_sequence": {
+ "name": "file_sequence",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_latest_response_file": {
+ "name": "is_latest_response_file",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n vra.id as response_attachment_id,\n vra.vendor_response_id,\n vra.file_name,\n vra.original_file_name,\n vra.file_path,\n vra.file_size,\n vra.file_type,\n vra.description,\n vra.uploaded_at,\n \n -- 응답 기본 정보\n var.attachment_id,\n var.vendor_id,\n var.rfq_type,\n var.rfq_record_id,\n var.response_status,\n var.current_revision,\n var.responded_revision,\n \n -- 코멘트 (새로 추가된 필드 포함)\n var.response_comment,\n var.vendor_comment,\n var.revision_request_comment,\n \n -- 날짜 (새로 추가된 필드 포함)\n var.requested_at,\n var.responded_at,\n var.revision_requested_at,\n \n -- 첨부파일 정보\n ba.attachment_type,\n ba.serial_no,\n ba.rfq_id,\n \n -- 벤더 정보\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n \n -- 발주처 현재 리비전 정보\n latest_rev.id as latest_client_revision_id,\n latest_rev.revision_no as latest_client_revision_no,\n latest_rev.original_file_name as latest_client_file_name,\n \n -- 리비전 비교\n CASE \n WHEN var.responded_revision = ba.current_revision THEN true \n ELSE false \n END as is_version_matched,\n \n -- 버전 차이 계산 (Rev.0, Rev.1 형태 가정)\n CASE \n WHEN var.responded_revision IS NULL THEN NULL\n WHEN ba.current_revision IS NULL THEN NULL\n ELSE CAST(SUBSTRING(ba.current_revision FROM '[0-9]+') AS INTEGER) - \n CAST(SUBSTRING(var.responded_revision FROM '[0-9]+') AS INTEGER)\n END as version_lag,\n \n CASE \n WHEN var.response_status = 'RESPONDED' \n AND var.responded_revision != ba.current_revision THEN true \n ELSE false \n END as needs_update,\n \n -- 파일 순서\n ROW_NUMBER() OVER (\n PARTITION BY var.id \n ORDER BY vra.uploaded_at DESC\n ) as file_sequence,\n \n -- 최신 응답 파일 여부\n CASE \n WHEN ROW_NUMBER() OVER (\n PARTITION BY var.id \n ORDER BY vra.uploaded_at DESC\n ) = 1 THEN true \n ELSE false \n END as is_latest_response_file\n \n FROM vendor_response_attachments_b vra\n JOIN vendor_attachment_responses var ON vra.vendor_response_id = var.id\n JOIN b_rfq_attachments ba ON var.attachment_id = ba.id\n LEFT JOIN vendors v ON var.vendor_id = v.id\n LEFT JOIN b_rfq_attachment_revisions latest_rev ON ba.latest_revision_id = latest_rev.id\n",
+ "name": "vendor_response_attachments_enhanced",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_detail": {
+ "columns": {
+ "response_id": {
+ "name": "response_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_record_id": {
+ "name": "rfq_record_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_id": {
+ "name": "attachment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_type": {
+ "name": "attachment_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_no": {
+ "name": "serial_no",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attachment_description": {
+ "name": "attachment_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "current_revision": {
+ "name": "current_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_revision": {
+ "name": "responded_revision",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_comment": {
+ "name": "response_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_comment": {
+ "name": "vendor_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_request_comment": {
+ "name": "revision_request_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_at": {
+ "name": "revision_requested_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_no": {
+ "name": "latest_client_revision_no",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_name": {
+ "name": "latest_client_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_file_size": {
+ "name": "latest_client_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_client_revision_comment": {
+ "name": "latest_client_revision_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_version_matched": {
+ "name": "is_version_matched",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version_lag": {
+ "name": "version_lag",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "needs_update": {
+ "name": "needs_update",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_multiple_revisions": {
+ "name": "has_multiple_revisions",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_response_files": {
+ "name": "total_response_files",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_file_name": {
+ "name": "latest_response_file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_file_size": {
+ "name": "latest_response_file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_response_uploaded_at": {
+ "name": "latest_response_uploaded_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "effective_status": {
+ "name": "effective_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n var.id as response_id,\n ba.rfq_id,\n br.rfq_code,\n var.rfq_type,\n var.rfq_record_id,\n \n -- 첨부파일 정보\n ba.id as attachment_id,\n ba.attachment_type,\n ba.serial_no,\n ba.description as attachment_description,\n \n -- 벤더 정보\n v.id as vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n \n -- 응답 상태\n var.response_status,\n var.current_revision,\n var.responded_revision,\n \n -- 코멘트 (새로 추가된 필드 포함)\n var.response_comment,\n var.vendor_comment,\n var.revision_request_comment,\n \n -- 날짜 (새로 추가된 필드 포함)\n var.requested_at,\n var.responded_at,\n var.revision_requested_at,\n \n -- 발주처 최신 리비전\n latest_rev.revision_no as latest_client_revision_no,\n latest_rev.original_file_name as latest_client_file_name,\n latest_rev.file_size as latest_client_file_size,\n latest_rev.revision_comment as latest_client_revision_comment,\n \n -- 리비전 분석\n CASE \n WHEN var.responded_revision = ba.current_revision THEN true \n ELSE false \n END as is_version_matched,\n \n CASE \n WHEN var.responded_revision IS NULL OR ba.current_revision IS NULL THEN NULL\n ELSE CAST(SUBSTRING(ba.current_revision FROM '[0-9]+') AS INTEGER) - \n CAST(SUBSTRING(var.responded_revision FROM '[0-9]+') AS INTEGER)\n END as version_lag,\n \n CASE \n WHEN var.response_status = 'RESPONDED' \n AND var.responded_revision != ba.current_revision THEN true \n ELSE false \n END as needs_update,\n \n CASE \n WHEN revision_count.total_revisions > 1 THEN true \n ELSE false \n END as has_multiple_revisions,\n \n -- 응답 파일 정보\n COALESCE(file_stats.total_files, 0) as total_response_files,\n file_stats.latest_file_name as latest_response_file_name,\n file_stats.latest_file_size as latest_response_file_size,\n file_stats.latest_uploaded_at as latest_response_uploaded_at,\n \n -- 효과적인 상태\n CASE \n WHEN var.response_status = 'NOT_RESPONDED' THEN 'NOT_RESPONDED'\n WHEN var.response_status = 'WAIVED' THEN 'WAIVED'\n WHEN var.response_status = 'REVISION_REQUESTED' THEN 'REVISION_REQUESTED'\n WHEN var.response_status = 'RESPONDED' AND var.responded_revision = ba.current_revision THEN 'UP_TO_DATE'\n WHEN var.response_status = 'RESPONDED' AND var.responded_revision != ba.current_revision THEN 'VERSION_MISMATCH'\n ELSE var.response_status\n END as effective_status\n \n FROM vendor_attachment_responses var\n JOIN b_rfq_attachments ba ON var.attachment_id = ba.id\n JOIN b_rfqs br ON ba.rfq_id = br.id\n LEFT JOIN vendors v ON var.vendor_id = v.id\n LEFT JOIN b_rfq_attachment_revisions latest_rev ON ba.latest_revision_id = latest_rev.id\n LEFT JOIN (\n SELECT \n attachment_id,\n COUNT(*) as total_revisions\n FROM b_rfq_attachment_revisions\n GROUP BY attachment_id\n ) revision_count ON ba.id = revision_count.attachment_id\n LEFT JOIN (\n SELECT \n vendor_response_id,\n COUNT(*) as total_files,\n MAX(original_file_name) as latest_file_name,\n MAX(file_size) as latest_file_size,\n MAX(uploaded_at) as latest_uploaded_at\n FROM vendor_response_attachments_b\n GROUP BY vendor_response_id\n ) file_stats ON var.id = file_stats.vendor_response_id\n",
+ "name": "vendor_response_detail",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.vendor_response_summary": {
+ "columns": {
+ "rfq_id": {
+ "name": "rfq_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_code": {
+ "name": "rfq_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_status": {
+ "name": "rfq_status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_country": {
+ "name": "vendor_country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_business_size": {
+ "name": "vendor_business_size",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rfq_type": {
+ "name": "rfq_type",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_attachments": {
+ "name": "total_attachments",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "responded_count": {
+ "name": "responded_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pending_count": {
+ "name": "pending_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "waived_count": {
+ "name": "waived_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision_requested_count": {
+ "name": "revision_requested_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_rate": {
+ "name": "response_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "completion_rate": {
+ "name": "completion_rate",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT \n br.id as rfq_id,\n br.rfq_code,\n br.status as rfq_status,\n v.id as vendor_id,\n v.vendor_code,\n v.vendor_name,\n v.country as vendor_country,\n v.business_size as vendor_business_size,\n var.rfq_type,\n COUNT(var.id) as total_attachments,\n COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) as responded_count,\n COUNT(CASE WHEN var.response_status = 'NOT_RESPONDED' THEN 1 END) as pending_count,\n COUNT(CASE WHEN var.response_status = 'WAIVED' THEN 1 END) as waived_count,\n COUNT(CASE WHEN var.response_status = 'REVISION_REQUESTED' THEN 1 END) as revision_requested_count,\n ROUND(\n (COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) * 100.0 / \n NULLIF(COUNT(CASE WHEN var.response_status != 'WAIVED' THEN 1 END), 0)), \n 2\n ) as response_rate,\n ROUND(\n ((COUNT(CASE WHEN var.response_status = 'RESPONDED' THEN 1 END) + \n COUNT(CASE WHEN var.response_status = 'WAIVED' THEN 1 END)) * 100.0 / COUNT(var.id)), \n 2\n ) as completion_rate\n FROM b_rfqs br\n JOIN b_rfq_attachments bra ON br.id = bra.rfq_id\n JOIN vendor_attachment_responses var ON bra.id = var.attachment_id\n JOIN vendors v ON var.vendor_id = v.id\n GROUP BY br.id, br.rfq_code, br.status, v.id, v.vendor_code, v.vendor_name, v.country, v.business_size, var.rfq_type\n",
+ "name": "vendor_response_summary",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.tech_vendor_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "address": {
+ "name": "address",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country": {
+ "name": "country",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_eng": {
+ "name": "country_eng",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "country_fab": {
+ "name": "country_fab",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_name": {
+ "name": "agent_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_phone": {
+ "name": "agent_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "agent_email": {
+ "name": "agent_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "website": {
+ "name": "website",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ACTIVE'"
+ },
+ "tech_vendor_type": {
+ "name": "tech_vendor_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "representative_name": {
+ "name": "representative_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_email": {
+ "name": "representative_email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_phone": {
+ "name": "representative_phone",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "representative_birth": {
+ "name": "representative_birth",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"id\", \"vendor_name\", \"vendor_code\", \"tax_id\", \"address\", \"country\", \"country_eng\", \"country_fab\", \"agent_name\", \"agent_phone\", \"agent_email\", \"phone\", \"email\", \"website\", \"status\", \"tech_vendor_type\", \"representative_name\", \"representative_email\", \"representative_phone\", \"representative_birth\", \"created_at\", \"updated_at\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', c.id,\n 'contactName', c.contact_name,\n 'contactPosition', c.contact_position,\n 'contactTitle', c.contact_title,\n 'contactEmail', c.contact_email,\n 'contactPhone', c.contact_phone,\n 'isPrimary', c.is_primary\n )\n ),\n '[]'::json\n )\n FROM tech_vendor_contacts c\n WHERE c.vendor_id = tech_vendors.id)\n as \"contacts\", \n (SELECT COALESCE(\n json_agg(\n json_build_object(\n 'id', a.id,\n 'fileName', a.file_name,\n 'filePath', a.file_path,\n 'attachmentType', a.attachment_type,\n 'createdAt', a.created_at\n )\n ORDER BY a.attachment_type, a.created_at DESC\n ),\n '[]'::json\n )\n FROM tech_vendor_attachments a\n WHERE a.vendor_id = tech_vendors.id)\n as \"attachments\", \n (SELECT COUNT(*)\n FROM tech_vendor_attachments a\n WHERE a.vendor_id = tech_vendors.id)\n as \"attachment_count\", \n (SELECT COUNT(*) \n FROM vendor_contacts c\n WHERE c.vendor_id = tech_vendors.id)\n as \"contact_count\", \n (SELECT COUNT(*) \n FROM tech_vendor_possible_items i\n WHERE i.vendor_id = tech_vendors.id)\n as \"item_count\" from \"tech_vendors\"",
+ "name": "tech_vendor_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.esg_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serial_number": {
+ "name": "serial_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inspection_item": {
+ "name": "inspection_item",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"esg_evaluations\".\"id\", \"esg_evaluations\".\"serial_number\", \"esg_evaluations\".\"category\", \"esg_evaluations\".\"inspection_item\", \"esg_evaluations\".\"is_active\", \"esg_evaluations\".\"created_at\", \"esg_evaluations\".\"updated_at\", count(distinct \"esg_evaluation_items\".\"id\") as \"total_evaluation_items\", count(\"esg_answer_options\".\"id\") as \"total_answer_options\", coalesce(sum(\"esg_answer_options\".\"score\"), 0) as \"max_possible_score\", \n (\n SELECT array_agg(evaluation_item order by order_index) \n FROM esg_evaluation_items \n WHERE esg_evaluation_id = \"esg_evaluations\".\"id\" \n AND is_active = true \n AND evaluation_item is not null\n )\n as \"evaluation_items_list\" from \"esg_evaluations\" left join \"esg_evaluation_items\" on \"esg_evaluations\".\"id\" = \"esg_evaluation_items\".\"esg_evaluation_id\" AND \"esg_evaluation_items\".\"is_active\" = true left join \"esg_answer_options\" on \"esg_evaluation_items\".\"id\" = \"esg_answer_options\".\"esg_evaluation_item_id\" AND \"esg_answer_options\".\"is_active\" = true group by \"esg_evaluations\".\"id\", \"esg_evaluations\".\"serial_number\", \"esg_evaluations\".\"category\", \"esg_evaluations\".\"inspection_item\", \"esg_evaluations\".\"is_active\", \"esg_evaluations\".\"created_at\", \"esg_evaluations\".\"updated_at\"",
+ "name": "esg_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.evaluation_targets_with_departments": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"evaluation_targets\".\"id\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"evaluation_targets\".\"status\", \"evaluation_targets\".\"consensus_status\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"confirmed_at\", \"evaluation_targets\".\"confirmed_by\", \"evaluation_targets\".\"ld_claim_count\", \"evaluation_targets\".\"ld_claim_amount\", \"evaluation_targets\".\"ld_claim_currency\", \"evaluation_targets\".\"created_at\", \"evaluation_targets\".\"updated_at\", order_reviewer.name as \"order_reviewer_name\", order_reviewer.email as \"order_reviewer_email\", order_etr.department_name_from as \"order_department_name\", order_review.is_approved as \"order_is_approved\", order_review.reviewed_at as \"order_reviewed_at\", procurement_reviewer.name as \"procurement_reviewer_name\", procurement_reviewer.email as \"procurement_reviewer_email\", procurement_etr.department_name_from as \"procurement_department_name\", procurement_review.is_approved as \"procurement_is_approved\", procurement_review.reviewed_at as \"procurement_reviewed_at\", quality_reviewer.name as \"quality_reviewer_name\", quality_reviewer.email as \"quality_reviewer_email\", quality_etr.department_name_from as \"quality_department_name\", quality_review.is_approved as \"quality_is_approved\", quality_review.reviewed_at as \"quality_reviewed_at\", design_reviewer.name as \"design_reviewer_name\", design_reviewer.email as \"design_reviewer_email\", design_etr.department_name_from as \"design_department_name\", design_review.is_approved as \"design_is_approved\", design_review.reviewed_at as \"design_reviewed_at\", cs_reviewer.name as \"cs_reviewer_name\", cs_reviewer.email as \"cs_reviewer_email\", cs_etr.department_name_from as \"cs_department_name\", cs_review.is_approved as \"cs_is_approved\", cs_review.reviewed_at as \"cs_reviewed_at\" from \"evaluation_targets\" left join evaluation_target_reviewers order_etr on \"evaluation_targets\".\"id\" = order_etr.evaluation_target_id AND order_etr.department_code = 'ORDER_EVAL' left join users order_reviewer on order_etr.reviewer_user_id = order_reviewer.id left join evaluation_target_reviews order_review on \"evaluation_targets\".\"id\" = order_review.evaluation_target_id \n AND order_review.reviewer_user_id = order_reviewer.id \n AND order_review.department_code = 'ORDER_EVAL' left join evaluation_target_reviewers procurement_etr on \"evaluation_targets\".\"id\" = procurement_etr.evaluation_target_id AND procurement_etr.department_code = 'PROCUREMENT_EVAL' left join users procurement_reviewer on procurement_etr.reviewer_user_id = procurement_reviewer.id left join evaluation_target_reviews procurement_review on \"evaluation_targets\".\"id\" = procurement_review.evaluation_target_id \n AND procurement_review.reviewer_user_id = procurement_reviewer.id \n AND procurement_review.department_code = 'PROCUREMENT_EVAL' left join evaluation_target_reviewers quality_etr on \"evaluation_targets\".\"id\" = quality_etr.evaluation_target_id AND quality_etr.department_code = 'QUALITY_EVAL' left join users quality_reviewer on quality_etr.reviewer_user_id = quality_reviewer.id left join evaluation_target_reviews quality_review on \"evaluation_targets\".\"id\" = quality_review.evaluation_target_id \n AND quality_review.reviewer_user_id = quality_reviewer.id \n AND quality_review.department_code = 'QUALITY_EVAL' left join evaluation_target_reviewers design_etr on \"evaluation_targets\".\"id\" = design_etr.evaluation_target_id AND design_etr.department_code = 'DESIGN_EVAL' left join users design_reviewer on design_etr.reviewer_user_id = design_reviewer.id left join evaluation_target_reviews design_review on \"evaluation_targets\".\"id\" = design_review.evaluation_target_id \n AND design_review.reviewer_user_id = design_reviewer.id \n AND design_review.department_code = 'DESIGN_EVAL' left join evaluation_target_reviewers cs_etr on \"evaluation_targets\".\"id\" = cs_etr.evaluation_target_id AND cs_etr.department_code = 'CS_EVAL' left join users cs_reviewer on cs_etr.reviewer_user_id = cs_reviewer.id left join evaluation_target_reviews cs_review on \"evaluation_targets\".\"id\" = cs_review.evaluation_target_id \n AND cs_review.reviewer_user_id = cs_reviewer.id \n AND cs_review.department_code = 'CS_EVAL'",
+ "name": "evaluation_targets_with_departments",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.periodic_evaluations_aggregated_view": {
+ "columns": {
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select CONCAT(\"evaluation_year\", '_', \"vendor_id\") as \"id\", \"evaluation_year\", \"vendor_id\", \"vendor_code\", \"vendor_name\", \"domestic_foreign\", \"material_type\", ROUND(AVG(NULLIF(\"process_score\", 0)), 1) as \"process_score\", ROUND(AVG(NULLIF(\"price_score\", 0)), 1) as \"price_score\", ROUND(AVG(NULLIF(\"delivery_score\", 0)), 1) as \"delivery_score\", ROUND(AVG(NULLIF(\"self_evaluation_score\", 0)), 1) as \"self_evaluation_score\", ROUND(AVG(NULLIF(\"participation_bonus\", 0)), 1) as \"participation_bonus\", ROUND(AVG(NULLIF(\"quality_deduction\", 0)), 1) as \"quality_deduction\", ROUND(AVG(NULLIF(\"final_score\", 0)), 1) as \"final_score\", \n CASE \n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 90 THEN 'S'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 80 THEN 'A'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 70 THEN 'B'\n WHEN (\n AVG(NULLIF(\"process_score\", 0)) + \n AVG(NULLIF(\"price_score\", 0)) + \n AVG(NULLIF(\"delivery_score\", 0)) + \n AVG(NULLIF(\"self_evaluation_score\", 0)) +\n AVG(NULLIF(\"participation_bonus\", 0)) - \n AVG(NULLIF(\"quality_deduction\", 0))\n ) >= 60 THEN 'C'\n ELSE 'D'\n END\n as \"evaluation_grade\", \n CASE \n WHEN AVG(NULLIF(\"final_score\", 0)) >= 90 THEN 'S'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 80 THEN 'A'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 70 THEN 'B'\n WHEN AVG(NULLIF(\"final_score\", 0)) >= 60 THEN 'C'\n ELSE 'D'\n END\n as \"final_grade\", \n CASE \n WHEN COUNT(CASE WHEN \"status\" = 'FINALIZED' THEN 1 END) = COUNT(*) THEN 'FINALIZED'\n WHEN COUNT(CASE WHEN \"status\" IN ('REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) = COUNT(*) THEN 'REVIEW_COMPLETED'\n WHEN COUNT(CASE WHEN \"status\" IN ('IN_REVIEW', 'REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) > 0 THEN 'IN_REVIEW'\n WHEN COUNT(CASE WHEN \"status\" IN ('SUBMITTED', 'IN_REVIEW', 'REVIEW_COMPLETED', 'FINALIZED') THEN 1 END) > 0 THEN 'SUBMITTED'\n ELSE 'PENDING_SUBMISSION'\n END\n as \"status\", \n CASE \n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"order_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"order_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"procurement_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"procurement_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"quality_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"quality_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"design_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"design_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"cs_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"cs_eval_status\", \n CASE \n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'COMPLETED' THEN 1 END) > 0 THEN 'COMPLETED'\n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'IN_PROGRESS' THEN 1 END) > 0 THEN 'IN_PROGRESS'\n WHEN COUNT(CASE WHEN \"admin_eval_status\" = 'NOT_STARTED' THEN 1 END) > 0 THEN 'NOT_STARTED'\n ELSE 'NOT_ASSIGNED'\n END\n as \"admin_eval_status\", \n BOOL_AND(\"documents_submitted\")\n as \"documents_submitted\", MAX(\"submission_date\") as \"submission_date\", MAX(\"submission_deadline\") as \"submission_deadline\", MAX(\"review_completed_at\") as \"review_completed_at\", MAX(\"finalized_at\") as \"finalized_at\", \n CASE \n WHEN COUNT(DISTINCT \"division\") > 1 THEN 'BOTH'\n ELSE MAX(\"division\")\n END\n as \"division\", COUNT(*)::int as \"evaluation_count\", STRING_AGG(DISTINCT \"division\", ',') as \"divisions\", SUM(\"total_reviewers\")::int as \"total_reviewers\", SUM(\"completed_reviewers\")::int as \"completed_reviewers\", SUM(\"pending_reviewers\")::int as \"pending_reviewers\", MAX(\"evaluation_period\") as \"evaluation_period\", STRING_AGG(\"evaluation_note\", ' | ') as \"evaluation_note\", (ARRAY_AGG(\"periodic_evaluations_view\".\"finalized_by\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by\", (ARRAY_AGG(\"periodic_evaluations_view\".\"name\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by_user_name\", (ARRAY_AGG(\"periodic_evaluations_view\".\"email\" ORDER BY \"periodic_evaluations_view\".\"finalized_at\" DESC NULLS LAST))[1] as \"finalized_by_user_email\", MIN(\"created_at\") as \"created_at\", MAX(\"updated_at\") as \"updated_at\", (ARRAY_AGG(\"periodic_evaluations_view\".\"evaluation_target_id\"))[1] as \"evaluation_target_id\", \n STRING_AGG(DISTINCT \"admin_comment\", ' | ')\n as \"evaluation_target_admin_comment\", \n STRING_AGG(DISTINCT \"consolidated_comment\", ' | ')\n as \"evaluation_target_consolidated_comment\", (ARRAY_AGG(\"periodic_evaluations_view\".\"consensus_status\" ORDER BY \"periodic_evaluations_view\".\"updated_at\" DESC NULLS LAST))[1] as \"evaluation_target_consensus_status\", \n MAX(\"confirmed_at\")\n as \"evaluation_target_confirmed_at\" from \"periodic_evaluations_view\" group by \"periodic_evaluations_view\".\"evaluation_year\", \"periodic_evaluations_view\".\"vendor_id\", \"periodic_evaluations_view\".\"vendor_code\", \"periodic_evaluations_view\".\"vendor_name\", \"periodic_evaluations_view\".\"domestic_foreign\", \"periodic_evaluations_view\".\"material_type\"",
+ "name": "periodic_evaluations_aggregated_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.periodic_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "evaluation_target_id": {
+ "name": "evaluation_target_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consensus_status": {
+ "name": "consensus_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"periodic_evaluations\".\"id\", \"periodic_evaluations\".\"evaluation_target_id\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_id\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"periodic_evaluations\".\"evaluation_period\", \"periodic_evaluations\".\"documents_submitted\", \"periodic_evaluations\".\"submission_date\", \"periodic_evaluations\".\"submission_deadline\", \"periodic_evaluations\".\"final_score\", \"periodic_evaluations\".\"final_grade\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'processScore'\n AND re.is_completed = true\n ) as \"process_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'priceScore'\n AND re.is_completed = true\n ) as \"price_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'deliveryScore'\n AND re.is_completed = true\n ) as \"delivery_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'selfEvaluationScore'\n AND re.is_completed = true\n ) as \"self_evaluation_score\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'bonus'\n AND re.is_completed = true\n ) as \"participation_bonus\", (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n JOIN \"reg_eval_criteria_details\" recd ON red.reg_eval_criteria_details_id = recd.id\n JOIN \"reg_eval_criteria\" rec ON recd.criteria_id = rec.id\n JOIN \"reviewer_evaluations\" re ON red.reviewer_evaluation_id = re.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND rec.category2 = 'penalty'\n AND re.is_completed = true\n ) as \"quality_deduction\", \"periodic_evaluations\".\"status\", \"periodic_evaluations\".\"review_completed_at\", \"periodic_evaluations\".\"finalized_at\", \"periodic_evaluations\".\"finalized_by\", \"periodic_evaluations\".\"evaluation_note\", \"periodic_evaluations\".\"created_at\", \"periodic_evaluations\".\"updated_at\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"consensus_status\", \"evaluation_targets\".\"confirmed_at\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'ORDER_EVAL'\n LIMIT 1\n ) as \"order_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'PROCUREMENT_EVAL'\n LIMIT 1\n ) as \"procurement_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'QUALITY_EVAL'\n LIMIT 1\n ) as \"quality_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'DESIGN_EVAL'\n LIMIT 1\n ) as \"design_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'CS_EVAL'\n LIMIT 1\n ) as \"cs_eval_status\", (\n SELECT CASE\n WHEN re.id IS NULL THEN 'NOT_ASSIGNED'\n WHEN re.is_completed = true THEN 'COMPLETED'\n WHEN (\n SELECT COALESCE(SUM(CAST(red.score AS DECIMAL(5,2))), 0)\n FROM \"reviewer_evaluation_details\" red\n WHERE red.reviewer_evaluation_id = re.id\n ) > 0 THEN 'IN_PROGRESS'\n ELSE 'NOT_STARTED'\n END\n FROM \"reviewer_evaluations\" re\n JOIN \"evaluation_target_reviewers\" etr ON re.evaluation_target_reviewer_id = etr.id\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND etr.department_code = 'admin'\n LIMIT 1\n ) as \"admin_eval_status\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n ) as \"total_reviewers\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND re.is_completed = true\n ) as \"completed_reviewers\", (\n SELECT COUNT(*)::int\n FROM \"reviewer_evaluations\" re\n WHERE re.periodic_evaluation_id = \"periodic_evaluations\".\"id\"\n AND re.is_completed = false\n ) as \"pending_reviewers\", \"users\".\"name\", \"users\".\"email\" from \"periodic_evaluations\" left join \"evaluation_targets\" on \"periodic_evaluations\".\"evaluation_target_id\" = \"evaluation_targets\".\"id\" left join \"users\" on \"periodic_evaluations\".\"finalized_by\" = \"users\".\"id\" order by \"periodic_evaluations\".\"created_at\"",
+ "name": "periodic_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.reviewer_evaluations_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "periodic_evaluation_id": {
+ "name": "periodic_evaluation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "evaluation_target_reviewer_id": {
+ "name": "evaluation_target_reviewer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_completed": {
+ "name": "is_completed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_comment": {
+ "name": "reviewer_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "evaluation_period": {
+ "name": "evaluation_period",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "submitted_at": {
+ "name": "submitted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "documents_submitted": {
+ "name": "documents_submitted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "submission_date": {
+ "name": "submission_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_deadline": {
+ "name": "submission_deadline",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_score": {
+ "name": "final_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_grade": {
+ "name": "final_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_score": {
+ "name": "evaluation_score",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_grade": {
+ "name": "evaluation_grade",
+ "type": "varchar(5)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PENDING'"
+ },
+ "review_completed_at": {
+ "name": "review_completed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_at": {
+ "name": "finalized_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finalized_by": {
+ "name": "finalized_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_note": {
+ "name": "evaluation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_year": {
+ "name": "evaluation_year",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "division": {
+ "name": "division",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domestic_foreign": {
+ "name": "domestic_foreign",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material_type": {
+ "name": "material_type",
+ "type": "varchar(30)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consolidated_comment": {
+ "name": "consolidated_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_at": {
+ "name": "confirmed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmed_by": {
+ "name": "confirmed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ld_claim_count": {
+ "name": "ld_claim_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "ld_claim_amount": {
+ "name": "ld_claim_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0'"
+ },
+ "ld_claim_currency": {
+ "name": "ld_claim_currency",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "department_code": {
+ "name": "department_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "department_name_from": {
+ "name": "department_name_from",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer_user_id": {
+ "name": "reviewer_user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "assigned_by": {
+ "name": "assigned_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"reviewer_evaluations\".\"id\", \"reviewer_evaluations\".\"periodic_evaluation_id\", \"reviewer_evaluations\".\"evaluation_target_reviewer_id\", \"reviewer_evaluations\".\"is_completed\", \"reviewer_evaluations\".\"completed_at\", \"reviewer_evaluations\".\"reviewer_comment\", \"reviewer_evaluations\".\"created_at\", \"reviewer_evaluations\".\"updated_at\", \"periodic_evaluations\".\"evaluation_period\", \"reviewer_evaluations\".\"submitted_at\", \"periodic_evaluations\".\"documents_submitted\", \"periodic_evaluations\".\"submission_date\", \"periodic_evaluations\".\"submission_deadline\", \"periodic_evaluations\".\"final_score\", \"periodic_evaluations\".\"final_grade\", \"periodic_evaluations\".\"evaluation_score\", \"periodic_evaluations\".\"evaluation_grade\", \"periodic_evaluations\".\"status\", \"periodic_evaluations\".\"review_completed_at\", \"periodic_evaluations\".\"finalized_at\", \"periodic_evaluations\".\"finalized_by\", \"periodic_evaluations\".\"evaluation_note\", \"evaluation_targets\".\"evaluation_year\", \"evaluation_targets\".\"division\", \"evaluation_targets\".\"vendor_id\", \"evaluation_targets\".\"vendor_code\", \"evaluation_targets\".\"vendor_name\", \"evaluation_targets\".\"domestic_foreign\", \"evaluation_targets\".\"material_type\", \"evaluation_targets\".\"admin_comment\", \"evaluation_targets\".\"consolidated_comment\", \"evaluation_targets\".\"confirmed_at\", \"evaluation_targets\".\"confirmed_by\", \"evaluation_targets\".\"ld_claim_count\", \"evaluation_targets\".\"ld_claim_amount\", \"evaluation_targets\".\"ld_claim_currency\", \"evaluation_target_reviewers\".\"department_code\", \"evaluation_target_reviewers\".\"department_name_from\", \"evaluation_target_reviewers\".\"reviewer_user_id\", reviewer_user.name as \"reviewer_name\", reviewer_user.email as \"reviewer_email\", \"evaluation_target_reviewers\".\"assigned_at\", \"evaluation_target_reviewers\".\"assigned_by\", assigned_by_user.name as \"assigned_by_user_name\", finalized_by_user.name as \"finalized_by_user_name\", finalized_by_user.email as \"finalized_by_user_email\", \n CASE \n WHEN \"reviewer_evaluations\".\"is_completed\" = true THEN 'COMPLETED'\n ELSE 'NOT_STARTED'\n END\n as \"evaluation_progress\" from \"reviewer_evaluations\" left join \"periodic_evaluations\" on \"reviewer_evaluations\".\"periodic_evaluation_id\" = \"periodic_evaluations\".\"id\" left join \"evaluation_targets\" on \"periodic_evaluations\".\"evaluation_target_id\" = \"evaluation_targets\".\"id\" left join \"evaluation_target_reviewers\" on \"reviewer_evaluations\".\"evaluation_target_reviewer_id\" = \"evaluation_target_reviewers\".\"id\" left join users reviewer_user on \"evaluation_target_reviewers\".\"reviewer_user_id\" = reviewer_user.id left join users assigned_by_user on \"evaluation_target_reviewers\".\"assigned_by\" = assigned_by_user.id left join users finalized_by_user on \"periodic_evaluations\".\"finalized_by\" = finalized_by_user.id order by \"reviewer_evaluations\".\"is_completed\" ASC, \"reviewer_evaluations\".\"updated_at\" DESC",
+ "name": "reviewer_evaluations_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.reg_eval_criteria_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "criteria_id": {
+ "name": "criteria_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "category2": {
+ "name": "category2",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'processScore'"
+ },
+ "item": {
+ "name": "item",
+ "type": "varchar(32)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'quality'"
+ },
+ "classification": {
+ "name": "classification",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "range": {
+ "name": "range",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_index": {
+ "name": "order_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "score_equip_ship": {
+ "name": "score_equip_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_equip_marine": {
+ "name": "score_equip_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_ship": {
+ "name": "score_bulk_ship",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "score_bulk_marine": {
+ "name": "score_bulk_marine",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"reg_eval_criteria_details\".\"id\", \"reg_eval_criteria_details\".\"criteria_id\", \"reg_eval_criteria\".\"category\", \"reg_eval_criteria\".\"category2\", \"reg_eval_criteria\".\"item\", \"reg_eval_criteria\".\"classification\", \"reg_eval_criteria\".\"range\", \"reg_eval_criteria_details\".\"detail\", \"reg_eval_criteria_details\".\"order_index\", \"reg_eval_criteria_details\".\"score_equip_ship\", \"reg_eval_criteria_details\".\"score_equip_marine\", \"reg_eval_criteria_details\".\"score_bulk_ship\", \"reg_eval_criteria_details\".\"score_bulk_marine\", \"reg_eval_criteria\".\"remarks\" from \"reg_eval_criteria\" left join \"reg_eval_criteria_details\" on \"reg_eval_criteria\".\"id\" = \"reg_eval_criteria_details\".\"criteria_id\" order by \"reg_eval_criteria\".\"id\", \"reg_eval_criteria_details\".\"order_index\"",
+ "name": "reg_eval_criteria_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.project_gtc_view": {
+ "columns": {},
+ "definition": "select \"projects\".\"id\" as \"id\", \"projects\".\"code\" as \"code\", \"projects\".\"name\" as \"name\", \"projects\".\"type\" as \"type\", \"projects\".\"created_at\" as \"project_created_at\", \"projects\".\"updated_at\" as \"project_updated_at\", \"project_gtc_files\".\"id\" as \"gtc_file_id\", \"project_gtc_files\".\"file_name\" as \"fileName\", \"project_gtc_files\".\"file_path\" as \"filePath\", \"project_gtc_files\".\"original_file_name\" as \"originalFileName\", \"project_gtc_files\".\"file_size\" as \"fileSize\", \"project_gtc_files\".\"mime_type\" as \"mimeType\", \"project_gtc_files\".\"created_at\" as \"gtcCreatedAt\", \"project_gtc_files\".\"updated_at\" as \"gtcUpdatedAt\" from \"projects\" left join \"project_gtc_files\" on \"projects\".\"id\" = \"project_gtc_files\".\"project_id\"",
+ "name": "project_gtc_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_answer_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "qna_id": {
+ "name": "qna_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"qna_answer\".\"id\", \"qna_answer\".\"qna_id\", \"qna_answer\".\"content\", \"qna_answer\".\"author\", \"qna_answer\".\"created_at\" as \"created_at\", \"qna_answer\".\"updated_at\" as \"updated_at\", \"qna_answer\".\"is_deleted\" as \"is_deleted\", \"qna_answer\".\"deleted_at\" as \"deleted_at\", \"qna\".\"title\" as \"question_title\", \"qna\".\"category\" as \"question_category\", \"qna\".\"author\" as \"question_author\", \"qna\".\"created_at\" as \"question_created_at\", \"users\".\"name\" as \"author_name\", \"users\".\"email\" as \"author_email\", \"users\".\"domain\" as \"author_domain\", \"users\".\"phone\" as \"author_phone\", \"users\".\"image_url\" as \"author_image_url\", \"users\".\"language\" as \"author_language\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", \"tech_vendors\".\"vendor_code\" as \"tech_vendor_code\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", COALESCE(\"vendors\".\"vendor_code\", \"tech_vendors\".\"vendor_code\") as \"company_code\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"total_comments\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"comment_count\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.parent_comment_id IS NULL\n AND qc.is_deleted = false\n ) as \"parent_comments_count\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.parent_comment_id IS NOT NULL\n AND qc.is_deleted = false\n ) as \"child_comments_count\", (\n SELECT MAX(qc.created_at)\n FROM \"qna_comments\" qc\n WHERE qc.answer_id = \"qna_answer\".\"id\"\n AND qc.is_deleted = false\n ) as \"last_commented_at\", (\n SELECT ROW_NUMBER() OVER (\n PARTITION BY qa2.qna_id \n ORDER BY qa2.created_at ASC\n )\n FROM \"qna_answer\" qa2\n WHERE qa2.id = \"qna_answer\".\"id\"\n AND qa2.is_deleted = false\n ) as \"answer_order\", (\n \"qna_answer\".\"id\" = (\n SELECT qa2.id\n FROM \"qna_answer\" qa2\n WHERE qa2.qna_id = \"qna_answer\".\"qna_id\"\n AND qa2.is_deleted = false\n ORDER BY qa2.created_at ASC\n LIMIT 1\n )\n ) as \"is_first_answer\", (\n \"qna_answer\".\"id\" = (\n SELECT qa2.id\n FROM \"qna_answer\" qa2\n WHERE qa2.qna_id = \"qna_answer\".\"qna_id\"\n AND qa2.is_deleted = false\n ORDER BY qa2.created_at DESC\n LIMIT 1\n )\n ) as \"is_latest_answer\" from \"qna_answer\" left join \"qna\" on \"qna_answer\".\"qna_id\" = \"qna\".\"id\" left join \"users\" on \"qna_answer\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna_answer\".\"is_deleted\" = false order by \"qna_answer\".\"created_at\"",
+ "name": "qna_answer_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_comment_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "answer_id": {
+ "name": "answer_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_comment_id": {
+ "name": "parent_comment_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"qna_comments\".\"id\", \"qna_comments\".\"content\", \"qna_comments\".\"author\", \"qna_comments\".\"answer_id\", \"qna_comments\".\"parent_comment_id\", \"qna_comments\".\"created_at\" as \"created_at\", \"qna_comments\".\"updated_at\" as \"updated_at\", \"qna_comments\".\"is_deleted\" as \"is_deleted\", \"qna_comments\".\"deleted_at\" as \"deleted_at\", \"qna_answer\".\"content\" as \"answer_content\", \"qna_answer\".\"author\" as \"answer_author\", \"qna_answer\".\"created_at\" as \"answer_created_at\", \"qna_answer\".\"qna_id\" as \"qna_id\", \"qna\".\"title\" as \"question_title\", \"qna\".\"category\" as \"question_category\", \"qna\".\"author\" as \"question_author\", \"users\".\"name\" as \"author_name\", \"users\".\"email\" as \"author_email\", \"users\".\"domain\" as \"author_domain\", \"users\".\"image_url\" as \"author_image_url\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", \"qna_comments\".\"parent_comment_id\" IS NULL as \"is_parent_comment\", \"qna_comments\".\"parent_comment_id\" IS NOT NULL as \"is_child_comment\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc2\n WHERE qc2.parent_comment_id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"child_comments_count\", (\n SELECT COUNT(*) > 0\n FROM \"qna_comments\" qc2\n WHERE qc2.parent_comment_id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"has_child_comments\", \n CASE \n WHEN \"qna_comments\".\"parent_comment_id\" IS NULL THEN 0\n ELSE 1\n END\n as \"comment_depth\", (\n SELECT ROW_NUMBER() OVER (\n PARTITION BY qc2.answer_id, qc2.parent_comment_id\n ORDER BY qc2.created_at ASC\n )\n FROM \"qna_comments\" qc2\n WHERE qc2.id = \"qna_comments\".\"id\"\n AND qc2.is_deleted = false\n ) as \"comment_order\" from \"qna_comments\" left join \"qna_answer\" on \"qna_comments\".\"answer_id\" = \"qna_answer\".\"id\" left join \"qna\" on \"qna_answer\".\"qna_id\" = \"qna\".\"id\" left join \"users\" on \"qna_comments\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna_comments\".\"is_deleted\" = false order by \"qna_comments\".\"created_at\"",
+ "name": "qna_comment_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.qna_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author": {
+ "name": "author",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "qna_category",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_deleted": {
+ "name": "is_deleted",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domain": {
+ "name": "domain",
+ "type": "user_domain",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'partners'"
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'en'"
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "last_login_at": {
+ "name": "last_login_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"qna\".\"id\", \"qna\".\"title\", \"qna\".\"content\", \"qna\".\"author\", \"qna\".\"category\", \"qna\".\"created_at\", \"qna\".\"updated_at\", \"qna\".\"is_deleted\", \"qna\".\"deleted_at\", \"users\".\"name\", \"users\".\"email\", \"users\".\"domain\", \"users\".\"phone\", \"users\".\"image_url\", \"users\".\"language\", \"users\".\"is_active\", \"users\".\"last_login_at\", \"vendors\".\"vendor_name\" as \"vendor_name\", \"vendors\".\"vendor_code\" as \"vendor_code\", \"vendors\".\"status\" as \"vendor_status\", \"vendors\".\"country\" as \"vendor_country\", \"vendors\".\"business_size\" as \"vendor_business_size\", \"tech_vendors\".\"vendor_name\" as \"tech_vendor_name\", \"tech_vendors\".\"vendor_code\" as \"tech_vendor_code\", \"tech_vendors\".\"status\" as \"tech_vendor_status\", \"tech_vendors\".\"country\" as \"tech_vendor_country\", \"tech_vendors\".\"tech_vendor_type\" as \"tech_vendor_type\", COALESCE(\"vendors\".\"vendor_name\", \"tech_vendors\".\"vendor_name\") as \"company_name\", COALESCE(\"vendors\".\"vendor_code\", \"tech_vendors\".\"vendor_code\") as \"company_code\", COALESCE(\"vendors\".\"country\", \"tech_vendors\".\"country\") as \"company_country\", \n CASE \n WHEN \"vendors\".\"vendor_name\" IS NOT NULL THEN 'vendor'\n WHEN \"tech_vendors\".\"vendor_name\" IS NOT NULL THEN 'techVendor'\n ELSE NULL\n END\n as \"vendor_type\", (\n SELECT COUNT(*)::int\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"total_answers\", (\n SELECT COUNT(*)::int\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"answer_count\", (\n SELECT MAX(qa.created_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"last_answered_at\", (\n SELECT MIN(qa.created_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"first_answered_at\", (\n SELECT COUNT(*)::int\n FROM \"qna_comments\" qc\n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qc.is_deleted = false\n AND qa.is_deleted = false\n ) as \"total_comments\", (\n SELECT GREATEST(\n \"qna\".\"updated_at\",\n COALESCE((\n SELECT MAX(qa.updated_at)\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ), \"qna\".\"updated_at\"),\n COALESCE((\n SELECT MAX(qc.updated_at)\n FROM \"qna_comments\" qc\n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qc.is_deleted = false\n AND qa.is_deleted = false\n ), \"qna\".\"updated_at\")\n )\n ) as \"last_activity_at\", (\n SELECT COUNT(*) > 0\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"has_answers\", (\n SELECT COUNT(*) > 0\n FROM \"qna_answer\" qa\n WHERE qa.qna_id = \"qna\".\"id\"\n AND qa.is_deleted = false\n ) as \"is_answered\", (\n (SELECT COUNT(*) FROM \"qna_answer\" qa WHERE qa.qna_id = \"qna\".\"id\" AND qa.is_deleted = false) >= 3\n OR\n (SELECT COUNT(*) FROM \"qna_comments\" qc \n INNER JOIN \"qna_answer\" qa ON qc.answer_id = qa.id \n WHERE qa.qna_id = \"qna\".\"id\" AND qc.is_deleted = false AND qa.is_deleted = false) >= 5\n ) as \"is_popular\" from \"qna\" left join \"users\" on \"qna\".\"author\" = \"users\".\"id\" left join \"vendors\" on \"users\".\"company_id\" = \"vendors\".\"id\" left join \"tech_vendors\" on \"users\".\"tech_company_id\" = \"tech_vendors\".\"id\" where \"qna\".\"is_deleted\" = false order by \"qna\".\"created_at\"",
+ "name": "qna_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.template_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sample_data": {
+ "name": "sample_data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_email": {
+ "name": "created_by_email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variables": {
+ "name": "variables",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "\n SELECT\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.content,\n t.description,\n t.category,\n t.sample_data,\n t.is_active,\n t.version,\n t.created_by,\n u.name AS created_by_name,\n u.email AS created_by_email,\n t.created_at,\n t.updated_at,\n COALESCE(\n json_agg(\n json_build_object(\n 'id', v.id,\n 'variableName', v.variable_name,\n 'variableType', v.variable_type,\n 'defaultValue', v.default_value,\n 'isRequired', v.is_required,\n 'description', v.description,\n 'displayOrder', v.display_order\n ) ORDER BY v.display_order\n ) FILTER (WHERE v.id IS NOT NULL),\n '[]'::json\n ) AS variables\n FROM \"templates\" t\n LEFT JOIN \"users\" u ON t.created_by = u.id\n LEFT JOIN \"template_variables\" v ON t.id = v.template_id\n GROUP BY\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.content,\n t.description,\n t.category,\n t.sample_data,\n t.is_active,\n t.version,\n t.created_by,\n u.name,\n u.email,\n t.created_at,\n t.updated_at\n",
+ "name": "template_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.template_list_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "category": {
+ "name": "category",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_name": {
+ "name": "created_by_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_email": {
+ "name": "created_by_email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "variable_count": {
+ "name": "variable_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "required_variable_count": {
+ "name": "required_variable_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "\n SELECT\n t.id,\n t.name,\n t.slug,\n t.subject,\n t.description,\n t.category,\n t.is_active,\n t.version,\n t.created_by,\n u.name AS created_by_name,\n u.email AS created_by_email,\n t.created_at,\n t.updated_at,\n COALESCE(v.variable_count, 0) AS variable_count,\n COALESCE(v.required_variable_count, 0) AS required_variable_count\n FROM \"templates\" t\n LEFT JOIN \"users\" u ON t.created_by = u.id\n LEFT JOIN (\n SELECT\n template_id,\n COUNT(*) AS variable_count,\n COUNT(*) FILTER (WHERE is_required) AS required_variable_count\n FROM \"template_variables\"\n GROUP BY template_id\n ) v ON t.id = v.template_id\n",
+ "name": "template_list_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_clauses_tree_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "document_id": {
+ "name": "document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"gtc_clauses\".\"id\", \"gtc_clauses\".\"document_id\", \"gtc_clauses\".\"parent_id\", \"gtc_clauses\".\"item_number\", \"gtc_clauses\".\"category\", \"gtc_clauses\".\"subtitle\", \"gtc_clauses\".\"content\", \"gtc_clauses\".\"sort_order\", \"gtc_clauses\".\"depth\", \"gtc_clauses\".\"full_path\", \"gtc_clauses\".\"images\", \"gtc_clauses\".\"is_active\", \"gtc_clauses\".\"created_at\", \"gtc_clauses\".\"created_by_id\", \"gtc_clauses\".\"updated_at\", \"gtc_clauses\".\"updated_by_id\", \"gtc_clauses\".\"edit_reason\", \"gtc_documents\".\"type\", \"gtc_documents\".\"file_name\", \"gtc_documents\".\"revision\", \"gtc_documents\".\"project_id\", created_by_user.name as \"created_by_name\", created_by_user.email as \"created_by_email\", updated_by_user.name as \"updated_by_name\", updated_by_user.email as \"updated_by_email\", parent_clause.item_number as \"parent_item_number\", parent_clause.subtitle as \"parent_subtitle\", \n (\n SELECT count(*)\n FROM gtc_clauses children\n WHERE children.parent_id = \"gtc_clauses\".\"id\"\n AND children.is_active = true\n )\n as \"children_count\", \n (\n SELECT count(*)\n FROM gtc_clauses siblings\n WHERE siblings.parent_id = \"gtc_clauses\".\"parent_id\"\n AND siblings.is_active = true\n )\n as \"siblings_count\", \n \"gtc_clauses\".\"created_by_id\" != \"gtc_clauses\".\"updated_by_id\" OR \n \"gtc_clauses\".\"created_at\" != \"gtc_clauses\".\"updated_at\"\n as \"has_edit_history\" from \"gtc_clauses\" left join \"gtc_documents\" on \"gtc_clauses\".\"document_id\" = \"gtc_documents\".\"id\" left join users created_by_user on \"gtc_clauses\".\"created_by_id\" = created_by_user.id left join users updated_by_user on \"gtc_clauses\".\"updated_by_id\" = updated_by_user.id left join gtc_clauses parent_clause on \"gtc_clauses\".\"parent_id\" = parent_clause.id",
+ "name": "gtc_clauses_tree_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_documents_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_path": {
+ "name": "file_path",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "file_size": {
+ "name": "file_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_by_id": {
+ "name": "created_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by_id": {
+ "name": "updated_by_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "edit_reason": {
+ "name": "edit_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "code": {
+ "name": "code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "definition": "select \"gtc_documents\".\"id\", \"gtc_documents\".\"type\", \"gtc_documents\".\"project_id\", \"gtc_documents\".\"revision\", \"gtc_documents\".\"title\", \"gtc_documents\".\"file_name\", \"gtc_documents\".\"file_path\", \"gtc_documents\".\"file_size\", \"gtc_documents\".\"created_at\", \"gtc_documents\".\"created_by_id\", \"gtc_documents\".\"updated_at\", \"gtc_documents\".\"updated_by_id\", \"gtc_documents\".\"edit_reason\", \"gtc_documents\".\"is_active\", \"projects\".\"code\", \"projects\".\"name\", created_by_user.name as \"created_by_name\", created_by_user.email as \"created_by_email\", updated_by_user.name as \"updated_by_name\", updated_by_user.email as \"updated_by_email\", \n (\n SELECT count(*)\n FROM gtc_documents gd2\n WHERE gd2.type = \"gtc_documents\".\"type\"\n AND gd2.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd2.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd2.project_id IS NULL)\n )\n )\n as \"total_documents_in_group\", \n (\n SELECT max(revision)\n FROM gtc_documents gd3\n WHERE gd3.type = \"gtc_documents\".\"type\"\n AND gd3.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd3.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd3.project_id IS NULL)\n )\n )\n as \"latest_revision\", \n \"gtc_documents\".\"revision\" = (\n SELECT max(revision)\n FROM gtc_documents gd4\n WHERE gd4.type = \"gtc_documents\".\"type\"\n AND gd4.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd4.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd4.project_id IS NULL)\n )\n )\n as \"is_latest_revision\", \n (\n SELECT id\n FROM gtc_documents gd5\n WHERE gd5.type = \"gtc_documents\".\"type\"\n AND gd5.is_active = true\n AND gd5.revision < \"gtc_documents\".\"revision\"\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd5.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd5.project_id IS NULL)\n )\n ORDER BY gd5.revision DESC\n LIMIT 1\n )\n as \"previous_revision_id\", \n (\n SELECT id\n FROM gtc_documents gd6\n WHERE gd6.type = \"gtc_documents\".\"type\"\n AND gd6.is_active = true\n AND gd6.revision > \"gtc_documents\".\"revision\"\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd6.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd6.project_id IS NULL)\n )\n ORDER BY gd6.revision ASC\n LIMIT 1\n )\n as \"next_revision_id\", \n CASE \n WHEN \"gtc_documents\".\"file_size\" IS NULL THEN NULL\n WHEN \"gtc_documents\".\"file_size\" < 1024 THEN \"gtc_documents\".\"file_size\" || ' B'\n WHEN \"gtc_documents\".\"file_size\" < 1024 * 1024 THEN round(\"gtc_documents\".\"file_size\" / 1024.0, 1) || ' KB'\n WHEN \"gtc_documents\".\"file_size\" < 1024 * 1024 * 1024 THEN round(\"gtc_documents\".\"file_size\" / (1024.0 * 1024), 1) || ' MB'\n ELSE round(\"gtc_documents\".\"file_size\" / (1024.0 * 1024 * 1024), 1) || ' GB'\n END\n as \"file_size_formatted\", \n CASE \n WHEN \"gtc_documents\".\"project_id\" IS NOT NULL THEN (\n SELECT count(*)\n FROM gtc_documents gd7\n WHERE gd7.project_id = \"gtc_documents\".\"project_id\"\n AND gd7.is_active = true\n )\n ELSE NULL\n END\n as \"project_total_documents\", \n (\n SELECT array_agg(revision ORDER BY revision)\n FROM gtc_documents gd8\n WHERE gd8.type = \"gtc_documents\".\"type\"\n AND gd8.is_active = true\n AND (\n (\"gtc_documents\".\"type\" = 'project' AND gd8.project_id = \"gtc_documents\".\"project_id\") OR\n (\"gtc_documents\".\"type\" = 'standard' AND gd8.project_id IS NULL)\n )\n )\n as \"revision_history\", \n \"gtc_documents\".\"created_by_id\" != \"gtc_documents\".\"updated_by_id\" OR \n \"gtc_documents\".\"created_at\" != \"gtc_documents\".\"updated_at\"\n as \"has_edit_history\" from \"gtc_documents\" left join \"projects\" on \"gtc_documents\".\"project_id\" = \"projects\".\"id\" left join users created_by_user on \"gtc_documents\".\"created_by_id\" = created_by_user.id left join users updated_by_user on \"gtc_documents\".\"updated_by_id\" = updated_by_user.id",
+ "name": "gtc_documents_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.gtc_vendor_clauses_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "vendor_document_id": {
+ "name": "vendor_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_clause_id": {
+ "name": "base_clause_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_number_modified": {
+ "name": "is_number_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_category_modified": {
+ "name": "is_category_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_subtitle_modified": {
+ "name": "is_subtitle_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_content_modified": {
+ "name": "is_content_modified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "item_number": {
+ "name": "item_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_document_id": {
+ "name": "base_document_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "gtc_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "file_name": {
+ "name": "file_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_status": {
+ "name": "review_status",
+ "type": "review_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'draft'"
+ },
+ "negotiation_note": {
+ "name": "negotiation_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_excluded": {
+ "name": "is_excluded",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "depth": {
+ "name": "depth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "full_path": {
+ "name": "full_path",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"gtc_vendor_clauses\".\"id\", \"gtc_vendor_clauses\".\"vendor_document_id\", \"gtc_vendor_clauses\".\"base_clause_id\", \"gtc_vendor_clauses\".\"parent_id\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_item_number\", \"gtc_clauses\".\"item_number\")\n as \"effective_item_number\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_category\", \"gtc_clauses\".\"category\")\n as \"effective_category\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_subtitle\", \"gtc_clauses\".\"subtitle\")\n as \"effective_subtitle\", \n COALESCE(\"gtc_vendor_clauses\".\"modified_content\", \"gtc_clauses\".\"content\")\n as \"effective_content\", \"gtc_vendor_clauses\".\"is_number_modified\", \"gtc_vendor_clauses\".\"is_category_modified\", \"gtc_vendor_clauses\".\"is_subtitle_modified\", \"gtc_vendor_clauses\".\"is_content_modified\", \"gtc_clauses\".\"item_number\", \"gtc_clauses\".\"category\", \"gtc_clauses\".\"subtitle\", \"gtc_clauses\".\"content\", \"gtc_vendor_documents\".\"vendor_id\", \"vendors\".\"vendor_code\", \"vendors\".\"vendor_name\", \"gtc_vendor_documents\".\"base_document_id\", \"gtc_documents\".\"type\", \"gtc_documents\".\"file_name\", \"gtc_vendor_clauses\".\"review_status\", \"gtc_vendor_clauses\".\"negotiation_note\", \"gtc_vendor_clauses\".\"is_excluded\", \"gtc_vendor_clauses\".\"sort_order\", \"gtc_vendor_clauses\".\"depth\", \"gtc_vendor_clauses\".\"full_path\", \n \"gtc_vendor_clauses\".\"is_number_modified\" OR \n \"gtc_vendor_clauses\".\"is_category_modified\" OR \n \"gtc_vendor_clauses\".\"is_subtitle_modified\" OR \n \"gtc_vendor_clauses\".\"is_content_modified\"\n as \"has_modifications\", \"gtc_vendor_clauses\".\"created_at\", \"gtc_vendor_clauses\".\"updated_at\" from \"gtc_vendor_clauses\" left join \"gtc_clauses\" on \"gtc_vendor_clauses\".\"base_clause_id\" = \"gtc_clauses\".\"id\" left join \"gtc_vendor_documents\" on \"gtc_vendor_clauses\".\"vendor_document_id\" = \"gtc_vendor_documents\".\"id\" left join \"vendors\" on \"gtc_vendor_documents\".\"vendor_id\" = \"vendors\".\"id\" left join \"gtc_documents\" on \"gtc_vendor_documents\".\"base_document_id\" = \"gtc_documents\".\"id\"",
+ "name": "gtc_vendor_clauses_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.legal_works_detail_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "category": {
+ "name": "category",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(200)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_urgent": {
+ "name": "is_urgent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "request_date": {
+ "name": "request_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "consultation_date": {
+ "name": "consultation_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expected_answer_date": {
+ "name": "expected_answer_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_completion_date": {
+ "name": "legal_completion_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reviewer": {
+ "name": "reviewer",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "legal_responder": {
+ "name": "legal_responder",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_attachment": {
+ "name": "has_attachment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "review_department": {
+ "name": "review_department",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inquiry_type": {
+ "name": "inquiry_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "request_content": {
+ "name": "request_content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "contract_project_name": {
+ "name": "contract_project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_amount": {
+ "name": "contract_amount",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "definition": "select \"legal_works\".\"id\", \"legal_works\".\"category\", \"legal_works\".\"status\", \"legal_works\".\"company_id\", \"legal_works\".\"vendor_code\", \"legal_works\".\"vendor_name\", \"legal_works\".\"is_urgent\", \"legal_works\".\"request_date\", \"legal_works\".\"consultation_date\", \"legal_works\".\"expected_answer_date\", \"legal_works\".\"legal_completion_date\", \"legal_works\".\"reviewer\", \"legal_works\".\"legal_responder\", \"legal_works\".\"has_attachment\", \"legal_works\".\"created_at\", \"legal_works\".\"updated_at\", \"legal_work_requests\".\"review_department\", \"legal_work_requests\".\"inquiry_type\", \"legal_work_requests\".\"title\", \"legal_work_requests\".\"request_content\", \"legal_work_requests\".\"is_public\", \"legal_work_requests\".\"contract_project_name\", \"legal_work_requests\".\"contract_type\", \"legal_work_requests\".\"contract_amount\", (\n SELECT response_content \n FROM legal_work_responses lwr_latest \n WHERE lwr_latest.legal_work_id = \"legal_works\".\"id\" \n ORDER BY lwr_latest.created_at DESC \n LIMIT 1\n ) as \"response_content\", (\n SELECT COUNT(*)::integer \n FROM legal_work_attachments lwa \n WHERE lwa.legal_work_id = \"legal_works\".\"id\"\n ) as \"attachment_count\" from \"legal_works\" left join \"legal_work_requests\" on \"legal_works\".\"id\" = \"legal_work_requests\".\"legal_work_id\" left join \"vendors\" on \"legal_works\".\"company_id\" = \"vendors\".\"id\"",
+ "name": "legal_works_detail_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "public.bidding_list_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bidding_number": {
+ "name": "bidding_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "project_name": {
+ "name": "project_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "item_name": {
+ "name": "item_name",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(300)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contract_type": {
+ "name": "contract_type",
+ "type": "contract_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bidding_type": {
+ "name": "bidding_type",
+ "type": "bidding_type",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "award_count": {
+ "name": "award_count",
+ "type": "award_count",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'single'"
+ },
+ "contract_period": {
+ "name": "contract_period",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pre_quote_date": {
+ "name": "pre_quote_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bidding_registration_date": {
+ "name": "bidding_registration_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_start_date": {
+ "name": "submission_start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "submission_end_date": {
+ "name": "submission_end_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "evaluation_date": {
+ "name": "evaluation_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "has_specification_meeting": {
+ "name": "has_specification_meeting",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "has_pr_document": {
+ "name": "has_pr_document",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "pr_number": {
+ "name": "pr_number",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'KRW'"
+ },
+ "budget": {
+ "name": "budget",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_price": {
+ "name": "target_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "final_bid_price": {
+ "name": "final_bid_price",
+ "type": "numeric(15, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "bidding_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bidding_generated'"
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "manager_name": {
+ "name": "manager_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_email": {
+ "name": "manager_email",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "manager_phone": {
+ "name": "manager_phone",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remarks": {
+ "name": "remarks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_by": {
+ "name": "updated_by",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "meeting_date": {
+ "name": "meeting_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "location": {
+ "name": "location",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "contact_person": {
+ "name": "contact_person",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_required": {
+ "name": "is_required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "definition": "select \"biddings\".\"id\", \"biddings\".\"bidding_number\", \"biddings\".\"revision\", \"biddings\".\"project_name\", \"biddings\".\"item_name\", \"biddings\".\"title\", \"biddings\".\"description\", \"biddings\".\"content\", \"biddings\".\"contract_type\", \"biddings\".\"bidding_type\", \"biddings\".\"award_count\", \"biddings\".\"contract_period\", \"biddings\".\"pre_quote_date\", \"biddings\".\"bidding_registration_date\", \"biddings\".\"submission_start_date\", \"biddings\".\"submission_end_date\", \"biddings\".\"evaluation_date\", \"biddings\".\"has_specification_meeting\", \"biddings\".\"has_pr_document\", \"biddings\".\"pr_number\", \"biddings\".\"currency\", \"biddings\".\"budget\", \"biddings\".\"target_price\", \"biddings\".\"final_bid_price\", \"biddings\".\"status\", \"biddings\".\"is_public\", \"biddings\".\"manager_name\", \"biddings\".\"manager_email\", \"biddings\".\"manager_phone\", \"biddings\".\"remarks\", \"biddings\".\"created_by\", \"biddings\".\"created_at\", \"biddings\".\"updated_at\", \"biddings\".\"updated_by\", \"specification_meetings\".\"id\" IS NOT NULL as \"has_specification_meeting_details\", \"specification_meetings\".\"meeting_date\", \"specification_meetings\".\"location\", \"specification_meetings\".\"contact_person\", \"specification_meetings\".\"is_required\", \n COALESCE((\n SELECT count(*) \n FROM pr_documents \n WHERE bidding_id = \"biddings\".\"id\"\n ), 0)\n as \"pr_document_count\", \n (\n SELECT array_agg(document_name ORDER BY registered_at DESC)\n FROM pr_documents \n WHERE bidding_id = \"biddings\".\"id\"\n LIMIT 5\n )\n as \"pr_document_names\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ), 0)\n as \"participant_expected\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'submitted'\n ), 0)\n as \"participant_participated\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'declined'\n ), 0)\n as \"participant_declined\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status IN ('pending', 'sent')\n ), 0)\n as \"participant_pending\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'accepted'\n ), 0)\n as \"participant_accepted\", \n CASE \n WHEN (\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ) > 0 \n THEN ROUND(\n (\n SELECT count(*)::decimal \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND invitation_status = 'submitted'\n ) / (\n SELECT count(*)::decimal \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ) * 100, 1\n )\n ELSE 0 \n END\n as \"participation_rate\", \n (\n SELECT AVG(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"avg_pre_quote_amount\", \n (\n SELECT MIN(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"min_pre_quote_amount\", \n (\n SELECT MAX(pre_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND pre_quote_amount IS NOT NULL\n )\n as \"max_pre_quote_amount\", \n (\n SELECT AVG(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"avg_final_quote_amount\", \n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"min_final_quote_amount\", \n (\n SELECT MAX(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n )\n as \"max_final_quote_amount\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND is_pre_quote_selected = true\n ), 0)\n as \"selected_for_final_bid_count\", \n COALESCE((\n SELECT count(*) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND is_winner = true\n ), 0)\n as \"winner_count\", \n (\n SELECT array_agg(v.vendor_name ORDER BY v.vendor_name)\n FROM bidding_companies bc\n JOIN vendors v ON bc.company_id = v.id\n WHERE bc.bidding_id = \"biddings\".\"id\" \n AND bc.is_winner = true\n )\n as \"winner_company_names\", \n CASE \n WHEN \"biddings\".\"submission_start_date\" IS NULL OR \"biddings\".\"submission_end_date\" IS NULL \n THEN 'not_scheduled'\n WHEN NOW() < \"biddings\".\"submission_start_date\" \n THEN 'scheduled'\n WHEN NOW() BETWEEN \"biddings\".\"submission_start_date\" AND \"biddings\".\"submission_end_date\" \n THEN 'active'\n WHEN NOW() > \"biddings\".\"submission_end_date\" \n THEN 'closed'\n ELSE 'unknown'\n END\n as \"submission_status\", \n CASE \n WHEN \"biddings\".\"submission_end_date\" IS NOT NULL \n AND NOW() < \"biddings\".\"submission_end_date\" \n THEN EXTRACT(DAYS FROM (\"biddings\".\"submission_end_date\" - NOW()))::integer\n ELSE NULL \n END\n as \"days_until_deadline\", \n CASE \n WHEN \"biddings\".\"submission_start_date\" IS NOT NULL \n AND NOW() < \"biddings\".\"submission_start_date\" \n THEN EXTRACT(DAYS FROM (\"biddings\".\"submission_start_date\" - NOW()))::integer\n ELSE NULL \n END\n as \"days_until_start\", \n CASE \n WHEN \"biddings\".\"budget\" IS NOT NULL AND \"biddings\".\"budget\" > 0\n AND (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) IS NOT NULL\n THEN ROUND(\n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) / \"biddings\".\"budget\" * 100, 1\n )\n ELSE NULL \n END\n as \"budget_efficiency_rate\", \n CASE \n WHEN \"biddings\".\"target_price\" IS NOT NULL AND \"biddings\".\"target_price\" > 0\n AND (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) IS NOT NULL\n THEN ROUND(\n (\n SELECT MIN(final_quote_amount) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\" \n AND final_quote_amount IS NOT NULL\n ) / \"biddings\".\"target_price\" * 100, 1\n )\n ELSE NULL \n END\n as \"target_price_efficiency_rate\", \n CASE \"biddings\".\"status\"\n WHEN 'bidding_generated' THEN 10\n WHEN 'request_for_quotation' THEN 20\n WHEN 'received_quotation' THEN 40\n WHEN 'set_target_price' THEN 60\n WHEN 'bidding_opened' THEN 70\n WHEN 'bidding_closed' THEN 80\n WHEN 'evaluation_of_bidding' THEN 90\n WHEN 'vendor_selected' THEN 100\n WHEN 'bidding_disposal' THEN 0\n ELSE 0\n END\n as \"progress_score\", \n GREATEST(\n \"biddings\".\"updated_at\",\n COALESCE((\n SELECT MAX(updated_at) \n FROM bidding_companies \n WHERE bidding_id = \"biddings\".\"id\"\n ), \"biddings\".\"updated_at\")\n )\n as \"last_activity_date\" from \"biddings\" left join \"specification_meetings\" on \"biddings\".\"id\" = \"specification_meetings\".\"bidding_id\"",
+ "name": "bidding_list_view",
+ "schema": "public",
+ "isExisting": false,
+ "materialized": false
+ },
+ "risks.risks_view": {
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "event_type": {
+ "name": "event_type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_id": {
+ "name": "vendor_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vendor_code": {
+ "name": "vendor_code",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vendor_name": {
+ "name": "vendor_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tax_id": {
+ "name": "tax_id",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "varchar(128)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "event_status": {
+ "name": "event_status",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "manager_id": {
+ "name": "manager_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occurred_at": {
+ "name": "occurred_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "definition": "select \"risks\".\"risk_events\".\"id\", \"risks\".\"risk_events\".\"event_type\", \"risks\".\"risk_events\".\"vendor_id\", \"vendors\".\"vendor_code\", \"vendors\".\"vendor_name\", \"vendors\".\"tax_id\", \"risks\".\"risk_events\".\"provider\", \"risks\".\"risk_events\".\"content\", \"risks\".\"risk_events\".\"event_status\", \"risks\".\"risk_events\".\"manager_id\", \"users\".\"name\", \"risks\".\"risk_events\".\"admin_comment\", \"risks\".\"risk_events\".\"occurred_at\" from \"risks\".\"risk_events\" left join \"vendors\" on \"vendors\".\"id\" = \"risks\".\"risk_events\".\"vendor_id\" left join \"users\" on \"users\".\"id\" = \"risks\".\"risk_events\".\"manager_id\"",
+ "name": "risks_view",
+ "schema": "risks",
+ "isExisting": false,
+ "materialized": false
+ }
+ },
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/db/migrations/meta/_journal.json b/db/migrations/meta/_journal.json
index e9c8949d..13e1f337 100644
--- a/db/migrations/meta/_journal.json
+++ b/db/migrations/meta/_journal.json
@@ -2010,6 +2010,48 @@
"when": 1755078574136,
"tag": "0286_lyrical_azazel",
"breakpoints": true
+ },
+ {
+ "idx": 287,
+ "version": "7",
+ "when": 1755128000451,
+ "tag": "0287_busy_darkhawk",
+ "breakpoints": true
+ },
+ {
+ "idx": 288,
+ "version": "7",
+ "when": 1755128702559,
+ "tag": "0288_serious_iron_lad",
+ "breakpoints": true
+ },
+ {
+ "idx": 289,
+ "version": "7",
+ "when": 1755128873544,
+ "tag": "0289_watery_stryfe",
+ "breakpoints": true
+ },
+ {
+ "idx": 290,
+ "version": "7",
+ "when": 1755131430130,
+ "tag": "0290_conscious_avengers",
+ "breakpoints": true
+ },
+ {
+ "idx": 291,
+ "version": "7",
+ "when": 1755149442835,
+ "tag": "0291_stiff_big_bertha",
+ "breakpoints": true
+ },
+ {
+ "idx": 292,
+ "version": "7",
+ "when": 1755154732675,
+ "tag": "0292_aromatic_mandrill",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/db/schema/vendorDocu.ts b/db/schema/vendorDocu.ts
index 58c0ad29..789f2cd7 100644
--- a/db/schema/vendorDocu.ts
+++ b/db/schema/vendorDocu.ts
@@ -652,7 +652,7 @@ export const syncConfigs = pgTable(
"sync_configs",
{
id: serial("id").primaryKey(),
- projectId: integer("project_id").notNull(),
+ vendorId: integer("vendor_id").notNull(),
targetSystem: varchar("target_system", { length: 50 }).notNull(), // 'SHI', 'SAP' 등
syncEnabled: boolean("sync_enabled").default(true),
@@ -670,7 +670,7 @@ export const syncConfigs = pgTable(
(table) => {
return {
contractSystemIdx: index("idx_sync_configs_contract_system").on(
- table.projectId,
+ table.vendorId,
table.targetSystem
),
}
@@ -682,7 +682,7 @@ export const changeLogs = pgTable(
"change_logs",
{
id: serial("id").primaryKey(),
- projectId: integer("project_id").notNull(),
+ vendorId: integer("vendor_id").notNull(),
entityType: varchar("entity_type", { length: 50 }).notNull(), // 'document', 'revision', 'attachment'
entityId: integer("entity_id").notNull(),
@@ -701,8 +701,8 @@ export const changeLogs = pgTable(
},
(table) => {
return {
- projectSyncedIdx: index("idx_change_logs_project_synced").on(
- table.projectId,
+ vendorSyncedIdx: index("idx_change_logs_vendor_synced").on(
+ table.vendorId,
table.isSynced
),
createdAtIdx: index("idx_change_logs_created_at").on(table.createdAt),
@@ -717,7 +717,7 @@ export const syncBatches = pgTable(
"sync_batches",
{
id: serial("id").primaryKey(),
- projectId: integer("project_id").notNull(),
+ vendorId: integer("vendor_id").notNull(),
targetSystem: varchar("target_system", { length: 50 }).notNull(),
batchSize: integer("batch_size").notNull(),
@@ -736,7 +736,7 @@ export const syncBatches = pgTable(
(table) => {
return {
projectSystemIdx: index("idx_sync_batches_project_system").on(
- table.projectId,
+ table.vendorId,
table.targetSystem
),
statusIdx: index("idx_sync_batches_status").on(table.status),
@@ -747,7 +747,7 @@ export const syncBatches = pgTable(
// 동기화 상태 추적을 위한 뷰
export const syncStatusView = pgView("sync_status_view", {
- projectId: integer("project_id").notNull(),
+ vendorId: integer("vendor_id").notNull(),
targetSystem: varchar("target_system", { length: 50 }).notNull(),
totalChanges: integer("total_changes").notNull(),
pendingChanges: integer("pending_changes").notNull(),
@@ -759,7 +759,7 @@ export const syncStatusView = pgView("sync_status_view", {
}).as(sql`
WITH change_stats AS (
SELECT
- cl.project_id,
+ cl.vendor_id,
sc.target_system,
COUNT(*) as total_changes,
COUNT(CASE WHEN cl.is_synced = false AND cl.sync_attempts < sc.retry_max_attempts THEN 1 END) as pending_changes,
@@ -768,12 +768,12 @@ export const syncStatusView = pgView("sync_status_view", {
MAX(cl.synced_at) as last_sync_at
FROM change_logs cl
CROSS JOIN sync_configs sc
- WHERE cl.project_id = sc.project_id
+ WHERE cl.vendor_id = sc.vendor_id
AND (cl.target_systems IS NULL OR cl.target_systems @> to_jsonb(ARRAY[sc.target_system]))
- GROUP BY cl.project_id, sc.target_system
+ GROUP BY cl.vendor_id, sc.target_system
)
SELECT
- cs.project_id,
+ cs.vendor_id,
cs.target_system,
COALESCE(cs.total_changes, 0) as total_changes,
COALESCE(cs.pending_changes, 0) as pending_changes,
@@ -787,7 +787,7 @@ export const syncStatusView = pgView("sync_status_view", {
END as next_sync_at,
sc.sync_enabled
FROM sync_configs sc
- LEFT JOIN change_stats cs ON sc.project_id = cs.project_id AND sc.target_system = cs.target_system
+ LEFT JOIN change_stats cs ON sc.vendor_id = cs.vendor_id AND sc.target_system = cs.target_system
`)
// 타입 추출
@@ -897,6 +897,7 @@ export const simplifiedDocumentsView = pgView("simplified_documents_view", {
filePath: string;
fileSize: number | null;
fileType: string | null;
+ dolceFilePath: string | null;
createdAt: Date;
updatedAt: Date;
}>;
@@ -922,6 +923,7 @@ export const simplifiedDocumentsView = pgView("simplified_documents_view", {
'filePath', da.file_path,
'fileSize', da.file_size,
'fileType', da.file_type,
+ 'dolceFilePath', da.dolce_file_path,
'createdAt', da.created_at,
'updatedAt', da.updated_at
) ORDER BY da.created_at
diff --git a/db/schema/vendorRegistrations.ts b/db/schema/vendorRegistrations.ts
index 308d664f..d6030a75 100644
--- a/db/schema/vendorRegistrations.ts
+++ b/db/schema/vendorRegistrations.ts
@@ -8,6 +8,7 @@ import {
timestamp,
varchar,
decimal,
+ boolean,
} from "drizzle-orm/pg-core";
import { vendors } from "./vendors";
@@ -24,6 +25,10 @@ export const vendorRegularRegistrations = pgTable("vendor_regular_registrations"
assignedUser: varchar("assigned_user", { length: 100 }), // 담당자
assignedUserCode: varchar("assigned_user_code", { length: 20 }), // 담당자코드
remarks: text("remarks"), // 비고
+ // 안전적격성 평가 관련
+ safetyQualificationContent: text("safety_qualification_content"), // 안전적격성 평가 내용
+ // GTC Skip 관련
+ gtcSkipped: boolean("gtc_skipped").notNull().default(false), // GTC Skip 여부
createdAt: timestamp("created_at").defaultNow(),
updatedAt: timestamp("updated_at").defaultNow(),
});
diff --git a/i18n/locales/en/document.json b/i18n/locales/en/document.json
new file mode 100644
index 00000000..cc770eb5
--- /dev/null
+++ b/i18n/locales/en/document.json
@@ -0,0 +1,77 @@
+{
+ "documentList": {
+ "drawingKindOptions": {
+ "all": "All Documents",
+ "vendor": "B3: Vendor",
+ "gtt": "B4: GTT",
+ "b1": "B1: Spec",
+ "b2": "B2: Spec Review",
+ "b5": "B5: Check",
+ "b6": "B6: Check Reply",
+ "b7": "B7: Vendor Reply"
+ },
+ "dashboard": {
+ "totalDocuments": "Total Documents",
+ "overdueDocuments": "Overdue Documents",
+ "dueSoonDocuments": "Due Soon",
+ "averageProgress": "Average Progress",
+ "totalCount": "Showing {shown} of {total} total",
+ "totalDocumentCount": "Total {total} documents",
+ "checkImmediately": "Requires immediate attention",
+ "dueInDays": "Due within 3 days",
+ "overallProgress": "Overall project progress"
+ },
+ "quickFilters": {
+ "all": "All",
+ "overdue": "Overdue",
+ "dueSoon": "Due Soon",
+ "inProgress": "In Progress",
+ "highPriority": "High Priority"
+ },
+ "filters": {
+ "documentNumber": "Document Number",
+ "documentTitle": "Document Title",
+ "documentType": "Document Type",
+ "stageStatus": "Stage Status",
+ "priority": "Priority",
+ "overdueStatus": "Overdue Status",
+ "assignee": "Assignee",
+ "createdDate": "Created Date",
+ "searchByNumber": "Search by document number...",
+ "searchByTitle": "Search by title...",
+ "selectDocumentType": "Document Type"
+ },
+ "statusOptions": {
+ "planned": "Planned",
+ "inProgress": "In Progress",
+ "submitted": "Submitted",
+ "approved": "Approved",
+ "completed": "Completed"
+ },
+ "priorityOptions": {
+ "high": "High",
+ "medium": "Medium",
+ "low": "Low"
+ },
+ "overdueOptions": {
+ "overdue": "Overdue",
+ "normal": "Normal"
+ },
+ "ui": {
+ "expandedInfoAvailable": "Detailed info expandable",
+ "statisticsDashboard": "Statistics Dashboard",
+ "quickFiltersAndType": "Quick Filters + Document Type Filter",
+ "quickFilters": "Quick Filters",
+ "documentTypeFilter": "Document Type Filter",
+ "mainTable": "Main Table",
+ "dialogs": "Dialogs"
+ },
+ "messages": {
+ "approvalSuccess": "{count} items have been approved.",
+ "stageCompletionSuccess": "{count} stages have been completed.",
+ "bulkUploadPending": "Bulk upload feature is in preparation.",
+ "bulkAssignPending": "Bulk assignee feature is in preparation.",
+ "bulkActionError": "An error occurred during bulk operation."
+ }
+ }
+ }
\ No newline at end of file
diff --git a/i18n/locales/en/engineering.json b/i18n/locales/en/engineering.json
index f2109e8c..865903c6 100644
--- a/i18n/locales/en/engineering.json
+++ b/i18n/locales/en/engineering.json
@@ -20,7 +20,8 @@
"create": "Create",
"addRow": "Add New Row",
"duplicate": "Duplicate Row",
- "remove": "Delete Row"
+ "remove": "Delete Row",
+ "createTags": " tags create"
},
"labels": {
"class": "Class",
@@ -40,7 +41,10 @@
"searchClass": "Search class...",
"autoSetByClass": "Automatically determined when class is selected",
"enterDescription": "Enter item description",
- "searchTagOrDesc": "Search tag number or description..."
+ "searchTagOrDesc": "Search tag number or description...",
+ "selectSubclass": "Select subclass...",
+ "selectOption": "Select an option",
+ "enterValue": "Enter..."
},
"messages": {
"noSearchResults": "No search results",
@@ -54,7 +58,16 @@
"noMatchingTags": "No tags match current filter",
"dataComparing": "Comparing data...",
"sendingSEDP": "Sending to SEDP...",
- "processing": "Processing..."
+ "processing": "Processing...",
+ "selectSubclassFirst": "Please select a subclass."
+ },
+ "toast": {
+ "classOptionsLoadFailed": "Failed to load class options",
+ "subfieldsLoadFailed": "Failed to load subfields",
+ "tagProcessingFailed": "Failed to process tag creation",
+ "tagsCreatedSuccess": " tags created successfully!",
+ "tagsCreateFailed": " tag creation failed",
+ "noSelectedPackageId": "No selected package ID"
},
"tabs": {
"allTags": "All Tags",
@@ -283,82 +296,118 @@
"multipleProjects": "{{count}} projects targeted"
}
},
- "shiSync": {
- "buttons": {
- "sendToSHI": "Send to SHI",
- "syncing": "Syncing...",
- "syncNow": "Sync Now",
- "startSync": "Start Sync"
- },
- "status": {
- "checking": "Checking...",
- "connectionError": "Connection Error",
- "noContracts": "No Contracts",
- "pendingItems": "{{count}} Pending",
- "synchronized": "Synchronized",
- "noChanges": "No Changes",
- "loading": "Loading...",
- "error": "Error",
- "upToDate": "Up to Date",
- "pendingCount": "{{count}} Pending"
- },
- "labels": {
- "syncStatus": "SHI Sync Status",
- "overallStatus": "Overall Status",
- "pending": "Pending",
- "synced": "Synced",
- "failed": "Failed",
- "statusByContract": "Status by Contract",
- "contractLabel": "Contract {{projectId}}",
- "syncTarget": "Sync Target",
- "targetContracts": "Target Contracts",
- "progress": "Progress",
- "itemCount": "{{count}} items",
- "contractCount": "{{count}} contracts"
- },
- "messages": {
- "noContractsToSync": "No contracts to sync.",
- "noPendingChanges": "No pending changes to sync.",
- "contractError": "Contract {{projectId}}: {{error}}",
- "unknownError": "Unknown error",
- "allSyncCompleted": "All contracts sync completed: {{successCount}} successful",
- "allSyncCompletedDescription": "{{itemCount}} items from {{contractCount}} contracts have been sent to SHI system.",
- "partialSyncCompleted": "Partial sync completed: {{successfulCount}} successful, {{failedCount}} failed",
- "andMore": " and more...",
- "allSyncFailed": "Sync failed: All {{failedCount}} contracts failed",
- "allContractsSyncFailed": "All contract synchronization failed.",
- "syncFailed": "Sync failed"
- },
- "descriptions": {
- "targetInfo": "{{contractCount}} contracts targeted • {{targetSystem}} system",
- "statusCheckError": "Unable to check sync status for some contracts. Please check network connection.",
- "contractsWithError": "{{count}} contracts with errors",
- "noDocumentsToSync": "No documents to sync. Please select documents.",
- "includesChanges": "Includes changes to documents, revisions, and attachments.",
- "currentlyProcessing": "Currently processing: Contract {{contractId}}",
- "dialogStatusCheckError": "Unable to check sync status for some contracts. Please check network connection and try again.",
- "noContractsToSyncDialog": "No contracts to sync. Please select documents."
- },
- "dialog": {
- "title": "Sync to SHI System",
- "description": "Send changed document data from {{contractCount}} contracts to {{targetSystem}} system."
- }
+"shiSync": {
+ "buttons": {
+ "sendToSHI": "Send to SHI",
+ "syncing": "Syncing...",
+ "syncNow": "Sync Now",
+ "startSync": "Start Sync"
},
+ "status": {
+ "checking": "Checking...",
+ "connectionError": "Connection Error",
+ "noContracts": "No Contracts",
+ "pendingItems": "{{count}} Pending",
+ "synchronized": "Synchronized",
+ "noChanges": "No Changes",
+ "loading": "Loading...",
+ "error": "Error",
+ "upToDate": "Up to Date",
+ "pendingCount": "{{count}} Pending"
+ },
+ "labels": {
+ "syncStatus": "SHI Sync Status",
+ "overallStatus": "Overall Status",
+ "pending": "Pending",
+ "synced": "Synced",
+ "failed": "Failed",
+ "statusByContract": "Status by Contract",
+ "contractLabel": "Contract {{projectId}}",
+ "syncTarget": "Sync Target",
+ "targetContracts": "Target Contracts",
+ "progress": "Progress",
+ "itemCount": "{{count}} items",
+ "contractCount": "{{count}} contracts"
+ },
+ "messages": {
+ "noVendorId": "Vendor ID not found",
+ "noContractsToSync": "No contracts to sync.",
+ "noPendingChanges": "No pending changes to sync.",
+ "contractError": "Contract {{projectId}}: {{error}}",
+ "unknownError": "Unknown error",
+ "allSyncCompleted": "All contracts sync completed: {{successCount}} successful",
+ "allSyncCompletedDescription": "{{itemCount}} items from {{contractCount}} contracts have been sent to SHI system.",
+ "partialSyncCompleted": "Partial sync completed: {{successfulCount}} successful, {{failedCount}} failed",
+ "andMore": " and more...",
+ "allSyncFailed": "Sync failed: All {{failedCount}} contracts failed",
+ "allContractsSyncFailed": "All contract synchronization failed.",
+ "syncFailed": "Sync failed",
+ "vendorSyncCompleted": "{{successCount}} items successfully synchronized",
+ "vendorSyncCompletedDescription": "{{itemCount}} items from vendor {{vendorId}} have been synchronized",
+ "vendorSyncFailed": "Vendor synchronization failed"
+ },
+ "descriptions": {
+"vendorInfo": "Synchronize {{documentCount}} documents of vendor {{vendorId}} to {{targetSystem}}",
+"noVendorInfo": "Vendor information not found",
+
+ "targetInfo": "{{contractCount}} contracts targeted • {{targetSystem}} system",
+ "statusCheckError": "Unable to check sync status for some contracts. Please check network connection.",
+ "contractsWithError": "{{count}} contracts with errors",
+ "noDocumentsToSync": "No documents to sync. Please select documents.",
+ "includesChanges": "Includes changes to documents, revisions, and attachments.",
+ "currentlyProcessing": "Currently processing: Contract {{contractId}}",
+ "dialogStatusCheckError": "Unable to check sync status for some contracts. Please check network connection and try again.",
+ "noContractsToSyncDialog": "No contracts to sync. Please select documents.",
+ "noVendorSession": "No vendor information in session. Please log in",
+ "vendorSyncIncludes": "Includes all changes for the current vendor"
+ },
+ "dialog": {
+ "title": "Sync to SHI System",
+ "vendorDescription": "Synchronize data of vendor {{vendorId}} to {{targetSystem}}",
+ "description": "Send changed document data from {{contractCount}} contracts to {{targetSystem}} system."
+ }
+},
+
"errors": {
"form_meta_not_found": "Unable to load meta information for this form. For ENG mode, please request form creation from SHI administrator."
},
"layout":{
- "page_title": "Vendor Data Entry",
+ "page_title": "Vendor Data Entry",
"no_projects": "No projects found for this vendor.",
- "title": "Vendor Data",
- "description": "Select a package from the left sidebar to manage tags.",
- "getting_started": {
- "title": "Getting Started",
- "step1": "Select a project/contract from the top left.",
- "step2": "Click on package items in the sidebar.",
- "step3": "You can check and manage tag information for the selected package.",
- "step4": "Click on form items in the sidebar.",
- "step5": "You can check and manage column information for the selected form."
- }
+ "title": "Vendor Data",
+ "description": "Select a package from the left sidebar to manage tags.",
+ "getting_started": {
+ "title": "Getting Started",
+ "step1": "Select a project/contract from the top left.",
+ "step2": "Click on package items in the sidebar.",
+ "step3": "You can check and manage tag information for the selected package.",
+ "step4": "Click on form items in the sidebar.",
+ "step5": "You can check and manage column information for the selected form."
+ }
+ },
+ "vendorDocuments": {
+ "title": "Vendor Document List Management",
+ "shipDescription": "Import lists from Samsung Heavy Industries document system and register document files to deliver to Samsung Heavy Industries.",
+ "plantDescription": "Create and manage document lists and issue stages, and register document files to deliver to Samsung Heavy Industries.",
+ "gettingStarted": {
+ "title": "Getting Started",
+ "selectProject": "Please select a project/contract from the top right."
+ },
+ "progress": {
+ "overallProgress": "Overall Progress",
+ "averageProgress": "Average Progress",
+ "total": "Total",
+ "completed": "Completed",
+ "inProgress": "In Progress",
+ "overdue": "Overdue"
+ },
+ "errors": {
+ "invalidContractId": "Invalid contract ID"
+ },
+ "projectSwitcher": {
+ "selectContract": "Select Contract",
+ "selectContractPlaceholder": "Select a contract"
+ }
+
}
}
\ No newline at end of file
diff --git a/i18n/locales/ko/document.json b/i18n/locales/ko/document.json
new file mode 100644
index 00000000..5caa3e7e
--- /dev/null
+++ b/i18n/locales/ko/document.json
@@ -0,0 +1,78 @@
+{
+ "documentList": {
+ "dashboard": {
+ "totalDocuments": "전체 문서",
+ "overdueDocuments": "지연 문서",
+ "dueSoonDocuments": "마감 임박",
+ "averageProgress": "평균 진행률",
+ "totalCount": "총 {total}개 중 {shown}개 표시",
+ "totalDocumentCount": "총 {total}개 문서",
+ "checkImmediately": "즉시 확인 필요",
+ "dueInDays": "3일 이내 마감",
+ "overallProgress": "전체 프로젝트 진행도"
+ },
+ "drawingKindOptions": {
+ "all": "전체 문서",
+ "vendor": "B3: Vendor",
+ "gtt": "B4: GTT",
+ "b1": "B1: Spec",
+ "b2": "B2: Spec Review",
+ "b5": "B5: Check",
+ "b6": "B6: Check Reply",
+ "b7": "B7: Vendor Reply"
+ },
+
+ "quickFilters": {
+ "all": "전체",
+ "overdue": "지연",
+ "dueSoon": "마감임박",
+ "inProgress": "진행중",
+ "highPriority": "높은우선순위"
+ },
+ "filters": {
+ "documentNumber": "문서번호",
+ "documentTitle": "문서제목",
+ "documentType": "문서종류",
+ "stageStatus": "스테이지 상태",
+ "priority": "우선순위",
+ "overdueStatus": "지연 여부",
+ "assignee": "담당자",
+ "createdDate": "생성일",
+ "searchByNumber": "문서번호로 검색...",
+ "searchByTitle": "제목으로 검색...",
+ "selectDocumentType": "문서 종류"
+ },
+ "statusOptions": {
+ "planned": "계획됨",
+ "inProgress": "진행중",
+ "submitted": "제출됨",
+ "approved": "승인됨",
+ "completed": "완료됨"
+ },
+ "priorityOptions": {
+ "high": "높음",
+ "medium": "보통",
+ "low": "낮음"
+ },
+ "overdueOptions": {
+ "overdue": "지연됨",
+ "normal": "정상"
+ },
+ "ui": {
+ "expandedInfoAvailable": "상세정보 확장가능",
+ "statisticsDashboard": "통계 대시보드",
+ "quickFiltersAndType": "빠른 필터 + 문서 종류 필터",
+ "quickFilters": "빠른 필터",
+ "documentTypeFilter": "문서 종류 필터",
+ "mainTable": "메인 테이블",
+ "dialogs": "다이얼로그들"
+ },
+ "messages": {
+ "approvalSuccess": "{count}개 항목이 승인되었습니다.",
+ "stageCompletionSuccess": "{count}개 스테이지가 완료 처리되었습니다.",
+ "bulkUploadPending": "일괄 업로드 기능은 준비 중입니다.",
+ "bulkAssignPending": "일괄 담당자 지정 기능은 준비 중입니다.",
+ "bulkActionError": "일괄 작업 중 오류가 발생했습니다."
+ }
+ }
+ }
\ No newline at end of file
diff --git a/i18n/locales/ko/engineering.json b/i18n/locales/ko/engineering.json
index 3c6a130d..abb2e486 100644
--- a/i18n/locales/ko/engineering.json
+++ b/i18n/locales/ko/engineering.json
@@ -20,7 +20,8 @@
"create": "생성",
"addRow": "새 행 추가",
"duplicate": "행 복제",
- "remove": "행 삭제"
+ "remove": "행 삭제",
+ "createTags": "개 태그 생성"
},
"labels": {
"class": "클래스",
@@ -40,7 +41,10 @@
"searchClass": "클래스 검색...",
"autoSetByClass": "클래스 선택 시 자동 결정됨",
"enterDescription": "항목 설명 입력",
- "searchTagOrDesc": "태그 번호 또는 설명 검색..."
+ "searchTagOrDesc": "태그 번호 또는 설명 검색...",
+ "selectSubclass": "서브클래스 선택...",
+ "selectOption": "옵션을 선택하세요",
+ "enterValue": "입력..."
},
"messages": {
"noSearchResults": "검색 결과가 없습니다",
@@ -54,7 +58,16 @@
"noMatchingTags": "현재 필터와 일치하는 태그가 없습니다",
"dataComparing": "데이터 비교 중...",
"sendingSEDP": "SEDP로 전송 중...",
- "processing": "처리 중..."
+ "processing": "처리 중...",
+ "selectSubclassFirst": "서브클래스를 선택해주세요."
+ },
+ "toast": {
+ "classOptionsLoadFailed": "클래스 옵션을 불러오는데 실패했습니다",
+ "subfieldsLoadFailed": "서브필드를 불러오는데 실패했습니다",
+ "tagProcessingFailed": "태그 생성 처리에 실패했습니다",
+ "tagsCreatedSuccess": "개의 태그가 성공적으로 생성되었습니다!",
+ "tagsCreateFailed": "개의 태그 생성에 실패했습니다",
+ "noSelectedPackageId": "선택된 패키지 ID가 없습니다"
},
"tabs": {
"allTags": "모든 태그",
@@ -317,6 +330,8 @@
"contractCount": "{{count}}개"
},
"messages": {
+ "noVendorId": "벤더 ID를 찾을 수 없습니다",
+
"noContractsToSync": "동기화할 계약이 없습니다.",
"noPendingChanges": "동기화할 변경사항이 없습니다.",
"contractError": "Contract {{projectId}}: {{error}}",
@@ -327,9 +342,14 @@
"andMore": " 외 더보기...",
"allSyncFailed": "동기화 실패: {{failedCount}}개 계약 모두 실패",
"allContractsSyncFailed": "모든 계약 동기화에 실패했습니다.",
- "syncFailed": "동기화 실패"
+ "syncFailed": "동기화 실패",
+ "vendorSyncCompleted": "{{successCount}}개 항목이 성공적으로 동기화되었습니다",
+ "vendorSyncCompletedDescription": "벤더 {{vendorId}}의 {{itemCount}}개 항목이 동기화되었습니다",
+ "vendorSyncFailed": "벤더 동기화에 실패했습니다"
},
"descriptions": {
+ "vendorInfo": "벤더 {{vendorId}}의 {{documentCount}}개 문서를 {{targetSystem}}으로 동기화",
+ "noVendorInfo": "벤더 정보를 찾을 수 없습니다",
"targetInfo": "{{contractCount}}개 계약 대상 • {{targetSystem}} 시스템",
"statusCheckError": "일부 계약의 동기화 상태를 확인할 수 없습니다. 네트워크 연결을 확인해주세요.",
"contractsWithError": "{{count}}개 계약에서 오류",
@@ -337,10 +357,13 @@
"includesChanges": "문서, 리비전, 첨부파일의 변경사항이 포함됩니다.",
"currentlyProcessing": "현재 처리 중: Contract {{contractId}}",
"dialogStatusCheckError": "일부 계약의 동기화 상태를 확인할 수 없습니다. 네트워크 연결을 확인하고 다시 시도해주세요.",
- "noContractsToSync": "동기화할 계약이 없습니다. 문서를 선택해주세요."
+ "noContractsToSync": "동기화할 계약이 없습니다. 문서를 선택해주세요.",
+ "noVendorSession": "벤더 정보가 세션에 없습니다. 다시 로그인해주세요",
+ "vendorSyncIncludes": "현재 벤더의 모든 변경사항을 포함합니다"
},
"dialog": {
"title": "SHI 시스템으로 동기화",
+ "vendorDescription": "벤더 {{vendorId}}의 데이터를 {{targetSystem}}으로 동기화합니다",
"description": "{{contractCount}}개 계약의 변경된 문서 데이터를 {{targetSystem}} 시스템으로 전송합니다."
}
},
@@ -360,5 +383,30 @@
"step4": "사이드바에서 폼 항목을 클릭하세요.",
"step5": "선택함 폼의 칼럼 정보를 확인하고 관리할 수 있습니다."
}
+ },
+ "vendorDocuments": {
+ "title": "협력업체 문서 리스트 관리",
+ "shipDescription": "삼성중공업 문서시스템으로부터 목록을 가져오고 문서 파일을 등록하여 삼성중공업으로 전달할 수 있습니다.",
+ "plantDescription": "문서리스트와 이슈스테이지를 생성하고 관리할 수 있으며 문서 파일을 등록하여 삼성중공업으로 전달할 수 있습니다.",
+ "gettingStarted": {
+ "title": "시작하는 방법",
+ "selectProject": "오른쪽 상단에서 프로젝트/계약을 선택하세요."
+ },
+ "progress": {
+ "overallProgress": "전체 진행률",
+ "averageProgress": "평균 진행률",
+ "total": "전체",
+ "completed": "완료",
+ "inProgress": "진행중",
+ "overdue": "지연"
+ },
+ "errors": {
+ "invalidContractId": "유효하지 않은 계약 ID입니다"
+ },
+ "projectSwitcher": {
+ "selectContract": "계약 선택",
+ "selectContractPlaceholder": "계약을 선택하세요"
+ }
+
}
}
\ No newline at end of file
diff --git a/lib/sedp/get-form-tags.ts b/lib/sedp/get-form-tags.ts
index efa4a9c0..34f990f3 100644
--- a/lib/sedp/get-form-tags.ts
+++ b/lib/sedp/get-form-tags.ts
@@ -459,6 +459,8 @@ export async function importTagsFromSEDP(
}
}
+ const packageCode = projectType === "ship" ? tagEntry.ATTRIBUTES.find(v=>v.ATT_ID === "CM3003")?.VALUE :tagEntry.ATTRIBUTES.find(v=>v.ATT_ID === "ME5074")?.VALUE
+
// 기본 태그 데이터 객체 생성 (formEntries용)
const tagObject: any = {
TAG_IDX: tagEntry.TAG_IDX, // SEDP 고유 식별자
@@ -468,7 +470,7 @@ export async function importTagsFromSEDP(
VNDRCD: vendorRecord[0].vendorCode,
VNDRNM_1: vendorRecord[0].vendorName,
status: "From S-EDP", // SEDP에서 가져온 데이터임을 표시
- ...(projectType === "ship" ? { CM3003: tagEntry.CM3003 } : { ME5074: tagEntry.ME5074 })
+ ...(projectType === "ship" ? { CM3003: packageCode } : { ME5074:packageCode })
}
// tags 테이블용 데이터 (UPSERT용)
@@ -542,6 +544,11 @@ export async function importTagsFromSEDP(
hasUpdates = true;
continue;
}
+ if (key === "CLS_ID" && tagObject[key] !== existingTag.data[key]) {
+ updates[key] = tagObject[key];
+ hasUpdates = true;
+ continue;
+ }
const columnInfo = columnsJSON.find(col => col.key === key);
if (columnInfo && columnInfo.shi === true) {
diff --git a/lib/tags/table/add-tag-dialog.tsx b/lib/tags/table/add-tag-dialog.tsx
index e5207cd8..f3eaed3f 100644
--- a/lib/tags/table/add-tag-dialog.tsx
+++ b/lib/tags/table/add-tag-dialog.tsx
@@ -1,7 +1,7 @@
"use client"
import * as React from "react"
-import { useRouter } from "next/navigation"
+import { useRouter, useParams } from "next/navigation"
import { useForm, useWatch, useFieldArray } from "react-hook-form"
import { zodResolver } from "@hookform/resolvers/zod"
import { toast } from "sonner"
@@ -51,6 +51,7 @@ import {
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"
import { cn } from "@/lib/utils"
import { Badge } from "@/components/ui/badge"
+import { useTranslation } from "@/i18n/client"
import type { CreateTagSchema } from "@/lib/tags/validations"
import { createTagSchema } from "@/lib/tags/validations"
@@ -102,6 +103,9 @@ interface AddTagDialogProps {
export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
const router = useRouter()
+ const params = useParams()
+ const lng = (params?.lng as string) || "ko"
+ const { t } = useTranslation(lng, "engineering")
const [open, setOpen] = React.useState(false)
const [tagTypeList, setTagTypeList] = React.useState([])
@@ -134,7 +138,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
const result = await getClassOptions(selectedPackageId)
setClassOptions(result)
} catch (err) {
- toast.error("클래스 옵션을 불러오는데 실패했습니다.")
+ toast.error(t("toast.classOptionsLoadFailed"))
} finally {
setIsLoadingClasses(false)
}
@@ -198,7 +202,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
form.setValue("rows", updatedRows);
return true
} catch (err) {
- toast.error("서브필드를 불러오는데 실패했습니다.")
+ toast.error(t("toast.subfieldsLoadFailed"))
setSubFields([])
return false
} finally {
@@ -310,7 +314,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
// ---------------
async function onSubmit(data: MultiTagFormValues) {
if (!selectedPackageId) {
- toast.error("No selectedPackageId.");
+ toast.error(t("toast.noSelectedPackageId"));
return;
}
@@ -353,12 +357,12 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
// Show results to the user
if (successfulTags.length > 0) {
- toast.success(`${successfulTags.length}개의 태그가 성공적으로 생성되었습니다!`);
+ toast.success(`${successfulTags.length}${t("toast.tagsCreatedSuccess")}`);
}
if (failedTags.length > 0) {
console.log("Failed tags:", failedTags);
- toast.error(`${failedTags.length}개의 태그 생성에 실패했습니다.`);
+ toast.error(`${failedTags.length}${t("toast.tagsCreateFailed")}`);
}
// Refresh the page
@@ -370,7 +374,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
setOpen(false);
}
} catch (err) {
- toast.error("태그 생성 처리에 실패했습니다.");
+ toast.error(t("toast.tagProcessingFailed"));
} finally {
setIsSubmitting(false);
}
@@ -435,7 +439,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
return (
- Class
+ {t("labels.class")}
@@ -448,13 +452,13 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
>
{isLoadingClasses ? (
<>
- 클래스 로딩 중...
+ {t("messages.loadingClasses")}
>
) : (
<>
- {field.value || "클래스 선택..."}
+ {field.value || t("placeholders.selectClass")}
>
@@ -465,7 +469,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
@@ -475,7 +479,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
const target = e.currentTarget;
target.scrollTop += e.deltaY; // 직접 스크롤 처리
}}>
- 검색 결과가 없습니다.
+ {t("messages.noSearchResults")}
{classOptions.map((opt, optIndex) => {
if (!classOptionIdsRef.current[opt.code]) {
@@ -543,7 +547,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
disabled={!selectedClassOption}
>
-
+
{selectedClassOption?.subclasses.map((subclass) => (
@@ -576,7 +580,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
return (
- Tag Type
+ {t("labels.tagType")}
{isReadOnly ? (
@@ -592,7 +596,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
key={`tag-type-placeholder-${inputId}`}
{...field}
readOnly
- placeholder="클래스 선택시 자동으로 결정됩니다"
+ placeholder={t("placeholders.autoSetByClass")}
className="h-9 bg-muted"
/>
)}
@@ -610,15 +614,15 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
return (
-
필드 로딩 중...
+
{t("messages.loadingFields")}
)
}
if (subFields.length === 0 && selectedTagTypeCode) {
const message = selectedClassOption?.subclasses && selectedClassOption.subclasses.length > 0
- ? "서브클래스를 선택해주세요."
- : "이 태그 유형에 대한 필드가 없습니다."
+ ? t("messages.selectSubclassFirst")
+ : t("messages.noFieldsForTagType")
return (
@@ -630,7 +634,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
if (subFields.length === 0) {
return (
- 태그 데이터를 입력하려면 먼저 상단에서 클래스를 선택하세요.
+ {t("messages.selectClassFirst")}
)
}
@@ -639,10 +643,10 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
{/* 헤더 */}
-
태그 항목 ({fields.length}개)
+ {t("sections.tagItems")} ({fields.length}개)
{!areAllTagNosValid && (
- 유효하지 않은 태그 존재
+ {t("messages.invalidTagsExist")}
)}
@@ -655,10 +659,10 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
#
- Tag No
+ {t("labels.tagNo")}
- Description
+ {t("labels.description")}
{/* Subfields */}
@@ -680,7 +684,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
))}
- Actions
+ {t("labels.actions")}
@@ -738,7 +742,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
@@ -768,7 +772,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
className="w-full h-8 truncate"
title={field.value || ""}
>
-
+
)}
@@ -820,7 +824,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
- 행 복제
+ {t("tooltips.duplicateRow")}
@@ -843,7 +847,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
- 행 삭제
+ {t("tooltips.deleteRow")}
@@ -864,7 +868,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
disabled={!selectedTagTypeCode || isLoadingSubFields || subFields.length === 0}
>
- 새 행 추가
+ {t("buttons.addRow")}
@@ -903,15 +907,15 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
>
- 태그 추가
+ {t("buttons.addTags")}
- 새 태그 추가
+ {t("dialogs.addFormTag")}
- 클래스와 서브클래스를 선택하여 태그 유형과 하위 필드를 로드한 다음, 여러 행을 추가하여 여러 태그를 생성하세요.
+ {t("dialogs.selectClassToLoadFields")}
@@ -968,7 +972,7 @@ export function AddTagDialog({ selectedPackageId }: AddTagDialogProps) {
}}
disabled={isSubmitting}
>
- 취소
+ {t("buttons.cancel")}
- 처리 중...
+ {t("messages.processing")}
>
) : (
- `${fields.length}개 태그 생성`
+ `${fields.length}${t("buttons.createTags")}`
)}
diff --git a/lib/vendor-document-list/dolce-upload-service.ts b/lib/vendor-document-list/dolce-upload-service.ts
index 2d6a83c6..84ae4525 100644
--- a/lib/vendor-document-list/dolce-upload-service.ts
+++ b/lib/vendor-document-list/dolce-upload-service.ts
@@ -5,6 +5,8 @@ import { eq, and, desc, sql, inArray, min } from "drizzle-orm"
import { v4 as uuidv4 } from "uuid"
import path from "path"
import * as crypto from "crypto"
+import { getServerSession } from "next-auth/next"
+import { authOptions } from "@/app/api/auth/[...nextauth]/route"
export interface DOLCEUploadResult {
success: boolean
@@ -87,7 +89,7 @@ interface DOLCEFileMapping {
function getFileReaderConfig(): FileReaderConfig {
const isProduction = process.env.NODE_ENV === "production";
-
+
if (isProduction) {
return {
baseDir: process.env.NAS_PATH || "/evcp_nas", // NAS 기본 경로
@@ -118,13 +120,13 @@ class DOLCEUploadService {
): Promise {
try {
console.log(`Starting DOLCE upload for contract ${projectId}, revisions: ${revisionIds.join(', ')}`)
-
+
// 1. 계약 정보 조회 (프로젝트 코드, 벤더 코드 등)
const contractInfo = await this.getContractInfo(projectId)
if (!contractInfo) {
throw new Error(`Contract info not found for ID: ${projectId}`)
}
-
+
// 2. 업로드할 리비전 정보 조회
const revisionsToUpload = await this.getRevisionsForUpload(revisionIds)
if (revisionsToUpload.length === 0) {
@@ -134,7 +136,7 @@ class DOLCEUploadService {
uploadedFiles: 0
}
}
-
+
let uploadedDocuments = 0
let uploadedFiles = 0
const errors: string[] = []
@@ -143,19 +145,19 @@ class DOLCEUploadService {
fileResults: [],
mappingResults: []
}
-
+
// 3. 각 리비전별로 처리
for (const revision of revisionsToUpload) {
try {
console.log(`Processing revision ${revision.revision} for document ${revision.documentNo}`)
-
+
// 3-1. UploadId 미리 생성 (파일이 있는 경우에만)
let uploadId: string | undefined
if (revision.attachments && revision.attachments.length > 0) {
uploadId = uuidv4() // 문서 업로드 시 사용할 UploadId 미리 생성
console.log(`Generated UploadId for document upload: ${uploadId}`)
}
-
+
// 3-2. 문서 정보 업로드 (UploadId 포함)
const dolceDoc = this.transformToDoLCEDocument(
revision,
@@ -163,43 +165,43 @@ class DOLCEUploadService {
uploadId, // 미리 생성된 UploadId 사용
contractInfo.vendorCode,
)
-
+
const docResult = await this.uploadDocument([dolceDoc], userId)
if (!docResult.success) {
errors.push(`Document upload failed for ${revision.documentNo}: ${docResult.error}`)
continue // 문서 업로드 실패 시 다음 리비전으로 넘어감
}
-
+
uploadedDocuments++
results.documentResults.push(docResult)
console.log(`✅ Document uploaded successfully: ${revision.documentNo}`)
-
+
// 3-3. 파일 업로드 (이미 생성된 UploadId 사용)
if (uploadId && revision.attachments && revision.attachments.length > 0) {
try {
// 파일 업로드 시 이미 생성된 UploadId 사용
const fileUploadResults = await this.uploadFiles(
- revision.attachments,
- userId,
+ revision.attachments,
+ userId,
uploadId // 이미 생성된 UploadId 전달
)
-
+
} catch (fileError) {
errors.push(`File upload failed for ${revision.documentNo}: ${fileError instanceof Error ? fileError.message : 'Unknown error'}`)
console.error(`❌ File upload failed for ${revision.documentNo}:`, fileError)
}
}
-
+
// 3-5. 성공한 리비전의 상태 업데이트
await this.updateRevisionStatus(revision.id, 'SUBMITTED', uploadId)
-
+
} catch (error) {
const errorMessage = `Failed to process revision ${revision.revision}: ${error instanceof Error ? error.message : 'Unknown error'}`
errors.push(errorMessage)
console.error(errorMessage, error)
}
}
-
+
return {
success: errors.length === 0,
uploadedDocuments,
@@ -207,7 +209,7 @@ class DOLCEUploadService {
errors: errors.length > 0 ? errors : undefined,
results
}
-
+
} catch (error) {
console.error('DOLCE upload failed:', error)
throw error
@@ -216,22 +218,34 @@ class DOLCEUploadService {
/**
* 계약 정보 조회
*/
- private async getContractInfo(projectId: number) {
+ private async getContractInfo(projectId: number): Promise<{
+ projectCode: string;
+ vendorCode: string;
+ } | null> {
+
+ const session = await getServerSession(authOptions)
+ if (!session?.user?.companyId) {
+ throw new Error("인증이 필요합니다.")
+ }
+
+
const [result] = await db
.select({
projectCode: projects.code,
- vendorCode: vendors.vendorCode,
- contractNo: contracts.contractNo
+ vendorCode: vendors.vendorCode
})
.from(contracts)
.innerJoin(projects, eq(contracts.projectId, projects.id))
.innerJoin(vendors, eq(contracts.vendorId, vendors.id))
- .where(eq(contracts.projectId, projectId))
+ .where(and(eq(contracts.projectId, projectId), eq(contracts.vendorId, Number(session.user.companyId))))
.limit(1)
- return result
+ return result?.projectCode && result?.vendorCode
+ ? { projectCode: result.projectCode, vendorCode: result.vendorCode }
+ : null
}
+
/**
* 각 issueStageId별로 첫 번째 revision 정보를 조회
*/
@@ -264,7 +278,7 @@ class DOLCEUploadService {
.select({
// revision 테이블 정보
id: revisions.id,
- registerId:revisions.registerId,
+ registerId: revisions.registerId,
revision: revisions.revision, // revisionNo가 아니라 revision
revisionStatus: revisions.revisionStatus,
uploaderId: revisions.uploaderId,
@@ -341,181 +355,181 @@ class DOLCEUploadService {
return revisionsWithAttachments
}
-/**
- * 파일 업로드 (PWPUploadService.ashx) - 수정된 버전
- * @param attachments 업로드할 첨부파일 목록
- * @param userId 사용자 ID
- * @param uploadId 이미 생성된 UploadId (문서 업로드 시 생성됨)
- */
-private async uploadFiles(
- attachments: any[],
- userId: string,
- uploadId: string // 이미 생성된 UploadId를 매개변수로 받음
-): Promise> {
- const uploadResults = []
- const resultDataArray: ResultData[] = []
+ /**
+ * 파일 업로드 (PWPUploadService.ashx) - 수정된 버전
+ * @param attachments 업로드할 첨부파일 목록
+ * @param userId 사용자 ID
+ * @param uploadId 이미 생성된 UploadId (문서 업로드 시 생성됨)
+ */
+ private async uploadFiles(
+ attachments: any[],
+ userId: string,
+ uploadId: string // 이미 생성된 UploadId를 매개변수로 받음
+ ): Promise> {
+ const uploadResults = []
+ const resultDataArray: ResultData[] = []
- for (let i = 0; i < attachments.length; i++) {
- const attachment = attachments[i]
- try {
- // FileId만 새로 생성 (UploadId는 이미 생성된 것 사용)
- const fileId = uuidv4()
+ for (let i = 0; i < attachments.length; i++) {
+ const attachment = attachments[i]
+ try {
+ // FileId만 새로 생성 (UploadId는 이미 생성된 것 사용)
+ const fileId = uuidv4()
- console.log(`Uploading file with predefined UploadId: ${uploadId}, FileId: ${fileId}`)
+ console.log(`Uploading file with predefined UploadId: ${uploadId}, FileId: ${fileId}`)
- // 파일 데이터 읽기
- const fileBuffer = await this.getFileBuffer(attachment.filePath)
+ // 파일 데이터 읽기
+ const fileBuffer = await this.getFileBuffer(attachment.filePath)
- const uploadUrl = `${this.UPLOAD_SERVICE_URL}?UploadId=${uploadId}&FileId=${fileId}`
+ const uploadUrl = `${this.UPLOAD_SERVICE_URL}?UploadId=${uploadId}&FileId=${fileId}`
- const response = await fetch(uploadUrl, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/octet-stream',
- },
- body: fileBuffer
- })
+ const response = await fetch(uploadUrl, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/octet-stream',
+ },
+ body: fileBuffer
+ })
- if (!response.ok) {
- const errorText = await response.text()
- throw new Error(`File upload failed: HTTP ${response.status} - ${errorText}`)
- }
+ if (!response.ok) {
+ const errorText = await response.text()
+ throw new Error(`File upload failed: HTTP ${response.status} - ${errorText}`)
+ }
- const dolceFilePath = await response.text() // DOLCE에서 반환하는 파일 경로
-
- // 업로드 성공 후 documentAttachments 테이블 업데이트
- await db
- .update(documentAttachments)
- .set({
- uploadId: uploadId, // 이미 생성된 UploadId 사용
- fileId: fileId,
- uploadedBy: userId,
- dolceFilePath: dolceFilePath,
- uploadedAt: new Date(),
- updatedAt: new Date()
+ const dolceFilePath = await response.text() // DOLCE에서 반환하는 파일 경로
+
+ // 업로드 성공 후 documentAttachments 테이블 업데이트
+ await db
+ .update(documentAttachments)
+ .set({
+ uploadId: uploadId, // 이미 생성된 UploadId 사용
+ fileId: fileId,
+ uploadedBy: userId,
+ dolceFilePath: dolceFilePath,
+ uploadedAt: new Date(),
+ updatedAt: new Date()
+ })
+ .where(eq(documentAttachments.id, attachment.id))
+
+ uploadResults.push({
+ uploadId,
+ fileId,
+ filePath: dolceFilePath
})
- .where(eq(documentAttachments.id, attachment.id))
- uploadResults.push({
- uploadId,
- fileId,
- filePath: dolceFilePath
- })
-
- // ResultData 객체 생성 (PWPUploadResultService 호출용)
- const fileStats = await this.getFileStats(attachment.filePath) // 파일 통계 정보 조회
-
- const resultData: ResultData = {
- FileId: fileId,
- UploadId: uploadId,
- FileSeq: i + 1, // 1부터 시작하는 시퀀스
- FileName: attachment.fileName,
- FileRelativePath: dolceFilePath,
- FileSize: fileStats.size,
- FileCreateDT: fileStats.birthtime.toISOString(),
- FileWriteDT: fileStats.mtime.toISOString(),
- OwnerUserId: userId
- }
+ // ResultData 객체 생성 (PWPUploadResultService 호출용)
+ const fileStats = await this.getFileStats(attachment.filePath) // 파일 통계 정보 조회
+
+ const resultData: ResultData = {
+ FileId: fileId,
+ UploadId: uploadId,
+ FileSeq: i + 1, // 1부터 시작하는 시퀀스
+ FileName: attachment.fileName,
+ FileRelativePath: dolceFilePath,
+ FileSize: fileStats.size,
+ FileCreateDT: fileStats.birthtime.toISOString(),
+ FileWriteDT: fileStats.mtime.toISOString(),
+ OwnerUserId: userId
+ }
- resultDataArray.push(resultData)
+ resultDataArray.push(resultData)
- console.log(`✅ File uploaded successfully: ${attachment.fileName} -> ${dolceFilePath}`)
- console.log(`✅ DB updated for attachment ID: ${attachment.id}`)
+ console.log(`✅ File uploaded successfully: ${attachment.fileName} -> ${dolceFilePath}`)
+ console.log(`✅ DB updated for attachment ID: ${attachment.id}`)
- // 🧪 DOLCE 업로드 확인 테스트
- try {
- const testResult = await this.testDOLCEFileDownload(fileId, userId, attachment.fileName)
- if (testResult.success) {
- console.log(`✅ DOLCE 업로드 확인 성공: ${attachment.fileName}`)
- } else {
- console.warn(`⚠️ DOLCE 업로드 확인 실패: ${attachment.fileName} - ${testResult.error}`)
+ // 🧪 DOLCE 업로드 확인 테스트
+ try {
+ const testResult = await this.testDOLCEFileDownload(fileId, userId, attachment.fileName)
+ if (testResult.success) {
+ console.log(`✅ DOLCE 업로드 확인 성공: ${attachment.fileName}`)
+ } else {
+ console.warn(`⚠️ DOLCE 업로드 확인 실패: ${attachment.fileName} - ${testResult.error}`)
+ }
+ } catch (testError) {
+ console.warn(`⚠️ DOLCE 업로드 확인 중 오류: ${attachment.fileName}`, testError)
}
- } catch (testError) {
- console.warn(`⚠️ DOLCE 업로드 확인 중 오류: ${attachment.fileName}`, testError)
- }
- } catch (error) {
- console.error(`❌ File upload failed for ${attachment.fileName}:`, error)
- throw error
+ } catch (error) {
+ console.error(`❌ File upload failed for ${attachment.fileName}:`, error)
+ throw error
+ }
}
- }
- // 모든 파일 업로드가 완료된 후 PWPUploadResultService 호출
- if (resultDataArray.length > 0) {
- try {
- await this.finalizeUploadResult(resultDataArray)
- console.log(`✅ Upload result finalized for UploadId: ${uploadId}`)
- } catch (error) {
- console.error(`❌ Failed to finalize upload result for UploadId: ${uploadId}`, error)
- // 파일 업로드는 성공했지만 결과 저장 실패 - 로그만 남기고 계속 진행
+ // 모든 파일 업로드가 완료된 후 PWPUploadResultService 호출
+ if (resultDataArray.length > 0) {
+ try {
+ await this.finalizeUploadResult(resultDataArray)
+ console.log(`✅ Upload result finalized for UploadId: ${uploadId}`)
+ } catch (error) {
+ console.error(`❌ Failed to finalize upload result for UploadId: ${uploadId}`, error)
+ // 파일 업로드는 성공했지만 결과 저장 실패 - 로그만 남기고 계속 진행
+ }
}
+
+ return uploadResults
}
- return uploadResults
-}
+ private async finalizeUploadResult(resultDataArray: ResultData[]): Promise {
+ const url = `${this.BASE_URL}/PWPUploadResultService.ashx?`
-private async finalizeUploadResult(resultDataArray: ResultData[]): Promise {
- const url = `${this.BASE_URL}/PWPUploadResultService.ashx?`
-
- try {
- const jsonData = JSON.stringify(resultDataArray)
- const dataBuffer = Buffer.from(jsonData, 'utf-8')
+ try {
+ const jsonData = JSON.stringify(resultDataArray)
+ const dataBuffer = Buffer.from(jsonData, 'utf-8')
- console.log(`Calling PWPUploadResultService with ${resultDataArray.length} files`)
- console.log('ResultData:', JSON.stringify(resultDataArray, null, 2))
+ console.log(`Calling PWPUploadResultService with ${resultDataArray.length} files`)
+ console.log('ResultData:', JSON.stringify(resultDataArray, null, 2))
- const response = await fetch(url, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: dataBuffer
- })
+ const response = await fetch(url, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: dataBuffer
+ })
- if (!response.ok) {
- const errorText = await response.text()
- throw new Error(`PWPUploadResultService failed: HTTP ${response.status} - ${errorText}`)
- }
+ if (!response.ok) {
+ const errorText = await response.text()
+ throw new Error(`PWPUploadResultService failed: HTTP ${response.status} - ${errorText}`)
+ }
- const result = await response.text()
-
- if (result !== 'Success') {
- console.log(result,"돌체 업로드 실패")
- throw new Error(`PWPUploadResultService returned unexpected result: ${result}`)
- }
+ const result = await response.text()
- console.log('✅ PWPUploadResultService call successful')
+ if (result !== 'Success') {
+ console.log(result, "돌체 업로드 실패")
+ throw new Error(`PWPUploadResultService returned unexpected result: ${result}`)
+ }
- } catch (error) {
- console.error('❌ PWPUploadResultService call failed:', error)
- throw error
- }
-}
+ console.log('✅ PWPUploadResultService call successful')
-// 파일 통계 정보 조회 헬퍼 메서드 (파일시스템에서 파일 정보를 가져옴)
-private async getFileStats(filePath: string): Promise<{ size: number, birthtime: Date, mtime: Date }> {
- try {
- // Node.js 환경이라면 fs.stat 사용
- const fs = require('fs').promises
- const stats = await fs.stat(filePath)
-
- return {
- size: stats.size,
- birthtime: stats.birthtime,
- mtime: stats.mtime
+ } catch (error) {
+ console.error('❌ PWPUploadResultService call failed:', error)
+ throw error
}
- } catch (error) {
- console.warn(`Could not get file stats for ${filePath}, using defaults`)
- // 파일 정보를 가져올 수 없는 경우 기본값 사용
- const now = new Date()
- return {
- size: 0,
- birthtime: now,
- mtime: now
+ }
+
+ // 파일 통계 정보 조회 헬퍼 메서드 (파일시스템에서 파일 정보를 가져옴)
+ private async getFileStats(filePath: string): Promise<{ size: number, birthtime: Date, mtime: Date }> {
+ try {
+ // Node.js 환경이라면 fs.stat 사용
+ const fs = require('fs').promises
+ const stats = await fs.stat(filePath)
+
+ return {
+ size: stats.size,
+ birthtime: stats.birthtime,
+ mtime: stats.mtime
+ }
+ } catch (error) {
+ console.warn(`Could not get file stats for ${filePath}, using defaults`)
+ // 파일 정보를 가져올 수 없는 경우 기본값 사용
+ const now = new Date()
+ return {
+ size: 0,
+ birthtime: now,
+ mtime: now
+ }
}
}
-}
/**
* 문서 정보 업로드 (DetailDwgReceiptMgmtEdit)
@@ -604,125 +618,125 @@ private async getFileStats(filePath: string): Promise<{ size: number, birthtime:
/**
* 리비전 데이터를 DOLCE 문서 형태로 변환 (업데이트된 스키마 사용)
*/
-/**
- * 리비전 데이터를 DOLCE 문서 형태로 변환 (업데이트된 스키마 사용)
- */
-private transformToDoLCEDocument(
- revision: any,
- contractInfo: any,
- uploadId?: string,
- vendorCode?: string,
-): DOLCEDocument {
- // Mode 결정: registerId가 있으면 MOD, 없으면 ADD
- let mode: "ADD" | "MOD" = "ADD" // 기본값은 ADD
-
- if (revision.registerId) {
- mode = "MOD"
- } else {
- mode = "ADD"
- }
+ /**
+ * 리비전 데이터를 DOLCE 문서 형태로 변환 (업데이트된 스키마 사용)
+ */
+ private transformToDoLCEDocument(
+ revision: any,
+ contractInfo: any,
+ uploadId?: string,
+ vendorCode?: string,
+ ): DOLCEDocument {
+ // Mode 결정: registerId가 있으면 MOD, 없으면 ADD
+ let mode: "ADD" | "MOD" = "ADD" // 기본값은 ADD
+
+ if (revision.registerId) {
+ mode = "MOD"
+ } else {
+ mode = "ADD"
+ }
- // RegisterKind 결정: usage와 usageType에 따라 설정
- let registerKind = "APPR" // 기본값
-
- if (revision.usage && revision.usage !== 'DEFAULT') {
- switch (revision.usage) {
- case "APPROVAL":
- if (revision.usageType === "Full") {
- registerKind = "APPR"
- } else if (revision.usageType === "Partial") {
- registerKind = "APPR-P"
- } else {
- registerKind = "APPR" // 기본값
- }
- break
-
- case "WORKING":
- if (revision.usageType === "Full") {
- registerKind = "WORK"
- } else if (revision.usageType === "Partial") {
- registerKind = "WORK-P"
- } else {
- registerKind = "WORK" // 기본값
- }
- break
+ // RegisterKind 결정: usage와 usageType에 따라 설정
+ let registerKind = "APPR" // 기본값
+
+ if (revision.usage && revision.usage !== 'DEFAULT') {
+ switch (revision.usage) {
+ case "APPROVAL":
+ if (revision.usageType === "Full") {
+ registerKind = "APPR"
+ } else if (revision.usageType === "Partial") {
+ registerKind = "APPR-P"
+ } else {
+ registerKind = "APPR" // 기본값
+ }
+ break
+
+ case "WORKING":
+ if (revision.usageType === "Full") {
+ registerKind = "WORK"
+ } else if (revision.usageType === "Partial") {
+ registerKind = "WORK-P"
+ } else {
+ registerKind = "WORK" // 기본값
+ }
+ break
- case "The 1st":
- registerKind = "FMEA-1"
- break
+ case "The 1st":
+ registerKind = "FMEA-1"
+ break
- case "The 2nd":
- registerKind = "FMEA-2"
- break
+ case "The 2nd":
+ registerKind = "FMEA-2"
+ break
- case "Pre":
- registerKind = "RECP"
- break
+ case "Pre":
+ registerKind = "RECP"
+ break
- case "Working":
- registerKind = "RECW"
- break
+ case "Working":
+ registerKind = "RECW"
+ break
- case "Mark-Up":
- registerKind = "CMTM"
- break
+ case "Mark-Up":
+ registerKind = "CMTM"
+ break
- default:
- console.warn(`Unknown usage type: ${revision.usage}, using default APPR`)
- registerKind = "APPR" // 기본값
- break
+ default:
+ console.warn(`Unknown usage type: ${revision.usage}, using default APPR`)
+ registerKind = "APPR" // 기본값
+ break
+ }
+ } else {
+ console.warn(`No usage specified for revision ${revision.revision}, using default APPR`)
}
- } else {
- console.warn(`No usage specified for revision ${revision.revision}, using default APPR`)
- }
- // Serial Number 계산 함수
- const getSerialNumber = (revisionValue: string): number => {
- if (!revisionValue) {
- return 1
- }
+ // Serial Number 계산 함수
+ const getSerialNumber = (revisionValue: string): number => {
+ if (!revisionValue) {
+ return 1
+ }
- // 먼저 숫자인지 확인
- const numericValue = parseInt(revisionValue)
- if (!isNaN(numericValue)) {
- return numericValue
- }
+ // 먼저 숫자인지 확인
+ const numericValue = parseInt(revisionValue)
+ if (!isNaN(numericValue)) {
+ return numericValue
+ }
- // 문자인 경우 (a=1, b=2, c=3, ...)
- if (typeof revisionValue === 'string' && revisionValue.length === 1) {
- const charCode = revisionValue.toLowerCase().charCodeAt(0)
- if (charCode >= 97 && charCode <= 122) { // a-z
- return charCode - 96 // a=1, b=2, c=3, ...
+ // 문자인 경우 (a=1, b=2, c=3, ...)
+ if (typeof revisionValue === 'string' && revisionValue.length === 1) {
+ const charCode = revisionValue.toLowerCase().charCodeAt(0)
+ if (charCode >= 97 && charCode <= 122) { // a-z
+ return charCode - 96 // a=1, b=2, c=3, ...
+ }
}
+
+ // 기본값
+ return 1
}
- // 기본값
- return 1
- }
+ console.log(`Transform to DOLCE: Mode=${mode}, RegisterKind=${registerKind}, Usage=${revision.usage}, UsageType=${revision.usageType}`)
- console.log(`Transform to DOLCE: Mode=${mode}, RegisterKind=${registerKind}, Usage=${revision.usage}, UsageType=${revision.usageType}`)
-
- return {
- Mode: mode,
- Status: revision.revisionStatus || "Standby",
- RegisterId: revision.registerId || 0, // registerId가 없으면 0 (ADD 모드)
- ProjectNo: contractInfo.projectCode,
- Discipline: revision.discipline || "DL",
- DrawingKind: revision.drawingKind || "B3",
- DrawingNo: revision.documentNo,
- DrawingName: revision.documentName,
- RegisterGroupId: revision.registerGroupId || 0,
- RegisterSerialNo: getSerialNumber(revision.revision || "1"),
- RegisterKind: registerKind, // usage/usageType에 따라 동적 설정
- DrawingRevNo: revision.revision || "-",
- Category: revision.category || "TS",
- Receiver: null,
- Manager: revision.managerNo || "202206", // 담당자 번호 사용
- RegisterDesc: revision.comment || "System upload",
- UploadId: uploadId,
- RegCompanyCode: vendorCode || "A0005531" // 벤더 코드
+ return {
+ Mode: mode,
+ Status: revision.revisionStatus || "Standby",
+ RegisterId: revision.registerId || 0, // registerId가 없으면 0 (ADD 모드)
+ ProjectNo: contractInfo.projectCode,
+ Discipline: revision.discipline || "DL",
+ DrawingKind: revision.drawingKind || "B3",
+ DrawingNo: revision.documentNo,
+ DrawingName: revision.documentName,
+ RegisterGroupId: revision.registerGroupId || 0,
+ RegisterSerialNo: getSerialNumber(revision.revision || "1"),
+ RegisterKind: registerKind, // usage/usageType에 따라 동적 설정
+ DrawingRevNo: revision.revision || "-",
+ Category: revision.category || "TS",
+ Receiver: null,
+ Manager: revision.managerNo || "202206", // 담당자 번호 사용
+ RegisterDesc: revision.comment || "System upload",
+ UploadId: uploadId,
+ RegCompanyCode: vendorCode || "A0005531" // 벤더 코드
+ }
}
-}
/**
* 파일 매핑 데이터 변환
*/
@@ -769,28 +783,28 @@ private transformToDoLCEDocument(
private async getFileBuffer(filePath: string): Promise {
try {
console.log(`📂 파일 읽기 요청: ${filePath}`);
-
+
if (filePath.startsWith('http')) {
// ✅ URL인 경우 직접 다운로드 (기존과 동일)
console.log(`🌐 HTTP URL에서 파일 다운로드: ${filePath}`);
-
+
const response = await fetch(filePath);
if (!response.ok) {
throw new Error(`파일 다운로드 실패: ${response.status}`);
}
-
+
const arrayBuffer = await response.arrayBuffer();
console.log(`✅ HTTP 다운로드 완료: ${arrayBuffer.byteLength} bytes`);
-
+
return arrayBuffer;
} else {
// ✅ 로컬/NAS 파일 경로 처리 (환경별 분기)
const fs = await import('fs');
const path = await import('path');
const config = getFileReaderConfig();
-
+
let actualFilePath: string;
-
+
// 경로 형태별 처리
if (filePath.startsWith('/documents/')) {
// ✅ DB에 저장된 경로 형태: "/documents/[uuid].ext"
@@ -798,32 +812,48 @@ private transformToDoLCEDocument(
// 프로덕션: /evcp_nas/documents/[uuid].ext
actualFilePath = path.join(config.baseDir, 'public', filePath.substring(1)); // 앞의 '/' 제거
console.log(`📁 documents 경로 처리: ${filePath} → ${actualFilePath}`);
- }
-
+ }
+ else if (filePath.startsWith('/api/files')) {
+
+ actualFilePath = `${process.env.NEXT_PUBLIC_URL}${filePath}`
+
+
+ const response = await fetch(actualFilePath);
+ if (!response.ok) {
+ throw new Error(`파일 다운로드 실패: ${response.status}`);
+ }
+
+ const arrayBuffer = await response.arrayBuffer();
+ console.log(`✅ HTTP 다운로드 완료: ${arrayBuffer.byteLength} bytes`);
+
+ return arrayBuffer;
+
+ }
+
else {
// ✅ 상대 경로는 현재 디렉토리 기준
actualFilePath = filePath;
console.log(`📂 상대 경로 사용: ${actualFilePath}`);
}
-
+
console.log(`🔍 실제 파일 경로: ${actualFilePath}`);
console.log(`🏠 환경: ${config.isProduction ? 'PRODUCTION (NAS)' : 'DEVELOPMENT (public)'}`);
-
+
// 파일 존재 여부 확인
if (!fs.existsSync(actualFilePath)) {
console.error(`❌ 파일 없음: ${actualFilePath}`);
throw new Error(`파일을 찾을 수 없습니다: ${actualFilePath}`);
}
-
+
// 파일 읽기
const fileBuffer = fs.readFileSync(actualFilePath);
console.log(`✅ 파일 읽기 성공: ${actualFilePath} (${fileBuffer.length} bytes)`);
-
+
// ✅ Buffer를 ArrayBuffer로 정확히 변환
const arrayBuffer = new ArrayBuffer(fileBuffer.length);
const uint8Array = new Uint8Array(arrayBuffer);
uint8Array.set(fileBuffer);
-
+
return arrayBuffer;
}
} catch (error) {
@@ -881,19 +911,19 @@ private transformToDoLCEDocument(
try {
// DES 암호화 (C# DESCryptoServiceProvider 호환)
const DES_KEY = Buffer.from("4fkkdijg", "ascii")
-
+
// 암호화 문자열 생성: FileId↔UserId↔FileName
const encryptString = `${fileId}↔${userId}↔${fileName}`
-
+
// DES 암호화 (createCipheriv 사용)
const cipher = crypto.createCipheriv('des-ecb', DES_KEY, '')
cipher.setAutoPadding(true)
let encrypted = cipher.update(encryptString, 'utf8', 'base64')
encrypted += cipher.final('base64')
const encryptedKey = encrypted.replace(/\+/g, '|||')
-
+
const downloadUrl = `${process.env.DOLCE_DOWNLOAD_URL}?key=${encryptedKey}` || `http://60.100.99.217:1111/Download.aspx?key=${encryptedKey}`
-
+
console.log(`🧪 DOLCE 파일 다운로드 테스트:`)
console.log(` 파일명: ${fileName}`)
console.log(` FileId: ${fileId}`)
@@ -919,7 +949,7 @@ private transformToDoLCEDocument(
const buffer = Buffer.from(await response.arrayBuffer())
console.log(`✅ DOLCE 파일 다운로드 테스트 성공: ${fileName} (${buffer.length} bytes)`)
-
+
return {
success: true,
downloadUrl
diff --git a/lib/vendor-document-list/enhanced-document-service.ts b/lib/vendor-document-list/enhanced-document-service.ts
index 05ace8d5..f2d9c26f 100644
--- a/lib/vendor-document-list/enhanced-document-service.ts
+++ b/lib/vendor-document-list/enhanced-document-service.ts
@@ -2,7 +2,7 @@
"use server"
import { revalidatePath, unstable_cache } from "next/cache"
-import { and, asc, desc, eq, ilike, or, count, avg, inArray, sql } from "drizzle-orm"
+import { and, asc, desc, eq, ilike, or, count, avg, inArray, sql, ne } from "drizzle-orm"
import db from "@/db/db"
import { StageDocumentsView, documentAttachments, documentStagesOnlyView, documents, enhancedDocumentsView, issueStages, revisions, simplifiedDocumentsView, type EnhancedDocumentsView } from "@/db/schema/vendorDocu"
import { filterColumns } from "@/lib/filter-columns"
@@ -1175,3 +1175,164 @@ export async function getDocumentDetails(documentId: number) {
+ export interface UpdateRevisionInput {
+ revisionId: number
+ revision: string // ✅ revision 필드 추가
+ comment?: string | null
+ usage: string
+ usageType?: string | null
+ }
+
+ export interface UpdateRevisionResult {
+ success: boolean
+ message?: string
+ error?: string
+ updatedRevision?: any
+ }
+
+ export async function updateRevisionAction(
+ input: UpdateRevisionInput
+ ): Promise {
+ try {
+ const { revisionId, revision, comment, usage, usageType } = input
+
+ // 1. 리비전 존재 여부 확인
+ const existingRevision = await db
+ .select()
+ .from(revisions)
+ .where(eq(revisions.id, revisionId))
+ .limit(1)
+
+ if (!existingRevision || existingRevision.length === 0) {
+ return {
+ success: false,
+ error: "Revision not found"
+ }
+ }
+
+ // 2. 동일한 revision 번호가 같은 문서에 이미 존재하는지 확인 (자기 자신 제외)
+ const duplicateRevision = await db
+ .select()
+ .from(revisions)
+ .innerJoin(issueStages, eq(revisions.issueStageId, issueStages.id))
+ .where(
+ and(
+ eq(revisions.revision, revision.trim()),
+ eq(issueStages.documentId, existingRevision[0].issueStageId), // 같은 문서 내에서
+ ne(revisions.id, revisionId) // 자기 자신 제외
+ )
+ )
+ .limit(1)
+
+ if (duplicateRevision && duplicateRevision.length > 0) {
+ return {
+ success: false,
+ error: `Revision "${revision.trim()}" already exists in this document`
+ }
+ }
+
+ // 3. 첨부파일이 처리된 상태인지 확인 (수정 가능 여부 체크)
+ const attachments = await db
+ .select()
+ .from(documentAttachments)
+ .where(eq(documentAttachments.revisionId, revisionId))
+
+ const hasProcessedFiles = attachments.some(att =>
+ att.dolceFilePath && att.dolceFilePath.trim() !== ''
+ )
+
+ if (hasProcessedFiles) {
+ return {
+ success: false,
+ error: "Cannot edit revision with processed files"
+ }
+ }
+
+ // 4. 리비전 업데이트
+ const [updatedRevision] = await db
+ .update(revisions)
+ .set({
+ revision: revision.trim(), // ✅ revision 필드 업데이트 추가
+ comment: comment?.trim() || null,
+ usage: usage.trim(),
+ usageType: usageType?.trim() || null,
+ updatedAt: new Date(),
+ })
+ .where(eq(revisions.id, revisionId))
+ .returning()
+
+ revalidatePath("/partners/document-list-ship") // ✅ 경로 오타 수정
+
+ return {
+ success: true,
+ message: `Revision ${revision.trim()} updated successfully`, // ✅ 새 revision 값 사용
+ updatedRevision
+ }
+
+ } catch (error) {
+ console.error("❌ Revision update server action error:", error)
+
+ return {
+ success: false,
+ error: error instanceof Error ? error.message : "Failed to update revision"
+ }
+ }
+ }
+ // 삭제 서버 액션도 함께 만들어드릴게요
+ export interface DeleteRevisionInput {
+ revisionId: number
+ }
+
+ export interface DeleteRevisionResult {
+ success: boolean
+ message?: string
+ error?: string
+ deletedRevisionId?: number
+ deletedAttachmentsCount?: number
+ }
+
+ export async function deleteRevisionAction(
+ input: DeleteRevisionInput
+ ): Promise {
+ try {
+ const { revisionId } = input
+
+ // 1. 리비전과 첨부파일 정보 조회
+ const revision = await db
+ .select()
+ .from(revisions)
+ .where(eq(revisions.id, revisionId))
+ .limit(1)
+
+ if (!revision || revision.length === 0) {
+ return {
+ success: false,
+ error: "Revision not found"
+ }
+ }
+
+
+ // 5. 리비전 삭제
+ await db
+ .delete(revisions)
+ .where(eq(revisions.id, revisionId))
+
+ // 6. 캐시 재검증
+ revalidatePath("/parnters/document-list-ship")
+
+ return {
+ success: true,
+ message: `Revision ${revision[0].revision} deleted successfully`,
+ deletedRevisionId: revisionId,
+ deletedAttachmentsCount: 0 // revisionAttachments.length
+ }
+
+ } catch (error) {
+ console.error("❌ Revision delete server action error:", error)
+
+ return {
+ success: false,
+ error: error instanceof Error ? error.message : "Failed to delete revision"
+ }
+ }
+ }
\ No newline at end of file
diff --git a/lib/vendor-document-list/plant/document-stages-table.tsx b/lib/vendor-document-list/plant/document-stages-table.tsx
index f843862d..ccf35f4b 100644
--- a/lib/vendor-document-list/plant/document-stages-table.tsx
+++ b/lib/vendor-document-list/plant/document-stages-table.tsx
@@ -22,6 +22,8 @@ import {
Plus,
FileSpreadsheet
} from "lucide-react"
+import { useTranslation } from "@/i18n/client"
+import { useParams } from "next/navigation"
import { getDocumentStagesColumns } from "./document-stages-columns"
import { ExpandableDataTable } from "@/components/data-table/expandable-data-table"
import { toast } from "sonner"
@@ -45,6 +47,11 @@ export function DocumentStagesTable({
projectType,
}: DocumentStagesTableProps) {
const [{ data, pageCount, total }] = React.use(promises)
+
+ // URL에서 언어 파라미터 가져오기
+ const params = useParams()
+ const lng = (params?.lng as string) || 'ko'
+ const { t } = useTranslation(lng, 'document')
// 상태 관리
@@ -160,13 +167,13 @@ export function DocumentStagesTable({
.filter(Boolean)
if (stageIds.length > 0) {
- toast.success(`${stageIds.length}개 스테이지가 완료 처리되었습니다.`)
+ toast.success(t('documentList.messages.stageCompletionSuccess', { count: stageIds.length }))
}
} else if (action === 'bulk_assign') {
- toast.info("일괄 담당자 지정 기능은 준비 중입니다.")
+ toast.info(t('documentList.messages.bulkAssignPending'))
}
} catch (error) {
- toast.error("일괄 작업 중 오류가 발생했습니다.")
+ toast.error(t('documentList.messages.bulkActionError'))
}
}
@@ -260,47 +267,47 @@ export function DocumentStagesTable({
setQuickFilter('all')}>
- 전체 문서
+ {t('documentList.dashboard.totalDocuments')}
{stats.total}
- 총 {total}개 문서
+ {t('documentList.dashboard.totalDocumentCount', { total })}
setQuickFilter('overdue')}>
- 지연 문서
+ {t('documentList.dashboard.overdueDocuments')}
{stats.overdue}
- 즉시 확인 필요
+ {t('documentList.dashboard.checkImmediately')}
setQuickFilter('due_soon')}>
- 마감 임박
+ {t('documentList.dashboard.dueSoonDocuments')}
{stats.dueSoon}
- 3일 이내 마감
+ {t('documentList.dashboard.dueInDays')}
- 평균 진행률
+ {t('documentList.dashboard.averageProgress')}
{stats.avgProgress}%
- 전체 프로젝트 진행도
+ {t('documentList.dashboard.overallProgress')}
@@ -312,7 +319,7 @@ export function DocumentStagesTable({
className="cursor-pointer hover:bg-primary hover:text-primary-foreground whitespace-nowrap"
onClick={() => setQuickFilter('all')}
>
- 전체 ({stats.total})
+ {t('documentList.quickFilters.all')} ({stats.total})
setQuickFilter('overdue')}
>
- 지연 ({stats.overdue})
+ {t('documentList.quickFilters.overdue')} ({stats.overdue})
setQuickFilter('due_soon')}
>
- 마감임박 ({stats.dueSoon})
+ {t('documentList.quickFilters.dueSoon')} ({stats.dueSoon})
setQuickFilter('in_progress')}
>
- 진행중 ({stats.inProgress})
+ {t('documentList.quickFilters.inProgress')} ({stats.inProgress})
setQuickFilter('high_priority')}
>
- 높은우선순위 ({stats.highPriority})
+ {t('documentList.quickFilters.highPriority')} ({stats.highPriority})
diff --git a/lib/vendor-document-list/ship/send-to-shi-button.tsx b/lib/vendor-document-list/ship/send-to-shi-button.tsx
index 447b461b..87cc6ff5 100644
--- a/lib/vendor-document-list/ship/send-to-shi-button.tsx
+++ b/lib/vendor-document-list/ship/send-to-shi-button.tsx
@@ -28,6 +28,7 @@ import { useClientSyncStatus, useTriggerSync, syncUtils } from "@/hooks/use-sync
import type { EnhancedDocument } from "@/types/enhanced-documents"
import { useParams } from "next/navigation"
import { useTranslation } from "@/i18n/client"
+import { useSession } from "next-auth/react"
interface SendToSHIButtonProps {
documents?: EnhancedDocument[]
@@ -43,6 +44,7 @@ export function SendToSHIButton({
const [isDialogOpen, setIsDialogOpen] = React.useState(false)
const [syncProgress, setSyncProgress] = React.useState(0)
const [currentSyncingContract, setCurrentSyncingContract] = React.useState(null)
+ const { data: session } = useSession();
const params = useParams()
const lng = (params?.lng as string) || "ko"
@@ -60,6 +62,8 @@ export function SendToSHIButton({
return uniqueIds.sort()
}, [documents])
+ const vendorId = session?.user.companyId
+
// ✅ 클라이언트 전용 Hook 사용 (서버 사이드 렌더링 호환)
const { contractStatuses, totalStats, refetchAll } = useClientSyncStatus(
documentsContractIds,
@@ -68,20 +72,6 @@ export function SendToSHIButton({
const { triggerSync, isLoading: isSyncing, error: syncError } = useTriggerSync()
- // 개발 환경에서 디버깅 정보
- React.useEffect(() => {
- if (process.env.NODE_ENV === 'development') {
- console.log('SendToSHIButton Debug Info:', {
- documentsContractIds,
- totalStats,
- contractStatuses: contractStatuses.map(({ projectId, syncStatus, error }) => ({
- projectId,
- pendingChanges: syncStatus?.pendingChanges,
- hasError: !!error
- }))
- })
- }
- }, [documentsContractIds, totalStats, contractStatuses])
// 동기화 실행 함수
const handleSync = async () => {
diff --git a/lib/vendor-document-list/sync-service.ts b/lib/vendor-document-list/sync-service.ts
index 0544ce06..cdc22e11 100644
--- a/lib/vendor-document-list/sync-service.ts
+++ b/lib/vendor-document-list/sync-service.ts
@@ -8,6 +8,8 @@ import {
} from "@/db/schema/vendorDocu"
import { documents, revisions, documentAttachments } from "@/db/schema/vendorDocu"
import { eq, and, lt, desc, sql, inArray } from "drizzle-orm"
+import { getServerSession } from "next-auth/next"
+import { authOptions } from "@/app/api/auth/[...nextauth]/route"
export interface SyncableEntity {
entityType: 'document' | 'revision' | 'attachment'
@@ -42,7 +44,7 @@ class SyncService {
* 변경사항을 change_logs에 기록
*/
async logChange(
- projectId: number,
+ vendorId: number,
entityType: 'document' | 'revision' | 'attachment',
entityId: number,
action: 'CREATE' | 'UPDATE' | 'DELETE',
@@ -56,7 +58,7 @@ class SyncService {
const changedFields = this.detectChangedFields(oldValues, newValues)
await db.insert(changeLogs).values({
- projectId,
+ vendorId,
entityType,
entityId,
action,
@@ -99,7 +101,7 @@ class SyncService {
* 동기화할 변경사항 조회 (증분)
*/
async getPendingChanges(
- projectId: number,
+ vendorId: number,
targetSystem: string = 'DOLCE',
limit?: number
): Promise {
@@ -107,7 +109,7 @@ class SyncService {
.select()
.from(changeLogs)
.where(and(
- eq(changeLogs.projectId, projectId),
+ eq(changeLogs.vendorId, vendorId),
eq(changeLogs.isSynced, false),
lt(changeLogs.syncAttempts, 3),
sql`(${changeLogs.targetSystems} IS NULL OR ${changeLogs.targetSystems} @> ${JSON.stringify([targetSystem])})`
@@ -136,14 +138,14 @@ class SyncService {
* 동기화 배치 생성
*/
async createSyncBatch(
- projectId: number,
+ vendorId: number,
targetSystem: string,
changeLogIds: number[]
): Promise {
const [batch] = await db
.insert(syncBatches)
.values({
- projectId,
+ vendorId,
targetSystem,
batchSize: changeLogIds.length,
changeLogIds,
@@ -168,8 +170,16 @@ class SyncService {
throw new Error(`Sync not enabled for ${targetSystem}`)
}
+ const session = await getServerSession(authOptions)
+ if (!session?.user?.companyId) {
+ throw new Error("인증이 필요합니다.")
+ }
+
+ const vendorId = Number(session.user.companyId)
+
+
// 2. 대기 중인 변경사항 조회 (전체)
- const pendingChanges = await this.getPendingChanges(projectId, targetSystem)
+ const pendingChanges = await this.getPendingChanges(vendorId, targetSystem)
if (pendingChanges.length === 0) {
return {
@@ -182,7 +192,7 @@ class SyncService {
// 3. 배치 생성
const batchId = await this.createSyncBatch(
- projectId,
+ vendorId,
targetSystem,
pendingChanges.map(c => c.id)
)
@@ -446,11 +456,20 @@ class SyncService {
*/
async getSyncStatus(projectId: number, targetSystem: string = 'DOLCE') {
try {
+
+ const session = await getServerSession(authOptions)
+ if (!session?.user?.companyId) {
+ throw new Error("인증이 필요합니다.")
+ }
+
+ const vendorId = Number(session.user.companyId)
+
+
// 대기 중인 변경사항 수 조회
const pendingCount = await db.$count(
changeLogs,
and(
- eq(changeLogs.projectId, projectId),
+ eq(changeLogs.vendorId, vendorId),
eq(changeLogs.isSynced, false),
lt(changeLogs.syncAttempts, 3),
sql`(${changeLogs.targetSystems} IS NULL OR ${changeLogs.targetSystems} @> ${JSON.stringify([targetSystem])})`
@@ -461,7 +480,7 @@ class SyncService {
const syncedCount = await db.$count(
changeLogs,
and(
- eq(changeLogs.projectId, projectId),
+ eq(changeLogs.vendorId, vendorId),
eq(changeLogs.isSynced, true),
sql`(${changeLogs.targetSystems} IS NULL OR ${changeLogs.targetSystems} @> ${JSON.stringify([targetSystem])})`
)
@@ -471,7 +490,7 @@ class SyncService {
const failedCount = await db.$count(
changeLogs,
and(
- eq(changeLogs.projectId, projectId),
+ eq(changeLogs.vendorId, vendorId),
eq(changeLogs.isSynced, false),
sql`${changeLogs.syncAttempts} >= 3`,
sql`(${changeLogs.targetSystems} IS NULL OR ${changeLogs.targetSystems} @> ${JSON.stringify([targetSystem])})`
@@ -483,7 +502,7 @@ class SyncService {
.select()
.from(syncBatches)
.where(and(
- eq(syncBatches.projectId, projectId),
+ eq(syncBatches.vendorId, vendorId),
eq(syncBatches.targetSystem, targetSystem),
eq(syncBatches.status, 'SUCCESS')
))
@@ -491,7 +510,7 @@ class SyncService {
.limit(1)
return {
- projectId,
+ vendorId,
targetSystem,
totalChanges: pendingCount + syncedCount + failedCount,
pendingChanges: pendingCount,
@@ -511,11 +530,19 @@ class SyncService {
*/
async getRecentSyncBatches(projectId: number, targetSystem: string = 'DOLCE', limit: number = 10) {
try {
+
+ const session = await getServerSession(authOptions)
+ if (!session?.user?.companyId) {
+ throw new Error("인증이 필요합니다.")
+ }
+
+ const vendorId = Number(session.user.companyId)
+
const batches = await db
.select()
.from(syncBatches)
.where(and(
- eq(syncBatches.projectId, projectId),
+ eq(syncBatches.vendorId, vendorId),
eq(syncBatches.targetSystem, targetSystem)
))
.orderBy(desc(syncBatches.createdAt))
@@ -524,7 +551,7 @@ class SyncService {
// Date 객체를 문자열로 변환
return batches.map(batch => ({
id: Number(batch.id),
- projectId: batch.projectId,
+ vendorId: batch.vendorId,
targetSystem: batch.targetSystem,
batchSize: batch.batchSize,
status: batch.status,
@@ -561,7 +588,7 @@ export async function logDocumentChange(
}
export async function logRevisionChange(
- projectId: number,
+ vendorId: number,
revisionId: number,
action: 'CREATE' | 'UPDATE' | 'DELETE',
newValues?: any,
@@ -570,11 +597,11 @@ export async function logRevisionChange(
userName?: string,
targetSystems: string[] = ["DOLCE", "SWP"]
) {
- return syncService.logChange(projectId, 'revision', revisionId, action, newValues, oldValues, userId, userName, targetSystems)
+ return syncService.logChange(vendorId, 'revision', revisionId, action, newValues, oldValues, userId, userName, targetSystems)
}
export async function logAttachmentChange(
- projectId: number,
+ vendorId: number,
attachmentId: number,
action: 'CREATE' | 'UPDATE' | 'DELETE',
newValues?: any,
@@ -583,5 +610,5 @@ export async function logAttachmentChange(
userName?: string,
targetSystems: string[] = ["DOLCE", "SWP"]
) {
- return syncService.logChange(projectId, 'attachment', attachmentId, action, newValues, oldValues, userId, userName, targetSystems)
+ return syncService.logChange(vendorId, 'attachment', attachmentId, action, newValues, oldValues, userId, userName, targetSystems)
}
\ No newline at end of file
diff --git a/lib/vendor-document-list/table/enhanced-documents-table.tsx b/lib/vendor-document-list/table/enhanced-documents-table.tsx
index cb49f796..7e20892e 100644
--- a/lib/vendor-document-list/table/enhanced-documents-table.tsx
+++ b/lib/vendor-document-list/table/enhanced-documents-table.tsx
@@ -26,6 +26,8 @@ import {
Settings,
Filter
} from "lucide-react"
+import { useTranslation } from "@/i18n/client"
+import { useParams } from "next/navigation"
import { getUpdatedEnhancedColumns } from "./enhanced-doc-table-columns"
import { ExpandableDataTable } from "@/components/data-table/expandable-data-table"
import { toast } from "sonner"
@@ -48,7 +50,7 @@ interface FinalIntegratedDocumentsTableProps {
}
// ✅ Drawing Kind 옵션 정의
-const DRAWING_KIND_OPTIONS = [
+const DRAWING_KIND_KEYS = [
{ value: "all", label: "전체 문서" },
{ value: "B3", label: "B3: Vendor" },
{ value: "B4", label: "B4: GTT" },
@@ -63,6 +65,20 @@ export function EnhancedDocumentsTable({
initialDrawingKind = "all"
}: FinalIntegratedDocumentsTableProps) {
const [{ data, pageCount, total }] = React.use(promises)
+
+ // URL에서 언어 파라미터 가져오기
+ const params = useParams()
+ const lng = (params?.lng as string) || 'ko'
+ const { t } = useTranslation(lng, 'engineering')
+ console.log(t, 't')
+
+ // ✅ Drawing Kind 옵션 동적 생성
+ const DRAWING_KIND_OPTIONS = React.useMemo(() =>
+ DRAWING_KIND_KEYS.map(item => ({
+ value: item.value,
+ label: t(`documentList.drawingKindOptions.${item.value}`)
+ }))
+ , [t])
// ✅ Drawing Kind 필터 상태 추가
const [drawingKindFilter, setDrawingKindFilter] = React.useState(initialDrawingKind)
@@ -267,13 +283,13 @@ export function EnhancedDocumentsTable({
.filter(Boolean)
if (stageIds.length > 0) {
- toast.success(`${stageIds.length}개 항목이 승인되었습니다.`)
+ toast.success(t('documentList.messages.approvalSuccess', { count: stageIds.length }))
}
} else if (action === 'bulk_upload') {
- toast.info("일괄 업로드 기능은 준비 중입니다.")
+ toast.info(t('documentList.messages.bulkUploadPending'))
}
} catch (error) {
- toast.error("일괄 작업 중 오류가 발생했습니다.")
+ toast.error(t('documentList.messages.bulkActionError'))
}
}
@@ -318,17 +334,17 @@ export function EnhancedDocumentsTable({
const advancedFilterFields: DataTableAdvancedFilterField[] = [
{
id: "docNumber",
- label: "문서번호",
+ label: t('documentList.filters.documentNumber'),
type: "text",
},
{
id: "title",
- label: "문서제목",
+ label: t('documentList.filters.documentTitle'),
type: "text",
},
{
id: "drawingKind",
- label: "문서종류",
+ label: t('documentList.filters.documentType'),
type: "select",
options: [
{ label: "B3", value: "B3" },
@@ -338,43 +354,43 @@ export function EnhancedDocumentsTable({
},
{
id: "currentStageStatus",
- label: "스테이지 상태",
+ label: t('documentList.filters.stageStatus'),
type: "select",
options: [
- { label: "계획됨", value: "PLANNED" },
- { label: "진행중", value: "IN_PROGRESS" },
- { label: "제출됨", value: "SUBMITTED" },
- { label: "승인됨", value: "APPROVED" },
- { label: "완료됨", value: "COMPLETED" },
+ { label: t('documentList.statusOptions.planned'), value: "PLANNED" },
+ { label: t('documentList.statusOptions.inProgress'), value: "IN_PROGRESS" },
+ { label: t('documentList.statusOptions.submitted'), value: "SUBMITTED" },
+ { label: t('documentList.statusOptions.approved'), value: "APPROVED" },
+ { label: t('documentList.statusOptions.completed'), value: "COMPLETED" },
],
},
{
id: "currentStagePriority",
- label: "우선순위",
+ label: t('documentList.filters.priority'),
type: "select",
options: [
- { label: "높음", value: "HIGH" },
- { label: "보통", value: "MEDIUM" },
- { label: "낮음", value: "LOW" },
+ { label: t('documentList.priorityOptions.high'), value: "HIGH" },
+ { label: t('documentList.priorityOptions.medium'), value: "MEDIUM" },
+ { label: t('documentList.priorityOptions.low'), value: "LOW" },
],
},
{
id: "isOverdue",
- label: "지연 여부",
+ label: t('documentList.filters.overdueStatus'),
type: "select",
options: [
- { label: "지연됨", value: "true" },
- { label: "정상", value: "false" },
+ { label: t('documentList.overdueOptions.overdue'), value: "true" },
+ { label: t('documentList.overdueOptions.normal'), value: "false" },
],
},
{
id: "currentStageAssigneeName",
- label: "담당자",
+ label: t('documentList.filters.assignee'),
type: "text",
},
{
id: "createdAt",
- label: "생성일",
+ label: t('documentList.filters.createdDate'),
type: "date",
},
]
@@ -405,48 +421,48 @@ export function EnhancedDocumentsTable({
setQuickFilter('all')}>
- {drawingKindFilter === "all" ? "전체 문서" : `${DRAWING_KIND_OPTIONS.find(o => o.value === drawingKindFilter)?.label} 문서`}
+ {drawingKindFilter === "all" ? t('documentList.dashboard.totalDocuments') : `${DRAWING_KIND_OPTIONS.find(o => o.value === drawingKindFilter)?.label}`}
{stats.total}
- 총 {total}개 중 {stats.total}개 표시
+ {t('documentList.dashboard.totalCount', { total, shown: stats.total })}
setQuickFilter('overdue')}>
- 지연 문서
+ {t('documentList.dashboard.overdueDocuments')}
{stats.overdue}
- 즉시 확인 필요
+ {t('documentList.dashboard.checkImmediately')}
setQuickFilter('due_soon')}>
- 마감 임박
+ {t('documentList.dashboard.dueSoonDocuments')}
{stats.dueSoon}
- 3일 이내 마감
+ {t('documentList.dashboard.dueInDays')}
- 평균 진행률
+ {t('documentList.dashboard.averageProgress')}
{stats.avgProgress}%
- 전체 프로젝트 진행도
+ {t('documentList.dashboard.overallProgress')}
@@ -460,7 +476,7 @@ export function EnhancedDocumentsTable({
className="cursor-pointer hover:bg-primary hover:text-primary-foreground whitespace-nowrap"
onClick={() => setQuickFilter('all')}
>
- 전체 ({stats.total})
+ {t('documentList.quickFilters.all')} ({stats.total})
setQuickFilter('overdue')}
>
- 지연 ({stats.overdue})
+ {t('documentList.quickFilters.overdue')} ({stats.overdue})
setQuickFilter('due_soon')}
>
- 마감임박 ({stats.dueSoon})
+ {t('documentList.quickFilters.dueSoon')} ({stats.dueSoon})
setQuickFilter('in_progress')}
>
- 진행중 ({stats.inProgress})
+ {t('documentList.quickFilters.inProgress')} ({stats.inProgress})
setQuickFilter('high_priority')}
>
- 높은우선순위 ({stats.highPriority})
+ {t('documentList.quickFilters.highPriority')} ({stats.highPriority})
@@ -500,7 +516,7 @@ export function EnhancedDocumentsTable({
-
+
{DRAWING_KIND_OPTIONS.map(option => (
@@ -520,7 +536,7 @@ export function EnhancedDocumentsTable({
{drawingKindFilter === "B4" && (
- 상세정보 확장가능
+ {t('documentList.ui.expandedInfoAvailable')}
)}
diff --git a/lib/vendor-registration-status/vendor-registration-status-view.tsx b/lib/vendor-registration-status/vendor-registration-status-view.tsx
index b3000f73..850dd777 100644
--- a/lib/vendor-registration-status/vendor-registration-status-view.tsx
+++ b/lib/vendor-registration-status/vendor-registration-status-view.tsx
@@ -4,13 +4,11 @@ import { useState, useEffect } from "react"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
-import { Separator } from "@/components/ui/separator"
+
import {
CheckCircle,
XCircle,
FileText,
- Users,
- Building2,
AlertCircle,
Eye,
Upload
@@ -21,6 +19,9 @@ import { format } from "date-fns"
import { toast } from "sonner"
import { fetchVendorRegistrationStatus } from "@/lib/vendor-regular-registrations/service"
+// 세션에서 벤더아이디 가져오기 위한 훅
+import { useSession } from "next-auth/react"
+
// 상태별 정의
const statusConfig = {
audit_pass: {
@@ -81,11 +82,15 @@ export function VendorRegistrationStatusView() {
const [data, setData] = useState(null)
const [loading, setLoading] = useState(true)
- // 임시로 vendorId = 1 사용 (실제로는 세션에서 가져와야 함)
- const vendorId = 1
+ // 세션에서 vendorId 가져오기
+ const { data: session, status: sessionStatus } = useSession()
+ const vendorId = session?.user?.companyId
+ console.log(vendorId)
// 데이터 로드
useEffect(() => {
+ if (!vendorId) return
+
const initialLoad = async () => {
try {
const result = await fetchVendorRegistrationStatus(vendorId)
@@ -104,10 +109,14 @@ export function VendorRegistrationStatusView() {
initialLoad()
}, [vendorId])
- if (loading) {
+ if (sessionStatus === "loading" || loading) {
return 로딩 중...
}
+ if (!vendorId) {
+ return 벤더 정보가 없습니다. 다시 로그인 해주세요.
+ }
+
if (!data) {
return 데이터를 불러올 수 없습니다.
}
@@ -123,9 +132,10 @@ export function VendorRegistrationStatusView() {
const registrationForDialog: any = {
id: data.registration?.id || 0,
vendorId: data.vendor.id,
- companyName: data.vendor.companyName,
- businessNumber: data.vendor.businessNumber,
- representative: data.vendor.representative || "",
+ companyName: data.vendor.vendorName,
+ businessNumber: data.vendor.taxId,
+ representative: data.vendor.representativeName || "",
+ country: data.vendor.country || "KR", // 기본값 KR
potentialCode: data.registration?.potentialCode || "",
status: data.registration?.status || "audit_pass",
majorItems: "[]", // 빈 JSON 문자열
@@ -136,9 +146,12 @@ export function VendorRegistrationStatusView() {
assignedUser: data.registration?.assignedUser,
assignedUserCode: data.registration?.assignedUserCode,
remarks: data.registration?.remarks,
+ safetyQualificationContent: data.registration?.safetyQualificationContent || null,
+ gtcSkipped: data.registration?.gtcSkipped || false,
additionalInfo: data.additionalInfo,
documentSubmissions: data.documentStatus, // documentSubmissions를 documentStatus로 설정
contractAgreements: [],
+ basicContracts: data.basicContracts || [], // 실제 데이터 사용
documentSubmissionsStatus: data.documentStatus,
contractAgreementsStatus: {
cpDocument: data.documentStatus.cpDocument,
@@ -164,10 +177,12 @@ export function VendorRegistrationStatusView() {
}
const loadData = async () => {
+ if (!vendorId) return
try {
const result = await fetchVendorRegistrationStatus(vendorId)
if (result.success) {
setData(result.data)
+ toast.success("데이터가 새로고침되었습니다.")
} else {
toast.error(result.error)
}
@@ -226,214 +241,28 @@ export function VendorRegistrationStatusView() {
- {/* 기본 정보 */}
-
-
-
-
-
- 업체 정보
-
-
-
-
-
-
업체명:
-
{data.vendor.companyName}
-
-
-
사업자번호:
-
{data.vendor.businessNumber}
-
-
-
-
-
업체구분:
-
{data.registration ? "정규업체" : "잠재업체"}
-
-
-
eVCP 가입:
-
{data.vendor.createdAt ? format(new Date(data.vendor.createdAt), "yyyy.MM.dd") : "-"}
-
-
-
-
-
-
-
-
-
- 담당자 정보
-
-
-
-
-
-
SHI 담당자:
-
{data.registration?.assignedDepartment || "-"} {data.registration?.assignedUser || "-"}
-
-
- 진행상태:
-
- {currentStatusConfig.label}
-
-
-
-
-
-
상태변경일:
-
{data.registration?.updatedAt ? format(new Date(data.registration.updatedAt), "yyyy.MM.dd") : "-"}
-
-
-
-
+ {/* 간소화된 액션 버튼들 */}
+
+ setDocumentDialogOpen(true)}
+ variant="outline"
+ size="lg"
+ className="h-16 flex flex-col items-center gap-2"
+ >
+
+ 문서 현황 확인
+
+ setAdditionalInfoDialogOpen(true)}
+ variant={data.additionalInfo ? "outline" : "default"}
+ size="lg"
+ className="h-16 flex flex-col items-center gap-2"
+ >
+
+ {data.additionalInfo ? "추가정보 수정" : "추가정보 등록"}
+
- {/* 미완항목 */}
- {missingDocuments.length > 0 && (
-
-
-
-
- 미완항목
-
-
-
-
- {data.incompleteItemsCount.documents > 0 && (
-
- 미제출문서
- {data.incompleteItemsCount.documents} 건
-
- )}
- {!data.documentStatus.auditResult && (
-
- 실사결과
- 미실시
-
- )}
- {data.incompleteItemsCount.additionalInfo > 0 && (
-
- 추가정보
- 미입력
-
- )}
-
-
-
- )}
-
- {/* 상세 진행현황 */}
-
-
- 상세 진행현황
-
-
-
- {/* 기본 진행상황 */}
-
-
-
PQ 제출
-
- {data.pqSubmission ? (
-
-
- {format(new Date(data.pqSubmission.createdAt), "yyyy.MM.dd")}
-
- ) : (
-
-
- 미제출
-
- )}
-
-
-
-
실사 통과
-
- {data.auditPassed ? (
-
-
- 통과
-
- ) : (
-
-
- 미통과
-
- )}
-
-
-
-
문서 현황
-
setDocumentDialogOpen(true)}
- variant="outline"
- size="sm"
- className="flex items-center gap-2"
- >
-
- 확인하기
-
-
-
-
추가정보
-
setAdditionalInfoDialogOpen(true)}
- variant={data.additionalInfo ? "outline" : "default"}
- size="sm"
- className="flex items-center gap-2"
- >
-
- {data.additionalInfo ? "수정하기" : "등록하기"}
-
-
-
-
-
-
- {/* 필수문서 상태 */}
-
-
필수문서 제출 현황
-
- {requiredDocuments.map((doc) => {
- const isSubmitted = data.documentStatus[doc.key as keyof typeof data.documentStatus]
- return (
-
-
- {isSubmitted ? (
-
- ) : (
-
- )}
-
-
{doc.label}
- {isSubmitted && (
-
-
- 보기
-
- )}
-
- )
- })}
-
-
-
-
-
-
{/* 상태 설명 */}
@@ -456,6 +285,7 @@ export function VendorRegistrationStatusView() {
open={documentDialogOpen}
onOpenChange={setDocumentDialogOpen}
registration={registrationForDialog}
+ onRefresh={loadData}
/>
{/* 추가정보 입력 Dialog */}
diff --git a/lib/vendor-regular-registrations/major-items-update-sheet.tsx b/lib/vendor-regular-registrations/major-items-update-sheet.tsx
new file mode 100644
index 00000000..ba125bbe
--- /dev/null
+++ b/lib/vendor-regular-registrations/major-items-update-sheet.tsx
@@ -0,0 +1,245 @@
+"use client"
+
+import * as React from "react"
+import { useState } from "react"
+import { toast } from "sonner"
+import { X, Plus, Search } from "lucide-react"
+
+import {
+ Sheet,
+ SheetContent,
+ SheetDescription,
+ SheetHeader,
+ SheetTitle,
+} from "@/components/ui/sheet"
+import { Button } from "@/components/ui/button"
+import { Input } from "@/components/ui/input"
+import { Badge } from "@/components/ui/badge"
+import { Label } from "@/components/ui/label"
+import { searchItemsForPQ } from "@/lib/items/service"
+import { updateMajorItems } from "./service"
+
+// PQ 대상 품목 타입 정의
+interface PQItem {
+ itemCode: string
+ itemName: string
+}
+
+interface MajorItemsUpdateSheetProps {
+ open: boolean
+ onOpenChange: (open: boolean) => void
+ registrationId?: number
+ vendorName?: string
+ currentItems?: string | null
+ onSuccess?: () => void
+}
+
+export function MajorItemsUpdateSheet({
+ open,
+ onOpenChange,
+ registrationId,
+ vendorName,
+ currentItems,
+ onSuccess,
+}: MajorItemsUpdateSheetProps) {
+ const [isLoading, setIsLoading] = useState(false)
+ const [selectedItems, setSelectedItems] = useState([])
+
+ // 아이템 검색 관련 상태
+ const [itemSearchQuery, setItemSearchQuery] = useState("")
+ const [filteredItems, setFilteredItems] = useState([])
+ const [showItemDropdown, setShowItemDropdown] = useState(false)
+
+ // 기존 아이템들 파싱 및 초기화
+ React.useEffect(() => {
+ if (open && currentItems) {
+ try {
+ const parsedItems = JSON.parse(currentItems)
+ if (Array.isArray(parsedItems)) {
+ setSelectedItems(parsedItems)
+ }
+ } catch (error) {
+ console.error("기존 주요품목 파싱 오류:", error)
+ setSelectedItems([])
+ }
+ } else if (open) {
+ setSelectedItems([])
+ }
+ }, [open, currentItems])
+
+ // 아이템 검색 필터링
+ React.useEffect(() => {
+ if (itemSearchQuery.trim() === "") {
+ setFilteredItems([])
+ setShowItemDropdown(false)
+ return
+ }
+
+ const searchItems = async () => {
+ try {
+ const results = await searchItemsForPQ(itemSearchQuery)
+ setFilteredItems(results)
+ setShowItemDropdown(true)
+ } catch (error) {
+ console.error("아이템 검색 오류:", error)
+ toast.error("아이템 검색 중 오류가 발생했습니다.")
+ setFilteredItems([])
+ setShowItemDropdown(false)
+ }
+ }
+
+ // 디바운싱: 300ms 후에 검색 실행
+ const timeoutId = setTimeout(searchItems, 300)
+ return () => clearTimeout(timeoutId)
+ }, [itemSearchQuery])
+
+ // 아이템 선택 함수
+ const handleSelectItem = (item: PQItem) => {
+ // 이미 선택된 아이템인지 확인
+ const isAlreadySelected = selectedItems.some(selectedItem =>
+ selectedItem.itemCode === item.itemCode
+ )
+
+ if (!isAlreadySelected) {
+ setSelectedItems(prev => [...prev, item])
+ }
+
+ // 검색 초기화
+ setItemSearchQuery("")
+ setFilteredItems([])
+ setShowItemDropdown(false)
+ }
+
+ // 아이템 제거 함수
+ const handleRemoveItem = (itemCode: string) => {
+ setSelectedItems(prev => prev.filter(item => item.itemCode !== itemCode))
+ }
+
+ const handleSave = async () => {
+ if (!registrationId) {
+ toast.error("등록 ID가 없습니다.")
+ return
+ }
+
+ setIsLoading(true)
+ try {
+ const result = await updateMajorItems(
+ registrationId,
+ JSON.stringify(selectedItems)
+ )
+
+ if (result.success) {
+ toast.success("주요품목이 업데이트되었습니다.")
+ onOpenChange(false)
+ onSuccess?.()
+ } else {
+ toast.error(result.error || "주요품목 업데이트에 실패했습니다.")
+ }
+ } catch (error) {
+ console.error("주요품목 업데이트 오류:", error)
+ toast.error("주요품목 업데이트 중 오류가 발생했습니다.")
+ } finally {
+ setIsLoading(false)
+ }
+ }
+
+ return (
+
+
+
+ 주요품목 등록
+
+ {vendorName && `${vendorName}의 `}주요품목을 등록해주세요.
+
+
+
+
+ {/* 선택된 아이템들 표시 */}
+ {selectedItems.length > 0 && (
+
+
선택된 주요품목 ({selectedItems.length}개)
+
+ {selectedItems.map((item) => (
+
+
+ {item.itemCode} - {item.itemName}
+
+ handleRemoveItem(item.itemCode)}
+ >
+
+
+
+ ))}
+
+
+ )}
+
+ {/* 검색 입력 */}
+
+
품목 검색 및 추가
+
+
+
+ setItemSearchQuery(e.target.value)}
+ className="pl-9"
+ />
+
+
+ {/* 검색 결과 드롭다운 */}
+ {showItemDropdown && (
+
+ {filteredItems.length > 0 ? (
+ filteredItems.map((item) => (
+
handleSelectItem(item)}
+ >
+ {item.itemCode}
+ {item.itemName}
+
+ ))
+ ) : (
+
+ 검색 결과가 없습니다.
+
+ )}
+
+ )}
+
+
+
+ 아이템 코드나 이름을 입력하여 검색하고 선택하세요.
+
+
+
+
+
+ onOpenChange(false)}
+ disabled={isLoading}
+ >
+ 취소
+
+
+ {isLoading ? "저장 중..." : "저장"}
+
+
+
+
+ )
+}
diff --git a/lib/vendor-regular-registrations/repository.ts b/lib/vendor-regular-registrations/repository.ts
index d4c979a5..38bf4aaf 100644
--- a/lib/vendor-regular-registrations/repository.ts
+++ b/lib/vendor-regular-registrations/repository.ts
@@ -5,8 +5,11 @@ import {
vendorAttachments,
vendorInvestigationAttachments,
basicContract,
+ basicContractTemplates,
vendorPQSubmissions,
vendorInvestigations,
+ vendorBusinessContacts,
+ vendorAdditionalInfo,
} from "@/db/schema";
import { eq, desc, and, sql, inArray } from "drizzle-orm";
import type { VendorRegularRegistration } from "@/config/vendorRegularRegistrationsColumnsConfig";
@@ -27,11 +30,16 @@ export async function getVendorRegularRegistrations(
assignedDepartment: vendorRegularRegistrations.assignedDepartment,
assignedUser: vendorRegularRegistrations.assignedUser,
remarks: vendorRegularRegistrations.remarks,
+ // 새로 추가된 필드들
+ safetyQualificationContent: vendorRegularRegistrations.safetyQualificationContent,
+ gtcSkipped: vendorRegularRegistrations.gtcSkipped,
// 벤더 기본 정보
businessNumber: vendors.taxId,
companyName: vendors.vendorName,
establishmentDate: vendors.createdAt,
representative: vendors.representativeName,
+ // 국가 정보 추가
+ country: vendors.country,
})
.from(vendorRegularRegistrations)
.innerJoin(vendors, eq(vendorRegularRegistrations.vendorId, vendors.id))
@@ -59,23 +67,81 @@ export async function getVendorRegularRegistrations(
.innerJoin(vendorInvestigations, eq(vendorInvestigationAttachments.investigationId, vendorInvestigations.id))
.where(inArray(vendorInvestigations.vendorId, vendorIds)) : [];
+ // 기본 계약 정보 조회 (템플릿별로 가장 최신 것만)
+ const basicContractsList = vendorIds.length > 0 ? await db
+ .select({
+ vendorId: basicContract.vendorId,
+ templateId: basicContract.templateId,
+ status: basicContract.status,
+ templateName: basicContractTemplates.templateName,
+ createdAt: basicContract.createdAt,
+ })
+ .from(basicContract)
+ .leftJoin(basicContractTemplates, eq(basicContract.templateId, basicContractTemplates.id))
+ .where(inArray(basicContract.vendorId, vendorIds))
+ .orderBy(desc(basicContract.createdAt)) : [];
+
+ // 추가정보 입력 상태 조회 (업무담당자 정보)
+ const businessContactsList = vendorIds.length > 0 ? await db
+ .select({
+ vendorId: vendorBusinessContacts.vendorId,
+ contactType: vendorBusinessContacts.contactType,
+ })
+ .from(vendorBusinessContacts)
+ .where(inArray(vendorBusinessContacts.vendorId, vendorIds)) : [];
+
+ // 추가정보 테이블 조회
+ const additionalInfoList = vendorIds.length > 0 ? await db
+ .select({
+ vendorId: vendorAdditionalInfo.vendorId,
+ })
+ .from(vendorAdditionalInfo)
+ .where(inArray(vendorAdditionalInfo.vendorId, vendorIds)) : [];
+
// 각 등록 레코드별로 데이터를 매핑하여 결과 반환
return registrations.map((registration) => {
// 벤더별 첨부파일 필터링
const vendorFiles = vendorAttachmentsList.filter(att => att.vendorId === registration.vendorId);
const investigationFiles = investigationAttachmentsList.filter(att => att.vendorId === registration.vendorId);
+ const allVendorContracts = basicContractsList.filter(contract => contract.vendorId === registration.vendorId);
+ const vendorContacts = businessContactsList.filter(contact => contact.vendorId === registration.vendorId);
+ const vendorAdditionalInfoData = additionalInfoList.filter(info => info.vendorId === registration.vendorId);
+
+ // 기술자료 동의서, 비밀유지계약서 제외 필터링
+ const filteredContracts = allVendorContracts.filter(contract => {
+ const templateName = contract.templateName?.toLowerCase() || '';
+ return !templateName.includes('기술자료') && !templateName.includes('비밀유지');
+ });
+
+ // 템플릿명 기준으로 가장 최신 계약만 유지 (중복 제거)
+ const vendorContracts = filteredContracts.reduce((acc, contract) => {
+ const existing = acc.find(c => c.templateName === contract.templateName);
+ if (!existing || (contract.createdAt && existing.createdAt && contract.createdAt > existing.createdAt)) {
+ // 기존에 같은 템플릿명이 없거나, 더 최신인 경우 추가/교체
+ return acc.filter(c => c.templateName !== contract.templateName).concat(contract);
+ }
+ return acc;
+ }, [] as typeof filteredContracts);
// 디버깅을 위한 로그
- console.log(`📋 벤더 ID ${registration.vendorId} (${registration.companyName}) 첨부파일 현황:`, {
+ console.log(`📋 벤더 ID ${registration.vendorId} (${registration.companyName}) 현황:`, {
vendorFiles: vendorFiles.map(f => ({ type: f.attachmentType, fileName: f.fileName })),
- investigationFiles: investigationFiles.map(f => ({ type: f.attachmentType, fileName: f.fileName }))
+ investigationFiles: investigationFiles.map(f => ({ type: f.attachmentType, fileName: f.fileName })),
+ allContracts: allVendorContracts.length,
+ uniqueContracts: vendorContracts.map(c => ({
+ templateName: c.templateName,
+ status: c.status,
+ createdAt: c.createdAt?.toISOString()
+ })),
+ contactTypes: vendorContacts.map(c => c.contactType)
});
- // 문서 제출 현황 - 실제 첨부파일 존재 여부 확인 (DB 타입명과 정확히 매칭)
+ // 문서 제출 현황 - 국가별 요구사항 적용
+ const isForeign = registration.country !== 'KR';
const documentSubmissionsStatus = {
businessRegistration: vendorFiles.some(f => f.attachmentType === "BUSINESS_REGISTRATION"),
creditEvaluation: vendorFiles.some(f => f.attachmentType === "CREDIT_REPORT"),
- bankCopy: vendorFiles.some(f => f.attachmentType === "BANK_ACCOUNT_COPY"),
+ bankCopy: isForeign ? vendorFiles.some(f => f.attachmentType === "BANK_ACCOUNT_COPY") : true, // 내자는 통장사본 불필요
auditResult: investigationFiles.length > 0, // 실사 첨부파일이 하나라도 있으면 true
};
@@ -88,33 +154,88 @@ export async function getVendorRegularRegistrations(
};
// 문서 제출 현황 로그
- console.log(`📊 벤더 ID ${registration.vendorId} 문서 제출 현황:`, documentSubmissionsStatus);
+ console.log(`📊 벤더 ID ${registration.vendorId} 문서 제출 현황:`, {
+ documentSubmissionsStatus,
+ isForeign,
+ vendorFiles: vendorFiles.map(f => ({
+ type: f.attachmentType,
+ fileName: f.fileName
+ })),
+ investigationFilesCount: investigationFiles.length,
+ country: registration.country
+ });
- // 계약 동의 현황 (기본값 - 추후 실제 계약 테이블과 연동)
+ // 계약 동의 현황 - 실제 기본 계약 데이터 기반으로 단순화
const contractAgreementsStatus = {
- cp: "not_submitted",
- gtc: "not_submitted",
- standardSubcontract: "not_submitted",
- safetyHealth: "not_submitted",
- ethics: "not_submitted",
- domesticCredit: "not_submitted",
- safetyQualification: "not_submitted",
+ cp: vendorContracts.some(c => c.status === "COMPLETED") ? "completed" : "not_submitted",
+ gtc: registration.gtcSkipped ? "completed" : (vendorContracts.some(c => c.templateName?.includes("GTC") && c.status === "COMPLETED") ? "completed" : "not_submitted"),
+ standardSubcontract: vendorContracts.some(c => c.templateName?.includes("표준하도급") && c.status === "COMPLETED") ? "completed" : "not_submitted",
+ safetyHealth: vendorContracts.some(c => c.templateName?.includes("안전보건") && c.status === "COMPLETED") ? "completed" : "not_submitted",
+ ethics: vendorContracts.some(c => c.templateName?.includes("윤리") && c.status === "COMPLETED") ? "completed" : "not_submitted",
+ domesticCredit: vendorContracts.some(c => c.templateName?.includes("내국신용장") && c.status === "COMPLETED") ? "completed" : "not_submitted",
};
+ // 추가정보 입력 완료 여부 - 5개 필수 업무담당자 타입 + 추가정보 테이블 모두 입력되었는지 확인
+ const requiredContactTypes = ["sales", "design", "delivery", "quality", "tax_invoice"];
+ const contactsCompleted = requiredContactTypes.every(type =>
+ vendorContacts.some(contact => contact.contactType === type)
+ );
+ const additionalInfoTableCompleted = vendorAdditionalInfoData.length > 0;
+ const additionalInfoCompleted = contactsCompleted && additionalInfoTableCompleted;
+
+ // 추가정보 디버깅 로그
+ console.log(`🔍 벤더 ID ${registration.vendorId} 추가정보 상세:`, {
+ requiredContactTypes,
+ vendorContactTypes: vendorContacts.map(c => c.contactType),
+ contactsCompleted,
+ additionalInfoTableCompleted,
+ additionalInfoData: vendorAdditionalInfoData,
+ finalAdditionalInfoCompleted: additionalInfoCompleted
+ });
+
+ // 모든 조건 충족 여부 확인
+ const allDocumentsSubmitted = Object.values(documentSubmissionsStatus).every(status => status === true);
+ const allContractsCompleted = vendorContracts.length > 0 && vendorContracts.every(c => c.status === "COMPLETED");
+ const safetyQualificationCompleted = !!registration.safetyQualificationContent;
+
+ // 모든 조건이 충족되면 status를 "approval_ready"(조건충족)로 자동 변경
+ const shouldUpdateStatus = allDocumentsSubmitted && allContractsCompleted && safetyQualificationCompleted && additionalInfoCompleted;
+
+ // 현재 상태가 조건충족이 아닌데 모든 조건이 충족되면 상태 업데이트
+ if (shouldUpdateStatus && registration.status !== "approval_ready") {
+ // 비동기 업데이트 (백그라운드에서 실행)
+ updateVendorRegularRegistration(registration.id, {
+ status: "approval_ready"
+ }).catch(error => {
+ console.error(`상태 자동 업데이트 실패 (벤더 ID: ${registration.vendorId}):`, error);
+ });
+ }
+
return {
id: registration.id,
vendorId: registration.vendorId,
- status: registration.status || "audit_pass",
+ status: shouldUpdateStatus ? "approval_ready" : (registration.status || "audit_pass"),
potentialCode: registration.potentialCode,
businessNumber: registration.businessNumber || "",
companyName: registration.companyName || "",
majorItems: registration.majorItems,
establishmentDate: registration.establishmentDate?.toISOString() || null,
representative: registration.representative,
+ country: registration.country,
documentSubmissions: documentSubmissionsStatus,
documentFiles: documentFiles, // 파일 정보 추가
contractAgreements: contractAgreementsStatus,
- additionalInfo: true, // TODO: 추가정보 로직 구현 필요
+ // 새로 추가된 필드들
+ safetyQualificationContent: registration.safetyQualificationContent,
+ gtcSkipped: registration.gtcSkipped || false,
+ additionalInfo: additionalInfoCompleted,
+ // 기본계약 정보
+ basicContracts: vendorContracts.map(contract => ({
+ templateId: contract.templateId,
+ templateName: contract.templateName,
+ status: contract.status,
+ createdAt: contract.createdAt,
+ })),
registrationRequestDate: registration.registrationRequestDate || null,
assignedDepartment: registration.assignedDepartment,
assignedUser: registration.assignedUser,
@@ -137,6 +258,8 @@ export async function createVendorRegularRegistration(data: {
assignedUser?: string;
assignedUserCode?: string;
remarks?: string;
+ safetyQualificationContent?: string;
+ gtcSkipped?: boolean;
}) {
try {
const [registration] = await db
@@ -151,6 +274,8 @@ export async function createVendorRegularRegistration(data: {
assignedUser: data.assignedUser,
assignedUserCode: data.assignedUserCode,
remarks: data.remarks,
+ safetyQualificationContent: data.safetyQualificationContent,
+ gtcSkipped: data.gtcSkipped || false,
})
.returning();
@@ -173,6 +298,8 @@ export async function updateVendorRegularRegistration(
assignedUser: string;
assignedUserCode: string;
remarks: string;
+ safetyQualificationContent: string;
+ gtcSkipped: boolean;
}>
) {
try {
diff --git a/lib/vendor-regular-registrations/safety-qualification-update-sheet.tsx b/lib/vendor-regular-registrations/safety-qualification-update-sheet.tsx
new file mode 100644
index 00000000..a93fbf22
--- /dev/null
+++ b/lib/vendor-regular-registrations/safety-qualification-update-sheet.tsx
@@ -0,0 +1,143 @@
+"use client"
+
+import * as React from "react"
+import { useForm } from "react-hook-form"
+import { zodResolver } from "@hookform/resolvers/zod"
+import { z } from "zod"
+import { toast } from "sonner"
+
+import {
+ Sheet,
+ SheetContent,
+ SheetDescription,
+ SheetHeader,
+ SheetTitle,
+} from "@/components/ui/sheet"
+import {
+ Form,
+ FormControl,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+} from "@/components/ui/form"
+import { Button } from "@/components/ui/button"
+import { Textarea } from "@/components/ui/textarea"
+import { updateSafetyQualification } from "./service"
+
+const formSchema = z.object({
+ safetyQualificationContent: z.string().min(1, "안전적격성 평가 내용을 입력해주세요."),
+})
+
+interface SafetyQualificationUpdateSheetProps {
+ open: boolean
+ onOpenChange: (open: boolean) => void
+ registrationId?: number
+ vendorName?: string
+ currentContent?: string | null
+ onSuccess?: () => void
+}
+
+export function SafetyQualificationUpdateSheet({
+ open,
+ onOpenChange,
+ registrationId,
+ vendorName,
+ currentContent,
+ onSuccess,
+}: SafetyQualificationUpdateSheetProps) {
+ const [isLoading, setIsLoading] = React.useState(false)
+
+ const form = useForm>({
+ resolver: zodResolver(formSchema),
+ defaultValues: {
+ safetyQualificationContent: currentContent || "",
+ },
+ })
+
+ // 폼 값 초기화
+ React.useEffect(() => {
+ if (open) {
+ form.reset({
+ safetyQualificationContent: currentContent || "",
+ })
+ }
+ }, [open, currentContent, form])
+
+ async function onSubmit(values: z.infer) {
+ if (!registrationId) {
+ toast.error("등록 ID가 없습니다.")
+ return
+ }
+
+ setIsLoading(true)
+ try {
+ const result = await updateSafetyQualification(
+ registrationId,
+ values.safetyQualificationContent
+ )
+
+ if (result.success) {
+ toast.success("안전적격성 평가가 등록되었습니다.")
+ onOpenChange(false)
+ onSuccess?.()
+ } else {
+ toast.error(result.error || "안전적격성 평가 등록에 실패했습니다.")
+ }
+ } catch (error) {
+ console.error("안전적격성 평가 등록 오류:", error)
+ toast.error("안전적격성 평가 등록 중 오류가 발생했습니다.")
+ } finally {
+ setIsLoading(false)
+ }
+ }
+
+ return (
+
+
+
+ 안전적격성 평가 입력
+
+ {vendorName && `${vendorName}의 `}안전적격성 평가 내용을 입력해주세요.
+
+
+
+
+
+ (
+
+ 안전적격성 평가 내용
+
+
+
+
+
+ )}
+ />
+
+
+ onOpenChange(false)}
+ disabled={isLoading}
+ >
+ 취소
+
+
+ {isLoading ? "저장 중..." : "저장"}
+
+
+
+
+
+
+ )
+}
diff --git a/lib/vendor-regular-registrations/service.ts b/lib/vendor-regular-registrations/service.ts
index b587ec23..51f4e82b 100644
--- a/lib/vendor-regular-registrations/service.ts
+++ b/lib/vendor-regular-registrations/service.ts
@@ -11,6 +11,7 @@ import { getServerSession } from "next-auth";
import { authOptions } from "@/app/api/auth/[...nextauth]/route";
import { headers } from "next/headers";
import { sendEmail } from "@/lib/mail/sendEmail";
+import type { RegistrationRequestData } from "@/components/vendor-regular-registrations/registration-request-dialog";
import {
vendors,
vendorRegularRegistrations,
@@ -20,7 +21,8 @@ import {
basicContract,
vendorPQSubmissions,
vendorBusinessContacts,
- vendorAdditionalInfo
+ vendorAdditionalInfo,
+ basicContractTemplates
} from "@/db/schema";
import db from "@/db/db";
import { inArray, eq, desc } from "drizzle-orm";
@@ -437,7 +439,7 @@ export async function skipLegalReview(vendorIds: number[], skipReason: string) {
const newRegistration = await createVendorRegularRegistration({
vendorId: vendorId,
status: "cp_finished", // CP완료로 변경
- remarks: `법무검토 Skip: ${skipReason}`,
+ remarks: `GTC Skip: ${skipReason}`,
});
registrationId = newRegistration.id;
} else {
@@ -445,11 +447,12 @@ export async function skipLegalReview(vendorIds: number[], skipReason: string) {
registrationId = existingRegistrations[0].id;
const currentRemarks = existingRegistrations[0].remarks || "";
const newRemarks = currentRemarks
- ? `${currentRemarks}\n법무검토 Skip: ${skipReason}`
- : `법무검토 Skip: ${skipReason}`;
+ ? `${currentRemarks}\nGTC Skip: ${skipReason}`
+ : `GTC Skip: ${skipReason}`;
await updateVendorRegularRegistration(registrationId, {
status: "cp_finished", // CP완료로 변경
+ gtcSkipped: true, // GTC Skip 여부 설정
remarks: newRemarks,
});
}
@@ -470,18 +473,19 @@ export async function skipLegalReview(vendorIds: number[], skipReason: string) {
return {
success: true,
- message: `${successCount}개 업체의 법무검토를 Skip 처리했습니다.`,
+ message: `${successCount}개 업체의 GTC를 Skip 처리했습니다.`,
};
} catch (error) {
console.error("Error skipping legal review:", error);
return {
success: false,
- error: error instanceof Error ? error.message : "법무검토 Skip 처리 중 오류가 발생했습니다.",
+ error: error instanceof Error ? error.message : "GTC Skip 처리 중 오류가 발생했습니다.",
};
}
}
-// 안전적격성평가 Skip 기능
+// 안전적격성평가 Skip 기능 (삭제됨 - 개별 입력으로 대체)
+/*
export async function skipSafetyQualification(vendorIds: number[], skipReason: string) {
try {
const session = await getServerSession(authOptions);
@@ -562,6 +566,42 @@ export async function skipSafetyQualification(vendorIds: number[], skipReason: s
};
}
}
+*/
+
+// 주요품목 업데이트
+export async function updateMajorItems(
+ registrationId: number,
+ majorItems: string
+) {
+ try {
+ const session = await getServerSession(authOptions);
+ if (!session?.user) {
+ return { success: false, error: "로그인이 필요합니다." };
+ }
+
+ const result = await updateVendorRegularRegistration(registrationId, {
+ majorItems: majorItems,
+ });
+
+ if (!result) {
+ return { success: false, error: "등록 정보를 찾을 수 없습니다." };
+ }
+
+ // 캐시 무효화
+ revalidateTag("vendor-regular-registrations");
+
+ return {
+ success: true,
+ message: "주요품목이 업데이트되었습니다.",
+ };
+ } catch (error) {
+ console.error("Error updating major items:", error);
+ return {
+ success: false,
+ error: error instanceof Error ? error.message : "주요품목 업데이트 중 오류가 발생했습니다.",
+ };
+ }
+}
// 벤더용 현황 조회 함수들
export async function fetchVendorRegistrationStatus(vendorId: number) {
@@ -570,7 +610,15 @@ export async function fetchVendorRegistrationStatus(vendorId: number) {
try {
// 벤더 기본 정보
const vendor = await db
- .select()
+ .select({
+ id: vendors.id,
+ vendorName: vendors.vendorName,
+ taxId: vendors.taxId,
+ representativeName: vendors.representativeName,
+ country: vendors.country,
+ createdAt: vendors.createdAt,
+ updatedAt: vendors.updatedAt,
+ })
.from(vendors)
.where(eq(vendors.id, vendorId))
.limit(1)
@@ -584,7 +632,23 @@ export async function fetchVendorRegistrationStatus(vendorId: number) {
// 정규업체 등록 정보
const registration = await db
- .select()
+ .select({
+ id: vendorRegularRegistrations.id,
+ vendorId: vendorRegularRegistrations.vendorId,
+ potentialCode: vendorRegularRegistrations.potentialCode,
+ status: vendorRegularRegistrations.status,
+ majorItems: vendorRegularRegistrations.majorItems,
+ registrationRequestDate: vendorRegularRegistrations.registrationRequestDate,
+ assignedDepartment: vendorRegularRegistrations.assignedDepartment,
+ assignedDepartmentCode: vendorRegularRegistrations.assignedDepartmentCode,
+ assignedUser: vendorRegularRegistrations.assignedUser,
+ assignedUserCode: vendorRegularRegistrations.assignedUserCode,
+ remarks: vendorRegularRegistrations.remarks,
+ safetyQualificationContent: vendorRegularRegistrations.safetyQualificationContent,
+ gtcSkipped: vendorRegularRegistrations.gtcSkipped,
+ createdAt: vendorRegularRegistrations.createdAt,
+ updatedAt: vendorRegularRegistrations.updatedAt,
+ })
.from(vendorRegularRegistrations)
.where(eq(vendorRegularRegistrations.vendorId, vendorId))
.limit(1)
@@ -613,12 +677,45 @@ export async function fetchVendorRegistrationStatus(vendorId: number) {
.orderBy(desc(vendorPQSubmissions.createdAt))
.limit(1)
- // 기본계약 정보
- const contractInfo = await db
- .select()
+ // 기본계약 정보 - 템플릿 정보와 함께 조회
+ const allVendorContracts = await db
+ .select({
+ templateId: basicContract.templateId,
+ templateName: basicContractTemplates.templateName,
+ status: basicContract.status,
+ createdAt: basicContract.createdAt,
+ })
.from(basicContract)
+ .leftJoin(basicContractTemplates, eq(basicContract.templateId, basicContractTemplates.id))
.where(eq(basicContract.vendorId, vendorId))
- .limit(1)
+ .orderBy(desc(basicContract.createdAt))
+
+ // 계약 필터링 (기술자료, 비밀유지 제외)
+ const filteredContracts = allVendorContracts.filter(contract =>
+ contract.templateName &&
+ !contract.templateName.includes("기술자료") &&
+ !contract.templateName.includes("비밀유지")
+ )
+
+ // 템플릿 이름별로 가장 최신 계약만 유지
+ const vendorContracts = filteredContracts.reduce((acc: typeof filteredContracts, contract) => {
+ const existing = acc.find((c: typeof contract) => c.templateName === contract.templateName)
+ if (!existing || (contract.createdAt && existing.createdAt && contract.createdAt > existing.createdAt)) {
+ return acc.filter((c: typeof contract) => c.templateName !== contract.templateName).concat(contract)
+ }
+ return acc
+ }, [] as typeof filteredContracts)
+
+ console.log(`🏢 Partners 벤더 ID ${vendorId} 기본계약 정보:`, {
+ allContractsCount: allVendorContracts.length,
+ filteredContractsCount: filteredContracts.length,
+ finalContractsCount: vendorContracts.length,
+ vendorContracts: vendorContracts.map((c: any) => ({
+ templateName: c.templateName,
+ status: c.status,
+ createdAt: c.createdAt
+ }))
+ })
// 업무담당자 정보
const businessContacts = await db
@@ -636,15 +733,15 @@ export async function fetchVendorRegistrationStatus(vendorId: number) {
// 문서 제출 현황 계산
const documentStatus = {
businessRegistration: vendorFiles.some(f => f.attachmentType === "BUSINESS_REGISTRATION"),
- creditEvaluation: vendorFiles.some(f => f.attachmentType === "CREDIT_EVALUATION"),
- bankCopy: vendorFiles.some(f => f.attachmentType === "BANK_COPY"),
+ creditEvaluation: vendorFiles.some(f => f.attachmentType === "CREDIT_REPORT"), // CREDIT_EVALUATION -> CREDIT_REPORT
+ bankCopy: vendorFiles.some(f => f.attachmentType === "BANK_ACCOUNT_COPY"), // BANK_COPY -> BANK_ACCOUNT_COPY
auditResult: investigationFiles.length > 0, // DocumentStatusDialog에서 사용하는 키
- cpDocument: !!contractInfo[0]?.status && contractInfo[0].status === "completed",
- gtc: !!contractInfo[0]?.status && contractInfo[0].status === "completed",
- standardSubcontract: !!contractInfo[0]?.status && contractInfo[0].status === "completed",
- safetyHealth: !!contractInfo[0]?.status && contractInfo[0].status === "completed",
- ethics: !!contractInfo[0]?.status && contractInfo[0].status === "completed",
- domesticCredit: !!contractInfo[0]?.status && contractInfo[0].status === "completed",
+ cpDocument: vendorContracts.some(c => c.status === "COMPLETED"),
+ gtc: vendorContracts.some(c => c.templateName?.includes("GTC") && c.status === "COMPLETED"),
+ standardSubcontract: vendorContracts.some(c => c.templateName?.includes("표준하도급") && c.status === "COMPLETED"),
+ safetyHealth: vendorContracts.some(c => c.templateName?.includes("안전보건") && c.status === "COMPLETED"),
+ ethics: vendorContracts.some(c => c.templateName?.includes("윤리") && c.status === "COMPLETED"),
+ domesticCredit: vendorContracts.some(c => c.templateName?.includes("신용") && c.status === "COMPLETED"),
safetyQualification: investigationFiles.length > 0,
}
@@ -656,6 +753,26 @@ export async function fetchVendorRegistrationStatus(vendorId: number) {
const requiredContactTypes = ["sales", "design", "delivery", "quality", "tax_invoice"]
const existingContactTypes = businessContacts.map(contact => contact.contactType)
const missingContactTypes = requiredContactTypes.filter(type => !existingContactTypes.includes(type))
+
+ // 추가정보 완료 여부 (업무담당자 + 추가정보 테이블 모두 필요)
+ const contactsCompleted = missingContactTypes.length === 0
+ const additionalInfoTableCompleted = !!additionalInfo[0]
+ const additionalInfoCompleted = contactsCompleted && additionalInfoTableCompleted
+
+ console.log(`🔍 Partners 벤더 ID ${vendorId} 전체 데이터:`, {
+ vendor: vendor[0],
+ registration: registration[0],
+ safetyQualificationContent: registration[0]?.safetyQualificationContent,
+ gtcSkipped: registration[0]?.gtcSkipped,
+ requiredContactTypes,
+ existingContactTypes,
+ missingContactTypes,
+ contactsCompleted,
+ additionalInfoTableCompleted,
+ additionalInfoData: additionalInfo[0],
+ finalAdditionalInfoCompleted: additionalInfoCompleted,
+ basicContractsCount: vendorContracts.length
+ })
return {
success: true,
@@ -666,10 +783,10 @@ export async function fetchVendorRegistrationStatus(vendorId: number) {
missingDocuments,
businessContacts,
missingContactTypes,
- additionalInfo: additionalInfo[0] || null,
+ additionalInfo: additionalInfoCompleted, // boolean 값으로 변경
pqSubmission: pqSubmission[0] || null,
auditPassed: investigationFiles.length > 0,
- contractInfo: contractInfo[0] || null,
+ basicContracts: vendorContracts, // 기본계약 정보 추가
incompleteItemsCount: {
documents: missingDocuments.length,
contacts: missingContactTypes.length,
@@ -823,3 +940,240 @@ export async function saveVendorAdditionalInfo(
}
}
}
+
+// 안전적격성 평가 업데이트
+export async function updateSafetyQualification(
+ registrationId: number,
+ safetyQualificationContent: string
+) {
+ try {
+ const session = await getServerSession(authOptions);
+ if (!session?.user) {
+ return { success: false, error: "로그인이 필요합니다." };
+ }
+
+ const result = await updateVendorRegularRegistration(registrationId, {
+ safetyQualificationContent: safetyQualificationContent.trim(),
+ });
+
+ if (!result) {
+ return { success: false, error: "등록 정보를 찾을 수 없습니다." };
+ }
+
+ // 캐시 무효화
+ revalidateTag("vendor-regular-registrations");
+
+ return {
+ success: true,
+ message: "안전적격성 평가가 등록되었습니다.",
+ };
+ } catch (error) {
+ console.error("Error updating safety qualification:", error);
+ return {
+ success: false,
+ error: error instanceof Error ? error.message : "안전적격성 평가 등록 중 오류가 발생했습니다.",
+ };
+ }
+}
+
+// GTC Skip 처리
+export async function updateGtcSkip(
+ registrationId: number,
+ skipReason: string
+) {
+ try {
+ const session = await getServerSession(authOptions);
+ if (!session?.user) {
+ return { success: false, error: "로그인이 필요합니다." };
+ }
+
+ // 현재 비고 가져오기
+ const existingRegistration = await getVendorRegularRegistrationById(registrationId);
+ if (!existingRegistration) {
+ return { success: false, error: "등록 정보를 찾을 수 없습니다." };
+ }
+
+ const currentRemarks = existingRegistration.remarks || "";
+ const newRemarks = currentRemarks
+ ? `${currentRemarks}\nGTC Skip: ${skipReason}`
+ : `GTC Skip: ${skipReason}`;
+
+ const result = await updateVendorRegularRegistration(registrationId, {
+ gtcSkipped: true,
+ remarks: newRemarks,
+ });
+
+ if (!result) {
+ return { success: false, error: "등록 정보를 찾을 수 없습니다." };
+ }
+
+ // 캐시 무효화
+ revalidateTag("vendor-regular-registrations");
+
+ return {
+ success: true,
+ message: "GTC Skip이 처리되었습니다.",
+ };
+ } catch (error) {
+ console.error("Error updating GTC skip:", error);
+ return {
+ success: false,
+ error: error instanceof Error ? error.message : "GTC Skip 처리 중 오류가 발생했습니다.",
+ };
+ }
+}
+
+// 정규업체 등록 요청을 위한 상세 데이터 조회
+export async function fetchRegistrationRequestData(registrationId: number) {
+ try {
+ // 등록 정보 조회
+ const registration = await db
+ .select()
+ .from(vendorRegularRegistrations)
+ .where(eq(vendorRegularRegistrations.id, registrationId))
+ .limit(1);
+
+ if (!registration[0]) {
+ return { success: false, error: "등록 정보를 찾을 수 없습니다." };
+ }
+
+ // 벤더 정보 조회
+ const vendor = await db
+ .select({
+ id: vendors.id,
+ vendorName: vendors.vendorName,
+ taxId: vendors.taxId,
+ representativeName: vendors.representativeName,
+ representativeBirth: vendors.representativeBirth,
+ representativeEmail: vendors.representativeEmail,
+ representativePhone: vendors.representativePhone,
+ representativeWorkExpirence: vendors.representativeWorkExpirence,
+ country: vendors.country,
+ corporateRegistrationNumber: vendors.corporateRegistrationNumber,
+ address: vendors.address,
+ phone: vendors.phone,
+ email: vendors.email,
+ createdAt: vendors.createdAt,
+ updatedAt: vendors.updatedAt,
+ })
+ .from(vendors)
+ .where(eq(vendors.id, registration[0].vendorId))
+ .limit(1);
+
+ if (!vendor[0]) {
+ return { success: false, error: "벤더 정보를 찾을 수 없습니다." };
+ }
+
+ // 업무담당자 정보 조회
+ const businessContacts = await db
+ .select()
+ .from(vendorBusinessContacts)
+ .where(eq(vendorBusinessContacts.vendorId, vendor[0].id));
+
+ // 추가정보 조회
+ const additionalInfo = await db
+ .select()
+ .from(vendorAdditionalInfo)
+ .where(eq(vendorAdditionalInfo.vendorId, vendor[0].id))
+ .limit(1);
+
+ return {
+ success: true,
+ data: {
+ registration: registration[0],
+ vendor: vendor[0],
+ businessContacts,
+ additionalInfo: additionalInfo[0] || null,
+ }
+ };
+
+ } catch (error) {
+ console.error("정규업체 등록 요청 데이터 조회 오류:", error);
+ return {
+ success: false,
+ error: error instanceof Error ? error.message : "데이터 조회 중 오류가 발생했습니다."
+ };
+ }
+}
+
+// 정규업체 등록 요청 서버 액션
+export async function submitRegistrationRequest(
+ registrationId: number,
+ requestData: RegistrationRequestData
+) {
+ try {
+ const session = await getServerSession(authOptions);
+ if (!session?.user) {
+ return { success: false, error: "인증이 필요합니다." };
+ }
+
+ // 현재 등록 정보 조회
+ const registration = await db
+ .select()
+ .from(vendorRegularRegistrations)
+ .where(eq(vendorRegularRegistrations.id, registrationId))
+ .limit(1);
+
+ if (!registration[0]) {
+ return { success: false, error: "등록 정보를 찾을 수 없습니다." };
+ }
+
+ // 조건충족 상태인지 확인
+ if (registration[0].status !== "approval_ready") {
+ return { success: false, error: "조건충족 상태가 아닙니다." };
+ }
+
+ // 정규업체 등록 요청 데이터를 JSON으로 저장
+ const registrationRequestData = {
+ requestDate: new Date(),
+ requestedBy: session.user.id,
+ requestedByName: session.user.name,
+ requestData: requestData,
+ status: "requested" // 요청됨
+ };
+
+ // 상태를 '등록요청됨'으로 변경하고 요청 데이터 저장
+ await db
+ .update(vendorRegularRegistrations)
+ .set({
+ status: "registration_requested",
+ remarks: `정규업체 등록 요청됨 - ${new Date().toISOString()}\n요청자: ${session.user.name}`,
+ updatedAt: new Date(),
+ })
+ .where(eq(vendorRegularRegistrations.id, registrationId));
+
+ // TODO: MDG 인터페이스 연동
+ // await sendToMDG(registrationRequestData);
+
+ // TODO: Knox 결재 연동
+ // - 사업자등록증, 신용평가보고서, 개인정보동의서, 통장사본
+ // - 실사결과 보고서
+ // - CP문서, GTC문서, 비밀유지계약서
+ // await initiateKnoxApproval(registrationRequestData);
+
+ console.log("✅ 정규업체 등록 요청 데이터:", {
+ registrationId,
+ companyName: requestData.companyNameKor,
+ businessNumber: requestData.businessNumber,
+ representative: requestData.representativeNameKor,
+ requestedBy: session.user.name,
+ requestDate: new Date().toISOString()
+ });
+
+ // 캐시 무효화
+ revalidateTag("vendor-regular-registrations");
+ revalidateTag(`vendor-regular-registration-${registrationId}`);
+
+ return {
+ success: true,
+ message: "정규업체 등록 요청이 성공적으로 제출되었습니다.\nKnox 결재 시스템과 MDG 인터페이스 연동은 추후 구현 예정입니다."
+ };
+
+ } catch (error) {
+ console.error("정규업체 등록 요청 오류:", error);
+ return {
+ success: false,
+ error: error instanceof Error ? error.message : "정규업체 등록 요청 중 오류가 발생했습니다."
+ };
+ }
+}
\ No newline at end of file
diff --git a/lib/vendor-regular-registrations/table/safety-qualification-update-sheet.tsx b/lib/vendor-regular-registrations/table/safety-qualification-update-sheet.tsx
new file mode 100644
index 00000000..c2aeba70
--- /dev/null
+++ b/lib/vendor-regular-registrations/table/safety-qualification-update-sheet.tsx
@@ -0,0 +1,143 @@
+"use client"
+
+import * as React from "react"
+import { useForm } from "react-hook-form"
+import { zodResolver } from "@hookform/resolvers/zod"
+import { z } from "zod"
+import { toast } from "sonner"
+
+import {
+ Sheet,
+ SheetContent,
+ SheetDescription,
+ SheetHeader,
+ SheetTitle,
+} from "@/components/ui/sheet"
+import {
+ Form,
+ FormControl,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+} from "@/components/ui/form"
+import { Button } from "@/components/ui/button"
+import { Textarea } from "@/components/ui/textarea"
+import { updateSafetyQualification } from "../service"
+
+const formSchema = z.object({
+ safetyQualificationContent: z.string().min(1, "안전적격성 평가 내용을 입력해주세요."),
+})
+
+interface SafetyQualificationUpdateSheetProps {
+ open: boolean
+ onOpenChange: (open: boolean) => void
+ registrationId?: number
+ vendorName?: string
+ currentContent?: string | null
+ onSuccess?: () => void
+}
+
+export function SafetyQualificationUpdateSheet({
+ open,
+ onOpenChange,
+ registrationId,
+ vendorName,
+ currentContent,
+ onSuccess,
+}: SafetyQualificationUpdateSheetProps) {
+ const [isLoading, setIsLoading] = React.useState(false)
+
+ const form = useForm>({
+ resolver: zodResolver(formSchema),
+ defaultValues: {
+ safetyQualificationContent: currentContent || "",
+ },
+ })
+
+ // 폼 값 초기화
+ React.useEffect(() => {
+ if (open) {
+ form.reset({
+ safetyQualificationContent: currentContent || "",
+ })
+ }
+ }, [open, currentContent, form])
+
+ async function onSubmit(values: z.infer) {
+ if (!registrationId) {
+ toast.error("등록 ID가 없습니다.")
+ return
+ }
+
+ setIsLoading(true)
+ try {
+ const result = await updateSafetyQualification(
+ registrationId,
+ values.safetyQualificationContent
+ )
+
+ if (result.success) {
+ toast.success("안전적격성 평가가 등록되었습니다.")
+ onOpenChange(false)
+ onSuccess?.()
+ } else {
+ toast.error(result.error || "안전적격성 평가 등록에 실패했습니다.")
+ }
+ } catch (error) {
+ console.error("안전적격성 평가 등록 오류:", error)
+ toast.error("안전적격성 평가 등록 중 오류가 발생했습니다.")
+ } finally {
+ setIsLoading(false)
+ }
+ }
+
+ return (
+
+
+
+ 안전적격성 평가 입력
+
+ {vendorName && `${vendorName}의 `}안전적격성 평가 내용을 입력해주세요.
+
+
+
+
+
+ (
+
+ 안전적격성 평가 내용
+
+
+
+
+
+ )}
+ />
+
+
+ onOpenChange(false)}
+ disabled={isLoading}
+ >
+ 취소
+
+
+ {isLoading ? "저장 중..." : "저장"}
+
+
+
+
+
+
+ )
+}
diff --git a/lib/vendor-regular-registrations/table/vendor-regular-registrations-table-columns.tsx b/lib/vendor-regular-registrations/table/vendor-regular-registrations-table-columns.tsx
index 023bcfba..765b0279 100644
--- a/lib/vendor-regular-registrations/table/vendor-regular-registrations-table-columns.tsx
+++ b/lib/vendor-regular-registrations/table/vendor-regular-registrations-table-columns.tsx
@@ -10,9 +10,12 @@ import type { VendorRegularRegistration } from "@/config/vendorRegularRegistrati
import { DocumentStatusDialog } from "@/components/vendor-regular-registrations/document-status-dialog"
import { Button } from "@/components/ui/button"
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"
-import { Eye, FileText, Ellipsis } from "lucide-react"
+import { Eye, FileText, Ellipsis, Shield, Package } from "lucide-react"
import { toast } from "sonner"
import { useState } from "react"
+import { SafetyQualificationUpdateSheet } from "./safety-qualification-update-sheet"
+import { MajorItemsUpdateSheet } from "../major-items-update-sheet"
+
const statusLabels = {
audit_pass: "실사통과",
@@ -20,6 +23,7 @@ const statusLabels = {
cp_review: "CP검토",
cp_finished: "CP완료",
approval_ready: "조건충족",
+ registration_requested: "등록요청됨",
in_review: "정규등록검토",
pending_approval: "장기미등록",
}
@@ -30,6 +34,7 @@ const statusColors = {
cp_review: "bg-yellow-100 text-yellow-800",
cp_finished: "bg-purple-100 text-purple-800",
approval_ready: "bg-emerald-100 text-emerald-800",
+ registration_requested: "bg-indigo-100 text-indigo-800",
in_review: "bg-orange-100 text-orange-800",
pending_approval: "bg-red-100 text-red-800",
}
@@ -159,22 +164,58 @@ export function getColumns(): ColumnDef[] {
},
{
id: "documentStatus",
- header: "문서/자료 접수 현황",
+ header: "진행현황",
cell: ({ row }) => {
const DocumentStatusCell = () => {
const [documentDialogOpen, setDocumentDialogOpen] = useState(false)
const registration = row.original
+
+ // 문서 현황 계산 (국가별 요구사항 적용)
+ const isForeign = registration.country !== 'KR'
+ const requiredDocs = isForeign ? 4 : 3 // 외자: 4개(통장사본 포함), 내자: 3개(통장사본 제외)
+ const submittedDocs = Object.values(registration.documentSubmissions).filter(Boolean).length
+ const incompleteDocs = requiredDocs - submittedDocs
+
+ // 기본계약 현황 계산
+ const totalContracts = registration.basicContracts?.length || 0
+ const completedContracts = registration.basicContracts?.filter(c => c.status === "COMPLETED").length || 0
+ const incompleteContracts = totalContracts - completedContracts
+
+ // 안전적격성 평가 현황
+ const safetyCompleted = !!registration.safetyQualificationContent
+
+ // 추가정보 현황
+ const additionalInfoCompleted = registration.additionalInfo
+
+ // 전체 미완료 항목 계산
+ const totalIncomplete =
+ (incompleteDocs > 0 ? 1 : 0) +
+ (incompleteContracts > 0 ? 1 : 0) +
+ (!safetyCompleted ? 1 : 0) +
+ (!additionalInfoCompleted ? 1 : 0)
+
+ const isAllComplete = totalIncomplete === 0
return (
<>
- setDocumentDialogOpen(true)}
- >
-
- 현황보기
-
+
+
setDocumentDialogOpen(true)}
+ className="h-auto p-1 text-left justify-start"
+ >
+
+ {isAllComplete ? (
+
모든 항목 완료
+ ) : (
+
+ 총 {totalIncomplete}건 미완료
+
+ )}
+
+
+
[] {
id: "actions",
cell: ({ row }) => {
const ActionsDropdownCell = () => {
- const [documentDialogOpen, setDocumentDialogOpen] = useState(false)
+ const [safetyQualificationSheetOpen, setSafetyQualificationSheetOpen] = useState(false)
+ const [majorItemsSheetOpen, setMajorItemsSheetOpen] = useState(false)
const registration = row.original
return (
@@ -239,26 +281,43 @@ export function getColumns(): ColumnDef[] {
setDocumentDialogOpen(true)}
+ onClick={() => setSafetyQualificationSheetOpen(true)}
>
-
- 현황보기
+
+ 안전적격성 평가
{
- toast.info("정규업체 등록 요청 기능은 준비 중입니다.")
- }}
+ onClick={() => setMajorItemsSheetOpen(true)}
>
-
- 등록요청
+
+ 주요품목 등록
+
- {
+ // 페이지 새로고침 또는 데이터 리페치
+ window.location.reload()
+ }}
+ />
+ {
+ // 페이지 새로고침 또는 데이터 리페치
+ window.location.reload()
+ }}
/>
+
>
)
}
diff --git a/lib/vendor-regular-registrations/table/vendor-regular-registrations-table-toolbar-actions.tsx b/lib/vendor-regular-registrations/table/vendor-regular-registrations-table-toolbar-actions.tsx
index c3b4739a..3a1216f2 100644
--- a/lib/vendor-regular-registrations/table/vendor-regular-registrations-table-toolbar-actions.tsx
+++ b/lib/vendor-regular-registrations/table/vendor-regular-registrations-table-toolbar-actions.tsx
@@ -2,18 +2,20 @@
import { type Table } from "@tanstack/react-table"
import { toast } from "sonner"
+import { useRouter } from "next/navigation"
import { Button } from "@/components/ui/button"
-import { FileText, RefreshCw, Download, Mail, FileWarning, Scale, Shield } from "lucide-react"
+import { Mail, FileWarning, Scale, FileText } from "lucide-react"
import type { VendorRegularRegistration } from "@/config/vendorRegularRegistrationsColumnsConfig"
import {
sendMissingContractRequestEmails,
sendAdditionalInfoRequestEmails,
skipLegalReview,
- skipSafetyQualification
+ submitRegistrationRequest
} from "../service"
import { useState } from "react"
import { SkipReasonDialog } from "@/components/vendor-regular-registrations/skip-reason-dialog"
+import { RegistrationRequestDialog } from "@/components/vendor-regular-registrations/registration-request-dialog"
interface VendorRegularRegistrationsTableToolbarActionsProps {
table: Table
@@ -22,24 +24,31 @@ interface VendorRegularRegistrationsTableToolbarActionsProps {
export function VendorRegularRegistrationsTableToolbarActions({
table,
}: VendorRegularRegistrationsTableToolbarActionsProps) {
+ const router = useRouter()
const [syncLoading, setSyncLoading] = useState<{
missingContract: boolean;
additionalInfo: boolean;
legalSkip: boolean;
- safetySkip: boolean;
+ registrationRequest: boolean;
}>({
missingContract: false,
additionalInfo: false,
legalSkip: false,
- safetySkip: false,
+ registrationRequest: false,
})
const [skipDialogs, setSkipDialogs] = useState<{
legalReview: boolean;
- safetyQualification: boolean;
}>({
legalReview: false,
- safetyQualification: false,
+ })
+
+ const [registrationRequestDialog, setRegistrationRequestDialog] = useState<{
+ open: boolean;
+ registration: VendorRegularRegistration | null;
+ }>({
+ open: false,
+ registration: null,
})
const selectedRows = table.getFilteredSelectedRowModel().rows.map(row => row.original)
@@ -108,7 +117,7 @@ export function VendorRegularRegistrationsTableToolbarActions({
if (result.success) {
toast.success(result.message);
- window.location.reload();
+ router.refresh();
} else {
toast.error(result.error);
}
@@ -120,33 +129,52 @@ export function VendorRegularRegistrationsTableToolbarActions({
}
};
- const handleSafetyQualificationSkip = async (reason: string) => {
- if (selectedRows.length === 0) {
- toast.error("업체를 선택해주세요.");
+ // 등록요청 핸들러
+ const handleRegistrationRequest = () => {
+ const approvalReadyRows = selectedRows.filter(row => row.status === "approval_ready");
+
+ if (approvalReadyRows.length === 0) {
+ toast.error("조건충족 상태의 벤더를 선택해주세요.");
+ return;
+ }
+
+ if (approvalReadyRows.length > 1) {
+ toast.error("정규업체 등록 요청은 한 번에 하나씩만 가능합니다.");
return;
}
- setSyncLoading(prev => ({ ...prev, safetySkip: true }));
+ setRegistrationRequestDialog({
+ open: true,
+ registration: approvalReadyRows[0],
+ });
+ };
+
+ const handleRegistrationRequestSubmit = async (requestData: any) => {
+ if (!registrationRequestDialog.registration) return;
+
+ setSyncLoading(prev => ({ ...prev, registrationRequest: true }));
try {
- const vendorIds = selectedRows.map(row => row.vendorId);
- const result = await skipSafetyQualification(vendorIds, reason);
-
+ const result = await submitRegistrationRequest(registrationRequestDialog.registration.id, requestData);
if (result.success) {
toast.success(result.message);
- window.location.reload();
+ setRegistrationRequestDialog({ open: false, registration: null });
+ window.location.reload(); // 데이터 새로고침
} else {
toast.error(result.error);
}
} catch (error) {
- console.error("Error skipping safety qualification:", error);
- toast.error("안전적격성평가 Skip 처리 중 오류가 발생했습니다.");
+ console.error("등록요청 오류:", error);
+ toast.error("등록요청 중 오류가 발생했습니다.");
} finally {
- setSyncLoading(prev => ({ ...prev, safetySkip: false }));
+ setSyncLoading(prev => ({ ...prev, registrationRequest: false }));
}
};
// CP검토 상태인 선택된 행들 개수
const cpReviewCount = selectedRows.filter(row => row.status === "cp_review").length;
+
+ // 조건충족 상태인 선택된 행들 개수
+ const approvalReadyCount = selectedRows.filter(row => row.status === "approval_ready").length;
return (
@@ -190,22 +218,6 @@ export function VendorRegularRegistrationsTableToolbarActions({
{syncLoading.additionalInfo ? "발송 중..." : "추가정보요청"}
- {
- if (selectedRows.length === 0) {
- toast.error("내보낼 항목을 선택해주세요.")
- return
- }
- toast.info("엑셀 내보내기 기능은 준비 중입니다.")
- }}
- disabled={selectedRows.length === 0}
- >
-
- 엑셀 내보내기
-
-
- {syncLoading.legalSkip ? "처리 중..." : "법무검토 Skip"}
+ {syncLoading.legalSkip ? "처리 중..." : "GTC Skip"}
setSkipDialogs(prev => ({ ...prev, safetyQualification: true }))}
- disabled={syncLoading.safetySkip || selectedRows.length === 0}
+ onClick={handleRegistrationRequest}
+ disabled={syncLoading.registrationRequest || approvalReadyCount === 0}
>
-
- {syncLoading.safetySkip ? "처리 중..." : "안전 Skip"}
+
+ {syncLoading.registrationRequest ? "처리 중..." : "등록요청"}
setSkipDialogs(prev => ({ ...prev, legalReview: open }))}
- title="법무검토 Skip"
- description={`선택된 ${cpReviewCount}개 업체의 법무검토를 Skip하고 CP완료 상태로 변경합니다. Skip 사유를 입력해주세요.`}
+ title="GTC Skip"
+ description={`선택된 ${cpReviewCount}개 업체의 GTC를 Skip하고 CP완료 상태로 변경합니다. Skip 사유를 입력해주세요.`}
onConfirm={handleLegalReviewSkip}
loading={syncLoading.legalSkip}
/>
- setSkipDialogs(prev => ({ ...prev, safetyQualification: open }))}
- title="안전적격성평가 Skip"
- description={`선택된 ${selectedRows.length}개 업체의 안전적격성평가를 Skip하고 완료 상태로 변경합니다. Skip 사유를 입력해주세요.`}
- onConfirm={handleSafetyQualificationSkip}
- loading={syncLoading.safetySkip}
+ setRegistrationRequestDialog(prev => ({ ...prev, open }))}
+ registration={registrationRequestDialog.registration}
+ onSubmit={handleRegistrationRequestSubmit}
/>
)
diff --git a/lib/vendors/table/request-pq-dialog.tsx b/lib/vendors/table/request-pq-dialog.tsx
index a0c24dc6..5b5f722c 100644
--- a/lib/vendors/table/request-pq-dialog.tsx
+++ b/lib/vendors/table/request-pq-dialog.tsx
@@ -127,14 +127,38 @@ export function RequestPQDialog({ vendors, showTrigger = true, onSuccess, ...pro
}
}, [type])
- // 기본계약서 템플릿 로딩
+ // 기본계약서 템플릿 로딩 및 자동 선택
React.useEffect(() => {
setIsLoadingTemplates(true)
getALLBasicContractTemplates()
- .then(setBasicContractTemplates)
+ .then((templates) => {
+ setBasicContractTemplates(templates)
+
+ // 벤더 국가별 자동 선택 로직
+ if (vendors.length > 0) {
+ const isAllForeign = vendors.every(vendor => vendor.country !== 'KR')
+ const isAllDomestic = vendors.every(vendor => vendor.country === 'KR')
+
+ if (isAllForeign) {
+ // 외자: 준법서약 (영문), GTC만 선택
+ const foreignTemplates = templates.filter(template =>
+ template.templateName?.includes('준법서약') && template.templateName?.includes('영문') ||
+ template.templateName?.includes('GTC')
+ )
+ setSelectedTemplateIds(foreignTemplates.map(t => t.id))
+ } else if (isAllDomestic) {
+ // 내자: 준법서약 (영문), GTC 제외한 모든 템플릿 선택
+ const domesticTemplates = templates.filter(template => {
+ const name = template.templateName?.toLowerCase() || ''
+ return !(name.includes('준법서약') && name.includes('영문')) && !name.includes('gtc')
+ })
+ setSelectedTemplateIds(domesticTemplates.map(t => t.id))
+ }
+ }
+ })
.catch(() => toast.error("기본계약서 템플릿 로딩 실패"))
.finally(() => setIsLoadingTemplates(false))
- }, [])
+ }, [vendors])
React.useEffect(() => {
if (!props.open) {
@@ -527,6 +551,10 @@ export function RequestPQDialog({ vendors, showTrigger = true, onSuccess, ...pro
{selectedTemplateIds.length > 0 && (
{selectedTemplateIds.length}개 템플릿이 선택되었습니다.
+ {vendors.length > 0 && vendors.every(v => v.country !== 'KR') &&
+ " (외자 벤더 - 자동 선택됨)"}
+ {vendors.length > 0 && vendors.every(v => v.country === 'KR') &&
+ " (내자 벤더 - 자동 선택됨)"}
)}
--
cgit v1.2.3